ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
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
65 GetInverseTransform() const override;
66
68 itkNewMacro(Self);
69
71 static constexpr unsigned int SpaceDimension = 3;
72 static constexpr unsigned int InputSpaceDimension = 3;
73 static constexpr unsigned int OutputSpaceDimension = 3;
74 static constexpr unsigned int ParametersDimension = 3;
75
77 using typename Superclass::ScalarType;
78 using typename Superclass::ParametersType;
80 using typename Superclass::JacobianType;
83 using typename Superclass::InputPointType;
84 using typename Superclass::OutputPointType;
85 using typename Superclass::InputVectorType;
86 using typename Superclass::OutputVectorType;
87 using typename Superclass::InputVnlVectorType;
91 using typename Superclass::MatrixType;
92 using typename Superclass::InverseMatrixType;
93 using typename Superclass::CenterType;
94 using typename Superclass::OffsetType;
95
97 using VnlQuaternionType = vnl_quaternion<TParametersValueType>;
98
103 using AxisValueType = typename AxisType::ValueType;
114 void
115 SetParameters(const ParametersType & parameters) override;
116
118 const ParametersType &
119 GetParameters() const override;
120
122 void
123 SetRotation(const VersorType & versor);
124
125 void
126 SetRotation(const AxisType & axis, AngleType angle);
127
128 itkGetConstReferenceMacro(Versor, VersorType);
129
131 void
132 SetIdentity() override;
133
139 void
141
142protected:
145#if !defined(ITK_LEGACY_REMOVE)
146 [[deprecated("Removed unused constructor")]] VersorTransform(const MatrixType & matrix,
147 const OutputVectorType & offset);
148#endif
149 VersorTransform(unsigned int parametersDimension);
153 ~VersorTransform() override = default;
154
155 void
156 SetVarVersor(const VersorType & newVersor)
157 {
158 m_Versor = newVersor;
159 }
160
162 void
163 PrintSelf(std::ostream & os, Indent indent) const override;
164
167 void
168 ComputeMatrix() override;
169
170 void
172
173private:
176}; // class VersorTransform
177} // namespace itk
178
179#ifndef ITK_MANUAL_INSTANTIATION
180# include "itkVersorTransform.hxx"
181#endif
182
183#endif /* itkVersorTransform_h */
Control indentation during Print() invocation.
Definition itkIndent.h:51
Point< TParametersValueType, Self::InputSpaceDimension > InputPointType
Vector< TParametersValueType, Self::OutputSpaceDimension > OutputVectorType
Matrix< TParametersValueType, Self::InputSpaceDimension, Self::OutputSpaceDimension > InverseMatrixType
Matrix< TParametersValueType, Self::OutputSpaceDimension, Self::InputSpaceDimension > MatrixType
typename InverseTransformBaseType::Pointer InverseTransformBasePointer
vnl_matrix_fixed< ParametersValueType, VInputDimension, VOutputDimension > InverseJacobianPositionType
Array2D< ParametersValueType > JacobianType
Rigid3DTransform(unsigned int paramDim)
vnl_matrix_fixed< ParametersValueType, VOutputDimension, VInputDimension > JacobianPositionType
Implements transparent reference counting.
OptimizerParameters< ParametersValueType > ParametersType
OptimizerParameters< FixedParametersValueType > FixedParametersType
Matrix< TParametersValueType, Self::OutputSpaceDimension, Self::InputSpaceDimension > MatrixType
Point< TParametersValueType, VOutputDimension > OutputPointType
CovariantVector< TParametersValueType, VOutputDimension > OutputCovariantVectorType
vnl_vector_fixed< TParametersValueType, VInputDimension > InputVnlVectorType
Point< TParametersValueType, VInputDimension > InputPointType
CovariantVector< TParametersValueType, VInputDimension > InputCovariantVectorType
Vector< TParametersValueType, VInputDimension > InputVectorType
Vector< TParametersValueType, VOutputDimension > OutputVectorType
vnl_vector_fixed< TParametersValueType, VOutputDimension > OutputVnlVectorType
void ComputeMatrixParameters() override
VersorTransform(unsigned int parametersDimension)
static constexpr unsigned int ParametersDimension
void PrintSelf(std::ostream &os, Indent indent) const override
static constexpr unsigned int InputSpaceDimension
void SetVarVersor(const VersorType &newVersor)
InverseTransformBasePointer GetInverseTransform() const override
vnl_quaternion< TParametersValueType > VnlQuaternionType
Array2D< ParametersValueType > JacobianType
void ComputeJacobianWithRespectToParameters(const InputPointType &p, JacobianType &jacobian) const override
void SetParameters(const ParametersType &parameters) override
void ComputeMatrix() override
void SetRotation(const VersorType &versor)
~VersorTransform() override=default
static constexpr unsigned int OutputSpaceDimension
void SetRotation(const AxisType &axis, AngleType angle)
typename InverseTransformBaseType::Pointer InverseTransformBasePointer
Rigid3DTransform< TParametersValueType > Superclass
const ParametersType & GetParameters() const override
typename ParametersType::ValueType ParametersValueType
void SetIdentity() override
A templated class holding a unit quaternion.
Definition itkVersor.h:53
Vector< TParametersValueType, 3 > VectorType
Definition itkVersor.h:66
TParametersValueType ValueType
Definition itkVersor.h:60
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....