ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
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:
52
58
60 itkNewMacro(Self);
61
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
99
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:
168}; // class QuaternionRigidTransform
169} // namespace itk
170
171#ifndef ITK_MANUAL_INSTANTIATION
172# include "itkQuaternionRigidTransform.hxx"
173#endif
174
175#endif /* itkQuaternionRigidTransform_h */
OptimizerParameters< FixedParametersValueType > FixedParametersType
TParametersValueType ParametersValueType
OptimizerParameters< ParametersValueType > ParametersType
itkOverrideGetNameOfClassMacro(TransformBaseTemplate)
ITK_DISALLOW_COPY_AND_MOVE(TransformBaseTemplate)
Control indentation during Print() invocation.
Definition itkIndent.h:50
Point< double, Self::InputSpaceDimension > InputPointType
Vector< double, Self::OutputSpaceDimension > OutputVectorType
Matrix< TParametersValueType, Self::InputSpaceDimension, Self::OutputSpaceDimension > InverseMatrixType
Matrix< double, Self::OutputSpaceDimension, Self::InputSpaceDimension > MatrixType
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
static constexpr unsigned int OutputSpaceDimension
Rigid3DTransform< TParametersValueType > Superclass
const VnlQuaternionType & GetRotation() const
vnl_quaternion< TParametersValueType > VnlQuaternionType
void SetRotation(const VnlQuaternionType &rotation)
void ComputeJacobianWithRespectToParameters(const InputPointType &p, JacobianType &jacobian) const override
static constexpr unsigned int InputSpaceDimension
static constexpr unsigned int ParametersDimension
static constexpr unsigned int SpaceDimension
QuaternionRigidTransform(unsigned int parametersDimension)
SmartPointer< const Self > ConstPointer
void SetVarRotation(const VnlQuaternionType &rotation)
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
OptimizerParameters< ParametersValueType > ParametersType
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
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....