ITK  6.0.0
Insight Toolkit
itkScaleTransform.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 itkScaleTransform_h
19#define itkScaleTransform_h
20
22#include "itkMacro.h"
23#include "itkMatrix.h"
24
25namespace itk
26{
44template <typename TParametersValueType = float, unsigned int VDimension = 3>
45class ITK_TEMPLATE_EXPORT ScaleTransform
46 : public MatrixOffsetTransformBase<TParametersValueType, VDimension, VDimension>
47{
48public:
49 ITK_DISALLOW_COPY_AND_MOVE(ScaleTransform);
50
56
58 itkNewMacro(Self);
59
61 itkOverrideGetNameOfClassMacro(ScaleTransform);
62
64 static constexpr unsigned int SpaceDimension = VDimension;
65 static constexpr unsigned int ParametersDimension = VDimension;
66
68 using typename Superclass::ScalarType;
69
72 using typename Superclass::ParametersType;
73
75 using typename Superclass::JacobianType;
78
81
85
89
91 using InputVnlVectorType = vnl_vector_fixed<TParametersValueType, VDimension>;
92 using OutputVnlVectorType = vnl_vector_fixed<TParametersValueType, VDimension>;
93
97
102
103 using typename Superclass::MatrixType;
104
109 void
110 SetParameters(const ParametersType & parameters) override;
111
116 const ParametersType &
117 GetParameters() const override;
118
120 void
122
127 void
129 using Superclass::ComputeJacobianWithRespectToPosition;
130
139 void
140 SetScale(const ScaleType & scale);
141
142 void
143 ComputeMatrix() override;
144
146 void
147 Compose(const Self * other, bool pre = false);
148
152 void
153 Scale(const ScaleType & scale, bool pre = false);
154
160 TransformPoint(const InputPointType & point) const override;
161
162 using Superclass::TransformVector;
164 TransformVector(const InputVectorType & vect) const override;
165
167 TransformVector(const InputVnlVectorType & vect) const override;
168
169 using Superclass::TransformCovariantVector;
172
177 inline InputPointType
179
180 inline InputVectorType
181 BackTransform(const OutputVectorType & vect) const;
182
183 inline InputVnlVectorType
185
188
193 bool
194 GetInverse(Self * inverse) const;
195
198 GetInverseTransform() const override;
199
203 void
204 SetIdentity() override;
205
207 itkGetConstReferenceMacro(Scale, ScaleType);
208
209protected:
212
214 ~ScaleTransform() override = default;
215
217 void
218 PrintSelf(std::ostream & os, Indent indent) const override;
219
220private:
221 ScaleType m_Scale{}; // Scales of the transformation
222
223}; // class ScaleTransform
224
225} // end namespace itk
226
227#ifndef ITK_MANUAL_INSTANTIATION
228# include "itkScaleTransform.hxx"
229#endif
230
231#endif /* itkScaleTransform_h */
Array2D class representing a 2D array.
Definition: itkArray2D.h:43
A templated class holding a n-Dimensional covariant vector.
Simulate a standard C array with copy semantics.
Definition: itkFixedArray.h:54
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Matrix and Offset transformation of a vector space (e.g. space coordinates)
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
Scale transformation of a vector space (e.g. space coordinates)
void SetParameters(const ParametersType &parameters) override
void PrintSelf(std::ostream &os, Indent indent) const override
InputVnlVectorType BackTransform(const OutputVnlVectorType &vect) const
InputVectorType BackTransform(const OutputVectorType &vect) const
vnl_vector_fixed< TParametersValueType, VDimension > InputVnlVectorType
void ComputeMatrix() override
bool GetInverse(Self *inverse) const
void Compose(const Self *other, bool pre=false)
typename Superclass::InverseTransformBaseType InverseTransformBaseType
OutputPointType TransformPoint(const InputPointType &point) const override
void Scale(const ScaleType &scale, bool pre=false)
~ScaleTransform() override=default
void SetIdentity() override
typename InverseTransformBaseType::Pointer InverseTransformBasePointer
const ParametersType & GetParameters() const override
OutputVectorType TransformVector(const InputVectorType &vect) const override
InputPointType BackTransform(const OutputPointType &point) const
InverseTransformBasePointer GetInverseTransform() const override
vnl_matrix_fixed< ParametersValueType, VOutputDimension, VInputDimension > JacobianPositionType
Definition: itkTransform.h:131
vnl_vector_fixed< TParametersValueType, VDimension > OutputVnlVectorType
void SetScale(const ScaleType &scale)
void ComputeJacobianWithRespectToParameters(const InputPointType &p, JacobianType &j) const override
OutputCovariantVectorType TransformCovariantVector(const InputCovariantVectorType &vect) const override
InputCovariantVectorType BackTransform(const OutputCovariantVectorType &vect) const
void ComputeJacobianWithRespectToPosition(const InputPointType &x, JacobianPositionType &jac) const override
OutputVnlVectorType TransformVector(const InputVnlVectorType &vect) 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....
*par Constraints *The filter image with at least two dimensions and a vector *length of at least The theory supports extension to scalar but *the implementation of the itk vector classes do not **The template parameter TRealType must be floating point(float or double) or *a user-defined "real" numerical type with arithmetic operations defined *sufficient to compute derivatives. **\par Performance *This filter will automatically multithread if run with *SetUsePrincipleComponents