ITK  6.0.0
Insight Toolkit
itkQuaternionRigidTransform.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 itkQuaternionRigidTransform_h
19#define itkQuaternionRigidTransform_h
20
21#include <iostream>
22#include "itkRigid3DTransform.h"
23#include "vnl/vnl_quaternion.h"
24
25namespace itk
26{
47template <typename TParametersValueType = double>
48class ITK_TEMPLATE_EXPORT QuaternionRigidTransform : public Rigid3DTransform<TParametersValueType>
49{
50public:
51 ITK_DISALLOW_COPY_AND_MOVE(QuaternionRigidTransform);
52
58
60 itkNewMacro(Self);
61
63 itkOverrideGetNameOfClassMacro(QuaternionRigidTransform);
64
66 static constexpr unsigned int InputSpaceDimension = 3;
67 static constexpr unsigned int OutputSpaceDimension = 3;
68 static constexpr unsigned int SpaceDimension = 3;
69 static constexpr unsigned int ParametersDimension = 7;
70
72 using typename Superclass::ParametersType;
76 using typename Superclass::JacobianType;
79 using typename Superclass::ScalarType;
80 using typename Superclass::InputPointType;
81 using typename Superclass::OutputPointType;
82 using typename Superclass::InputVectorType;
83 using typename Superclass::OutputVectorType;
85 using typename Superclass::InputVnlVectorType;
89 using typename Superclass::MatrixType;
90 using typename Superclass::InverseMatrixType;
91 using typename Superclass::CenterType;
92 using typename Superclass::OffsetType;
93 using typename Superclass::TranslationType;
94
96 using VnlQuaternionType = vnl_quaternion<TParametersValueType>;
97
103 void
105
109 const VnlQuaternionType &
111 {
112 return m_Rotation;
113 }
114
116 void
117 SetIdentity() override;
118
124 void
125 SetParameters(const ParametersType & parameters) override;
126
127 const ParametersType &
128 GetParameters() const override;
129
135 void
137
138protected:
139#if !defined(ITK_LEGACY_REMOVE)
140 [[deprecated("Removed unused constructor")]] QuaternionRigidTransform(const MatrixType & matrix,
141 const OutputVectorType & offset);
142#endif
143 QuaternionRigidTransform(unsigned int parametersDimension);
145 ~QuaternionRigidTransform() override = default;
146
147 void
148 ComputeMatrix() override;
149
150 void
152
153 void
155 {
156 m_Rotation = rotation;
157 }
158
159 const InverseMatrixType &
161
162 void
163 PrintSelf(std::ostream & os, Indent indent) const override;
164
165private:
167 VnlQuaternionType m_Rotation{};
168}; // class QuaternionRigidTransform
169} // namespace itk
170
171#ifndef ITK_MANUAL_INSTANTIATION
172# include "itkQuaternionRigidTransform.hxx"
173#endif
174
175#endif /* itkQuaternionRigidTransform_h */
Array2D class representing a 2D array.
Definition: itkArray2D.h:43
A templated class holding a n-Dimensional covariant vector.
Control indentation during Print() invocation.
Definition: itkIndent.h:50
A templated class holding a M x N size Matrix.
Definition: itkMatrix.h:53
Class to hold and manage different parameter types used during optimization.
A templated class holding a geometric point in n-Dimensional space.
Definition: itkPoint.h:54
QuaternionRigidTransform of a vector space (e.g. space coordinates).
void SetParameters(const ParametersType &parameters) override
void ComputeMatrixParameters() override
const ParametersType & GetParameters() const override
~QuaternionRigidTransform() override=default
void PrintSelf(std::ostream &os, Indent indent) const override
const InverseMatrixType & GetInverseMatrix() const
const VnlQuaternionType & GetRotation() const
vnl_quaternion< TParametersValueType > VnlQuaternionType
void SetRotation(const VnlQuaternionType &rotation)
void ComputeJacobianWithRespectToParameters(const InputPointType &p, JacobianType &jacobian) const override
QuaternionRigidTransform(unsigned int parametersDimension)
void SetVarRotation(const VnlQuaternionType &rotation)
Rigid3DTransform of a vector space (e.g. space coordinates)
vnl_vector_fixed< TParametersValueType, Self::InputSpaceDimension > InputVnlVectorType
vnl_vector_fixed< TParametersValueType, Self::OutputSpaceDimension > OutputVnlVectorType
typename OutputVectorType::ValueType OutputVectorValueType
vnl_matrix_fixed< ParametersValueType, VOutputDimension, VInputDimension > JacobianPositionType
Definition: itkTransform.h:131
vnl_matrix_fixed< ParametersValueType, VInputDimension, VOutputDimension > InverseJacobianPositionType
Definition: itkTransform.h:132
ParametersValueType ScalarType
Definition: itkTransform.h:127
A templated class holding a n-Dimensional vector.
Definition: itkVector.h:63
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....