ITK  5.2.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  * http://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 
24 namespace itk
25 {
61 template <typename TParametersValueType = double>
62 class ITK_TEMPLATE_EXPORT Similarity2DTransform : public Rigid2DTransform<TParametersValueType>
63 {
64 public:
65  ITK_DISALLOW_COPY_AND_MOVE(Similarity2DTransform);
66 
72 
74  itkNewMacro(Self);
75 
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 ScalarType = typename Superclass::ScalarType;
86  using ScaleType = TParametersValueType;
87 
89  using ParametersType = typename Superclass::ParametersType;
90  using ParametersValueType = typename Superclass::ParametersValueType;
91  using FixedParametersType = typename Superclass::FixedParametersType;
92  using FixedParametersValueType = typename Superclass::FixedParametersValueType;
93 
95  using JacobianType = typename Superclass::JacobianType;
96  using JacobianPositionType = typename Superclass::JacobianPositionType;
97  using InverseJacobianPositionType = typename Superclass::InverseJacobianPositionType;
98 
100  using OffsetType = typename Superclass::OffsetType;
102 
104  using MatrixType = typename Superclass::MatrixType;
105  using MatrixValueType = typename Superclass::MatrixValueType;
106 
108  using InputPointType = typename Superclass::InputPointType;
109  using OutputPointType = typename Superclass::OutputPointType;
110 
112  using InputVectorType = typename Superclass::InputVectorType;
113  using OutputVectorType = typename Superclass::OutputVectorType;
114 
116  using InputCovariantVectorType = typename Superclass::InputCovariantVectorType;
117  using OutputCovariantVectorType = typename Superclass::OutputCovariantVectorType;
118 
120  using InputVnlVectorType = typename Superclass::InputVnlVectorType;
121  using OutputVnlVectorType = typename Superclass::OutputVnlVectorType;
122 
125  using InverseTransformBaseType = typename Superclass::InverseTransformBaseType;
126  using InverseTransformBasePointer = typename InverseTransformBaseType::Pointer;
127 
129  void
130  SetScale(ScaleType scale);
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
162  ComputeJacobianWithRespectToParameters(const InputPointType & p, JacobianType & jacobian) const override;
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 
222 protected:
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
242  ComputeMatrixParameters() override;
243 
245  void
247  {
248  m_Scale = scale;
249  }
250 
251 private:
253 }; // class Similarity2DTransform
254 } // namespace itk
255 
256 #ifndef ITK_MANUAL_INSTANTIATION
257 # include "itkSimilarity2DTransform.hxx"
258 #endif
259 
260 #endif /* itkSimilarity2DTransform_h */
itk::Rigid2DTransform::JacobianType
typename Superclass::JacobianType JacobianType
Definition: itkRigid2DTransform.h:88
itk::Rigid2DTransform::MatrixType
typename Superclass::MatrixType MatrixType
Definition: itkRigid2DTransform.h:93
itkRigid2DTransform.h
itk::Rigid2DTransform::OutputVnlVectorType
typename Superclass::OutputVnlVectorType OutputVnlVectorType
Definition: itkRigid2DTransform.h:111
itk::Rigid2DTransform::OutputPointType
typename Superclass::OutputPointType OutputPointType
Definition: itkRigid2DTransform.h:115
itk::Rigid2DTransform::FixedParametersType
typename Superclass::FixedParametersType FixedParametersType
Definition: itkRigid2DTransform.h:84
itk::Similarity2DTransform::ScaleType
TParametersValueType ScaleType
Definition: itkSimilarity2DTransform.h:86
itk::SmartPointer< Self >
itk::Rigid2DTransform::InverseJacobianPositionType
typename Superclass::InverseJacobianPositionType InverseJacobianPositionType
Definition: itkRigid2DTransform.h:90
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::Rigid2DTransform::OffsetType
typename Superclass::OffsetType OffsetType
Definition: itkRigid2DTransform.h:97
itk::Rigid2DTransform::ParametersValueType
typename Superclass::ParametersValueType ParametersValueType
Definition: itkRigid2DTransform.h:83
itk::Rigid2DTransform::OutputVectorType
typename Superclass::OutputVectorType OutputVectorType
Definition: itkRigid2DTransform.h:102
itk::Rigid2DTransform
Rigid2DTransform of a vector space (e.g. space coordinates)
Definition: itkRigid2DTransform.h:56
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::Rigid2DTransform::JacobianPositionType
typename Superclass::JacobianPositionType JacobianPositionType
Definition: itkRigid2DTransform.h:89
itk::Rigid2DTransform::InputCovariantVectorType
typename Superclass::InputCovariantVectorType InputCovariantVectorType
Definition: itkRigid2DTransform.h:106
itk::Similarity2DTransform
Similarity2DTransform of a vector space (e.g. space coordinates)
Definition: itkSimilarity2DTransform.h:62
itk::Rigid2DTransform::MatrixValueType
typename Superclass::MatrixValueType MatrixValueType
Definition: itkRigid2DTransform.h:94
itk::Similarity2DTransform::SetVarScale
void SetVarScale(ScaleType scale)
Definition: itkSimilarity2DTransform.h:246
itk::Rigid2DTransform::InputVectorType
typename Superclass::InputVectorType InputVectorType
Definition: itkRigid2DTransform.h:101
itk::Rigid2DTransform::OffsetValueType
typename Superclass::OffsetValueType OffsetValueType
Definition: itkRigid2DTransform.h:98
itk::Rigid2DTransform::ParametersType
typename Superclass::ParametersType ParametersType
Definition: itkRigid2DTransform.h:82
itk::Similarity2DTransform::m_Scale
ScaleType m_Scale
Definition: itkSimilarity2DTransform.h:252
itk::Rigid2DTransform::OutputCovariantVectorType
typename Superclass::OutputCovariantVectorType OutputCovariantVectorType
Definition: itkRigid2DTransform.h:107
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::Rigid2DTransform::InputPointType
typename Superclass::InputPointType InputPointType
Definition: itkRigid2DTransform.h:114
itk::OffsetValueType
signed long OffsetValueType
Definition: itkIntTypes.h:94
itk::Rigid2DTransform::FixedParametersValueType
typename Superclass::FixedParametersValueType FixedParametersValueType
Definition: itkRigid2DTransform.h:85
itk::Rigid2DTransform::InverseTransformBasePointer
typename InverseTransformBaseType::Pointer InverseTransformBasePointer
Definition: itkRigid2DTransform.h:120
itk::Rigid2DTransform::ScalarType
typename Superclass::ScalarType ScalarType
Definition: itkRigid2DTransform.h:79
itk::Rigid2DTransform::InverseTransformBaseType
typename Superclass::InverseTransformBaseType InverseTransformBaseType
Definition: itkRigid2DTransform.h:119
itk::Rigid2DTransform::InputVnlVectorType
typename Superclass::InputVnlVectorType InputVnlVectorType
Definition: itkRigid2DTransform.h:110