ITK  6.0.0
Insight Toolkit
itkSimilarity2DTransform.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * https://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18#ifndef itkSimilarity2DTransform_h
19#define itkSimilarity2DTransform_h
20
21#include <iostream>
22#include "itkRigid2DTransform.h"
23
24namespace itk
25{
61template <typename TParametersValueType = double>
62class ITK_TEMPLATE_EXPORT Similarity2DTransform : public Rigid2DTransform<TParametersValueType>
63{
64public:
65 ITK_DISALLOW_COPY_AND_MOVE(Similarity2DTransform);
66
72
74 itkNewMacro(Self);
75
77 itkOverrideGetNameOfClassMacro(Similarity2DTransform);
78
80 static constexpr unsigned int SpaceDimension = 2;
81 static constexpr unsigned int InputSpaceDimension = 2;
82 static constexpr unsigned int OutputSpaceDimension = 2;
83 static constexpr unsigned int ParametersDimension = 4;
84
85 using typename Superclass::ScalarType;
86 using ScaleType = TParametersValueType;
87
89 using typename Superclass::ParametersType;
93
95 using typename Superclass::JacobianType;
98
100 using typename Superclass::OffsetType;
101 using typename Superclass::OffsetValueType;
102
104 using typename Superclass::MatrixType;
105 using typename Superclass::MatrixValueType;
106
108 using typename Superclass::InputPointType;
109 using typename Superclass::OutputPointType;
110
112 using typename Superclass::InputVectorType;
113 using typename Superclass::OutputVectorType;
114
118
120 using typename Superclass::InputVnlVectorType;
121 using typename Superclass::OutputVnlVectorType;
122
127
129 void
131
132 itkGetConstReferenceMacro(Scale, ScaleType);
133
143 void
144 SetParameters(const ParametersType & parameters) override;
145
155 const ParametersType &
156 GetParameters() const override;
157
161 void
163
165 void
166 SetIdentity() override;
167
172 void
173 CloneInverseTo(Pointer & result) const;
174
176 bool
177 GetInverse(Self * inverse) const;
178
181 GetInverseTransform() const override;
182
187 void
188 CloneTo(Pointer & result) const;
189
203 void
204 SetMatrix(const MatrixType & matrix) override;
205
219 void
220 SetMatrix(const MatrixType & matrix, const TParametersValueType tolerance) override;
221
222protected:
223 Similarity2DTransform(unsigned int outputSpaceDimension, unsigned int parametersDimension);
224 Similarity2DTransform(unsigned int parametersDimension);
226
227 ~Similarity2DTransform() override = default;
228 void
229 PrintSelf(std::ostream & os, Indent indent) const override;
230
234 void
235 ComputeMatrix() override;
236
241 void
243
245 void
247 {
248 m_Scale = scale;
249 }
250
251private:
252 ScaleType m_Scale{};
253}; // class Similarity2DTransform
254} // namespace itk
255
256#ifndef ITK_MANUAL_INSTANTIATION
257# include "itkSimilarity2DTransform.hxx"
258#endif
259
260#endif /* itkSimilarity2DTransform_h */
Array2D class representing a 2D array.
Definition: itkArray2D.h:43
A templated class holding a n-Dimensional covariant vector.
Control indentation during Print() invocation.
Definition: itkIndent.h:50
A templated class holding a M x N size Matrix.
Definition: itkMatrix.h:53
Class to hold and manage different parameter types used during optimization.
A templated class holding a geometric point in n-Dimensional space.
Definition: itkPoint.h:54
Rigid2DTransform of a vector space (e.g. space coordinates)
vnl_vector_fixed< TParametersValueType, Self::InputSpaceDimension > InputVnlVectorType
typename MatrixType::ValueType MatrixValueType
vnl_vector_fixed< TParametersValueType, Self::OutputSpaceDimension > OutputVnlVectorType
typename Superclass::InverseTransformBaseType InverseTransformBaseType
vnl_matrix_fixed< ParametersValueType, VOutputDimension, VInputDimension > JacobianPositionType
Definition: itkTransform.h:131
vnl_matrix_fixed< ParametersValueType, VInputDimension, VOutputDimension > InverseJacobianPositionType
Definition: itkTransform.h:132
ParametersValueType ScalarType
Definition: itkTransform.h:127
Similarity2DTransform of a vector space (e.g. space coordinates)
void SetScale(ScaleType scale)
const ParametersType & GetParameters() const override
void SetIdentity() override
bool GetInverse(Self *inverse) const
void CloneInverseTo(Pointer &result) const
void PrintSelf(std::ostream &os, Indent indent) const override
InverseTransformBasePointer GetInverseTransform() const override
Similarity2DTransform(unsigned int outputSpaceDimension, unsigned int parametersDimension)
typename Superclass::InverseTransformBaseType InverseTransformBaseType
void SetMatrix(const MatrixType &matrix) override
typename InverseTransformBaseType::Pointer InverseTransformBasePointer
void SetMatrix(const MatrixType &matrix, const TParametersValueType tolerance) override
~Similarity2DTransform() override=default
void CloneTo(Pointer &result) const
void ComputeMatrix() override
void ComputeMatrixParameters() override
Similarity2DTransform(unsigned int parametersDimension)
void SetParameters(const ParametersType &parameters) override
void ComputeJacobianWithRespectToParameters(const InputPointType &p, JacobianType &jacobian) const override
A templated class holding a n-Dimensional vector.
Definition: itkVector.h:63
SmartPointer< Self > Pointer
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
long OffsetValueType
Definition: itkIntTypes.h:97