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:
51
57
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;
74 using typename Superclass::JacobianType;
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;
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;
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
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);
145
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:
170}; // class VersorTransform
171} // namespace itk
172
173#ifndef ITK_MANUAL_INSTANTIATION
174# include "itkVersorTransform.hxx"
175#endif
176
177#endif /* itkVersorTransform_h */
OptimizerParameters< FixedParametersValueType > FixedParametersType
itkGetConstReferenceMacro(InputSpaceName, std::string)
OptimizerParameters< ParametersValueType > ParametersType
itkOverrideGetNameOfClassMacro(TransformBaseTemplate)
ITK_DISALLOW_COPY_AND_MOVE(TransformBaseTemplate)
Control indentation during Print() invocation.
Definition itkIndent.h:50
Point< TParametersValueType, Self::InputSpaceDimension > InputPointType
Vector< TParametersValueType, Self::OutputSpaceDimension > OutputVectorType
Matrix< TParametersValueType, Self::InputSpaceDimension, Self::OutputSpaceDimension > InverseMatrixType
Matrix< TParametersValueType, Self::OutputSpaceDimension, Self::InputSpaceDimension > MatrixType
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.
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)
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)
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....