ITK  6.0.0
Insight Toolkit
itkAffineTransform.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 itkAffineTransform_h
19#define itkAffineTransform_h
20
22#include <iostream>
23
24
25namespace itk
26{
99template <typename TParametersValueType = double, unsigned int VDimension = 3>
100// Number of dimensions in the input space
101class ITK_TEMPLATE_EXPORT AffineTransform
102 : public MatrixOffsetTransformBase<TParametersValueType, VDimension, VDimension>
103{
104public:
106
110
113
116
119
121 static constexpr unsigned int InputSpaceDimension = VDimension;
122 static constexpr unsigned int OutputSpaceDimension = VDimension;
123 static constexpr unsigned int SpaceDimension = VDimension;
124 static constexpr unsigned int ParametersDimension = VDimension * (VDimension + 1);
125
127 using typename Superclass::ParametersType;
128 using typename Superclass::FixedParametersType;
129 using typename Superclass::JacobianType;
132 using typename Superclass::ScalarType;
133 using typename Superclass::InputPointType;
134 using typename Superclass::OutputPointType;
135 using typename Superclass::InputVectorType;
136 using typename Superclass::OutputVectorType;
137 using typename Superclass::InputVnlVectorType;
138 using typename Superclass::OutputVnlVectorType;
141 using typename Superclass::MatrixType;
142 using typename Superclass::InverseMatrixType;
143 using typename Superclass::CenterType;
144 using typename Superclass::OffsetType;
145 using typename Superclass::TranslationType;
146
151
158 void
159 Translate(const OutputVectorType & trans, bool pre = false);
160
172 void
173 Scale(const OutputVectorType & factor, bool pre = false);
174
175 void
176 Scale(const TParametersValueType & factor, bool pre = false);
177
193 void
194 Rotate(int axis1, int axis2, TParametersValueType angle, bool pre = false);
210 void
211 Rotate2D(TParametersValueType angle, bool pre = false);
212
226 void
227 Rotate3D(const OutputVectorType & axis, TParametersValueType angle, bool pre = false);
228
240 void
241 Shear(int axis1, int axis2, TParametersValueType coef, bool pre = false);
242
244 bool
245 GetInverse(Self * inverse) const;
246
249 GetInverseTransform() const override;
250
263 Metric(const Self * other) const;
264
269 Metric() const;
270
271protected:
279#if !defined(ITK_LEGACY_REMOVE)
280 [[deprecated("Removed unused constructor")]] AffineTransform(const MatrixType & matrix,
281 const OutputVectorType & offset);
282#endif
283 AffineTransform(unsigned int parametersDimension);
288 ~AffineTransform() override = default;
289
290}; // class AffineTransform
291
292} // namespace itk
293
294#ifndef ITK_MANUAL_INSTANTIATION
295# include "itkAffineTransform.hxx"
296#endif
297
298#endif /* itkAffineTransform_h */
ScalarType Metric() const
typename Superclass::InverseTransformBaseType InverseTransformBaseType
void Shear(int axis1, int axis2, TParametersValueType coef, bool pre=false)
typename InverseTransformBaseType::Pointer InverseTransformBasePointer
AffineTransform(const MatrixType &matrix, const OutputVectorType &offset)
void Rotate2D(TParametersValueType angle, bool pre=false)
void Scale(const TParametersValueType &factor, bool pre=false)
void Rotate(int axis1, int axis2, TParametersValueType angle, bool pre=false)
bool GetInverse(Self *inverse) const
AffineTransform(unsigned int parametersDimension)
void Scale(const OutputVectorType &factor, bool pre=false)
ScalarType Metric(const Self *other) const
void Rotate3D(const OutputVectorType &axis, TParametersValueType angle, bool pre=false)
~AffineTransform() override=default
InverseTransformBasePointer GetInverseTransform() const override
ITK_DISALLOW_COPY_AND_MOVE(AffineTransform)
void Translate(const OutputVectorType &trans, bool pre=false)
itkOverrideGetNameOfClassMacro(AffineTransform)
Array2D class representing a 2D array.
Definition: itkArray2D.h:43
A templated class holding a n-Dimensional covariant vector.
Matrix and Offset transformation of a vector space (e.g. space coordinates)
vnl_vector_fixed< TParametersValueType, Self::InputSpaceDimension > InputVnlVectorType
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
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
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....