go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkAdvancedVersorTransform.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright UMC Utrecht and contributors
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 * http://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/*=========================================================================
19
20 Program: Insight Segmentation & Registration Toolkit
21 Module: $RCSfile: itkAdvancedVersorTransform.h,v $
22 Date: $Date: 2006-08-09 04:35:32 $
23 Version: $Revision: 1.17 $
24
25 Copyright (c) Insight Software Consortium. All rights reserved.
26 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
27
28 This software is distributed WITHOUT ANY WARRANTY; without even
29 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
30 PURPOSE. See the above copyright notices for more information.
31
32=========================================================================*/
33#ifndef itkAdvancedVersorTransform_h
34#define itkAdvancedVersorTransform_h
35
36#include <iostream>
38#include <vnl/vnl_quaternion.h>
39#include "itkVersor.h"
40
41namespace itk
42{
43
65template <class TScalarType = double>
66// Data type for scalars (float or double)
67class ITK_TEMPLATE_EXPORT AdvancedVersorTransform : public AdvancedRigid3DTransform<TScalarType>
68{
69public:
73 using Pointer = SmartPointer<Self>;
74 using ConstPointer = SmartPointer<const Self>;
75
78
80 itkNewMacro(Self);
81
83 itkStaticConstMacro(SpaceDimension, unsigned int, 3);
84 itkStaticConstMacro(InputSpaceDimension, unsigned int, 3);
85 itkStaticConstMacro(OutputSpaceDimension, unsigned int, 3);
86 itkStaticConstMacro(ParametersDimension, unsigned int, 3);
87
89 using typename Superclass::ParametersType;
90 using typename Superclass::NumberOfParametersType;
91 using typename Superclass::JacobianType;
92 using typename Superclass::ScalarType;
93 using typename Superclass::InputPointType;
94 using typename Superclass::OutputPointType;
95 using typename Superclass::InputVectorType;
96 using typename Superclass::OutputVectorType;
97 using typename Superclass::InputVnlVectorType;
98 using typename Superclass::OutputVnlVectorType;
99 using typename Superclass::InputCovariantVectorType;
100 using typename Superclass::OutputCovariantVectorType;
101 using typename Superclass::MatrixType;
102 using typename Superclass::InverseMatrixType;
103 using typename Superclass::CenterType;
104 using typename Superclass::OffsetType;
105
111 using typename Superclass::InternalMatrixType;
112
114 using VnlQuaternionType = vnl_quaternion<TScalarType>;
115
117 using VersorType = Versor<TScalarType>;
118 using AxisType = typename VersorType::VectorType;
119 using AngleType = typename VersorType::ValueType;
120
129 void
130 SetParameters(const ParametersType & parameters) override;
131
133 const ParametersType &
134 GetParameters() const override;
135
137 void
138 SetRotation(const VersorType & versor);
139
140 void
141 SetRotation(const AxisType & axis, AngleType angle);
142
143 itkGetConstReferenceMacro(Versor, VersorType);
144
146 void
147 SetIdentity() override;
148
150 void
151 GetJacobian(const InputPointType &, JacobianType &, NonZeroJacobianIndicesType &) const override;
152
153protected:
155 AdvancedVersorTransform(const MatrixType & matrix, const OutputVectorType & offset);
156 AdvancedVersorTransform(unsigned int paramDims);
158
160 ~AdvancedVersorTransform() override = default;
161
162 void
163 SetVarVersor(const VersorType & newVersor)
164 {
165 m_Versor = newVersor;
166 }
167
169 void
170 PrintSelf(std::ostream & os, Indent indent) const override;
171
174 void
175 ComputeMatrix() override;
176
177 void
179
180private:
182 AdvancedVersorTransform(const Self & other); // Not implemented
183
185 const Self &
186 operator=(const Self &); // Not implemented
187
189 VersorType m_Versor{};
190};
191
192// class AdvancedVersorTransform
193
194} // namespace itk
195
196#ifndef ITK_MANUAL_INSTANTIATION
197# include "itkAdvancedVersorTransform.hxx"
198#endif
199
200#endif /* itkAdvancedVersorTransform_h */
AdvancedRigid3DTransform of a vector space (e.g. space coordinates)
Matrix< TScalarType, Self::InputSpaceDimension, Self::OutputSpaceDimension > InverseMatrixType
Matrix< TScalarType, Self::OutputSpaceDimension, Self::InputSpaceDimension > MatrixType
typename SpatialJacobianType::InternalMatrixType InternalMatrixType
FixedArray< Matrix< ScalarType, InputSpaceDimension, InputSpaceDimension >, OutputSpaceDimension > SpatialHessianType
Matrix< ScalarType, OutputSpaceDimension, InputSpaceDimension > SpatialJacobianType
AdvancedVersorTransform(unsigned int paramDims)
typename VersorType::ValueType AngleType
typename VersorType::VectorType AxisType
~AdvancedVersorTransform() override=default
void PrintSelf(std::ostream &os, Indent indent) const override
AdvancedVersorTransform(const Self &other)
SmartPointer< const Self > ConstPointer
const Self & operator=(const Self &)
void GetJacobian(const InputPointType &, JacobianType &, NonZeroJacobianIndicesType &) const override
const ParametersType & GetParameters() const override
AdvancedVersorTransform(const MatrixType &matrix, const OutputVectorType &offset)
itkStaticConstMacro(OutputSpaceDimension, unsigned int, 3)
void SetRotation(const AxisType &axis, AngleType angle)
itkStaticConstMacro(InputSpaceDimension, unsigned int, 3)
itkStaticConstMacro(ParametersDimension, unsigned int, 3)
itkStaticConstMacro(SpaceDimension, unsigned int, 3)
void ComputeMatrix() override
void ComputeMatrixParameters() override
vnl_quaternion< TScalarType > VnlQuaternionType
void SetParameters(const ParametersType &parameters) override
void SetVarVersor(const VersorType &newVersor)
Matrix< TScalarType, Self::OutputSpaceDimension, Self::InputSpaceDimension > MatrixType


Generated on 2024-07-17 for elastix by doxygen 1.11.0 (9b424b03c9833626cd435af22a444888fbbb192d) elastix logo