ITK  5.4.0
Insight Toolkit
itkSimilarity3DTransform.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 itkSimilarity3DTransform_h
19 #define itkSimilarity3DTransform_h
20 
21 #include <iostream>
23 
24 namespace itk
25 {
46 template <typename TParametersValueType = double>
47 class ITK_TEMPLATE_EXPORT Similarity3DTransform : public VersorRigid3DTransform<TParametersValueType>
48 {
49 public:
50  ITK_DISALLOW_COPY_AND_MOVE(Similarity3DTransform);
51 
57 
59  itkNewMacro(Self);
60 
62  itkOverrideGetNameOfClassMacro(Similarity3DTransform);
63 
65  static constexpr unsigned int SpaceDimension = 3;
66  static constexpr unsigned int InputSpaceDimension = 3;
67  static constexpr unsigned int OutputSpaceDimension = 3;
68  static constexpr unsigned int ParametersDimension = 7;
69 
71  using typename Superclass::ParametersType;
72  using typename Superclass::FixedParametersType;
73  using typename Superclass::JacobianType;
74  using typename Superclass::JacobianPositionType;
75  using typename Superclass::InverseJacobianPositionType;
76  using typename Superclass::ScalarType;
77  using typename Superclass::InputPointType;
78  using typename Superclass::OutputPointType;
79  using typename Superclass::InputVectorType;
80  using typename Superclass::OutputVectorType;
81  using typename Superclass::InputVnlVectorType;
82  using typename Superclass::OutputVnlVectorType;
83  using typename Superclass::InputCovariantVectorType;
84  using typename Superclass::OutputCovariantVectorType;
85  using typename Superclass::MatrixType;
86  using typename Superclass::InverseMatrixType;
87  using typename Superclass::CenterType;
88  using typename Superclass::OffsetType;
89  using typename Superclass::TranslationType;
90 
92  using typename Superclass::VersorType;
93  using typename Superclass::AxisType;
94  using typename Superclass::AngleType;
95  using ScaleType = TParametersValueType;
96 
98  void
99  SetIdentity() override;
100 
107  void
108  SetMatrix(const MatrixType & matrix) override;
109 
116  void
117  SetMatrix(const MatrixType & matrix, const TParametersValueType tolerance) override;
118 
123  void
124  SetParameters(const ParametersType & parameters) override;
125 
126  const ParametersType &
127  GetParameters() const override;
128 
130  void
131  SetScale(ScaleType scale);
132 
133  itkGetConstReferenceMacro(Scale, ScaleType);
134 
139  void
140  ComputeJacobianWithRespectToParameters(const InputPointType & p, JacobianType & jacobian) const override;
141 
142 protected:
143  Similarity3DTransform(const MatrixType & matrix, const OutputVectorType & offset);
144  Similarity3DTransform(unsigned int paramDim);
146  ~Similarity3DTransform() override = default;
147 
148  void
149  PrintSelf(std::ostream & os, Indent indent) const override;
150 
153  void
154  ComputeMatrix() override;
155 
157  void
158  ComputeMatrixParameters() override;
159 
160 private:
161  ScaleType m_Scale{};
162 }; // class Similarity3DTransform
163 } // namespace itk
164 
165 #ifndef ITK_MANUAL_INSTANTIATION
166 # include "itkSimilarity3DTransform.hxx"
167 #endif
168 
169 #endif /* itkSimilarity3DTransform_h */
itk::OptimizerParameters
Class to hold and manage different parameter types used during optimization.
Definition: itkOptimizerParameters.h:36
itk::VersorRigid3DTransform
VersorRigid3DTransform of a vector space (e.g. space coordinates)
Definition: itkVersorRigid3DTransform.h:46
itk::Vector
A templated class holding a n-Dimensional vector.
Definition: itkVector.h:62
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:55
itkVersorRigid3DTransform.h
itk::Matrix< TParametersValueType, Self::OutputSpaceDimension, Self::InputSpaceDimension >
itk::Similarity3DTransform::ScaleType
TParametersValueType ScaleType
Definition: itkSimilarity3DTransform.h:95
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::Point
A templated class holding a geometric point in n-Dimensional space.
Definition: itkPoint.h:53
itk::Array2D
Array2D class representing a 2D array.
Definition: itkArray2D.h:42
itk::Similarity3DTransform
Similarity3DTransform of a vector space (e.g. space coordinates)
Definition: itkSimilarity3DTransform.h:47