ITK  6.0.0
Insight Toolkit
itkVersorTransform.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 itkVersorTransform_h
19#define itkVersorTransform_h
20
21#include <iostream>
22#include "itkRigid3DTransform.h"
23#include "vnl/vnl_quaternion.h"
24
25namespace itk
26{
46template <typename TParametersValueType = double>
47class ITK_TEMPLATE_EXPORT VersorTransform : public Rigid3DTransform<TParametersValueType>
48{
49public:
50 ITK_DISALLOW_COPY_AND_MOVE(VersorTransform);
51
57
59 itkOverrideGetNameOfClassMacro(VersorTransform);
60
62 itkNewMacro(Self);
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 = 3;
69
71 using typename Superclass::ScalarType;
72 using typename Superclass::ParametersType;
73 using typename Superclass::FixedParametersType;
74 using typename Superclass::JacobianType;
75 using typename Superclass::JacobianPositionType;
76 using typename Superclass::InverseJacobianPositionType;
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
91 using VnlQuaternionType = vnl_quaternion<TParametersValueType>;
92
97 using AxisValueType = typename AxisType::ValueType;
99
108 void
109 SetParameters(const ParametersType & parameters) override;
110
112 const ParametersType &
113 GetParameters() const override;
114
116 void
117 SetRotation(const VersorType & versor);
118
119 void
120 SetRotation(const AxisType & axis, AngleType angle);
121
122 itkGetConstReferenceMacro(Versor, VersorType);
123
125 void
126 SetIdentity() override;
127
133 void
135
136protected:
138#if !defined(ITK_LEGACY_REMOVE)
139 [[deprecated("Removed unused constructor")]] VersorTransform(const MatrixType & matrix,
140 const OutputVectorType & offset);
141#endif
142 VersorTransform(unsigned int parametersDimension);
147 ~VersorTransform() override = default;
148
149 void
150 SetVarVersor(const VersorType & newVersor)
151 {
152 m_Versor = newVersor;
153 }
154
156 void
157 PrintSelf(std::ostream & os, Indent indent) const override;
158
161 void
162 ComputeMatrix() override;
163
164 void
166
167private:
169 VersorType m_Versor{};
170}; // class VersorTransform
171} // namespace itk
172
173#ifndef ITK_MANUAL_INSTANTIATION
174# include "itkVersorTransform.hxx"
175#endif
176
177#endif /* itkVersorTransform_h */
Array2D class representing a 2D array.
Definition: itkArray2D.h:43
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
Class to hold and manage different parameter types used during optimization.
TParametersValueType ValueType
Rigid3DTransform of a vector space (e.g. space coordinates)
void ComputeMatrixParameters() override
VersorTransform(unsigned int parametersDimension)
void PrintSelf(std::ostream &os, Indent indent) const override
typename AxisType::ValueType AxisValueType
void SetVarVersor(const VersorType &newVersor)
vnl_quaternion< TParametersValueType > VnlQuaternionType
void ComputeJacobianWithRespectToParameters(const InputPointType &p, JacobianType &jacobian) const override
void SetParameters(const ParametersType &parameters) override
void ComputeMatrix() override
void SetRotation(const VersorType &versor)
typename VersorType::VectorType AxisType
typename VersorType::ValueType AngleType
~VersorTransform() override=default
void SetRotation(const AxisType &axis, AngleType angle)
const ParametersType & GetParameters() const override
typename ParametersType::ValueType ParametersValueType
void SetIdentity() override
A templated class holding a unit quaternion.
Definition: itkVersor.h:53
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....