ITK  4.9.0
Insight Segmentation and Registration Toolkit
itkQuaternionRigidTransform.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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 #ifndef itkQuaternionRigidTransform_h
19 #define itkQuaternionRigidTransform_h
20 
21 #include <iostream>
22 #include "itkRigid3DTransform.h"
23 #include "vnl/vnl_quaternion.h"
24 
25 namespace itk
26 {
47 template<typename TParametersValueType=double>
49  public Rigid3DTransform<TParametersValueType>
50 {
51 public:
57 
59  itkNewMacro(Self);
60 
63 
65  itkStaticConstMacro(InputSpaceDimension, unsigned int, 3);
66  itkStaticConstMacro(OutputSpaceDimension, unsigned int, 3);
67  itkStaticConstMacro(SpaceDimension, unsigned int, 3);
68  itkStaticConstMacro(ParametersDimension, unsigned int, 7);
70 
92 
94  typedef vnl_quaternion<TParametersValueType> VnlQuaternionType;
95 
101  void SetRotation(const VnlQuaternionType & rotation);
102 
106  const VnlQuaternionType & GetRotation(void) const
107  {
108  return m_Rotation;
109  }
110 
112  virtual void SetIdentity(void) ITK_OVERRIDE;
113 
119  void SetParameters(const ParametersType & parameters) ITK_OVERRIDE;
120 
121  virtual const ParametersType & GetParameters() const ITK_OVERRIDE;
122 
128  virtual void ComputeJacobianWithRespectToParameters( const InputPointType & p, JacobianType & jacobian) const ITK_OVERRIDE;
129 
130 protected:
131  QuaternionRigidTransform(const MatrixType & matrix, const OutputVectorType & offset);
132  QuaternionRigidTransform(unsigned int paramDims);
135  {
136  }
137 
138  void ComputeMatrix() ITK_OVERRIDE;
139 
140  void ComputeMatrixParameters() ITK_OVERRIDE;
141 
142  void SetVarRotation(const VnlQuaternionType & rotation)
143  {
144  m_Rotation = rotation;
145  }
146 
147  const InverseMatrixType & GetInverseMatrix() const;
148 
149  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
150 
151 private:
152  QuaternionRigidTransform(const Self &) ITK_DELETE_FUNCTION;
153  void operator=(const Self &) ITK_DELETE_FUNCTION;
154 
157 }; // class QuaternionRigidTransform
158 } // namespace itk
159 
160 #ifndef ITK_MANUAL_INSTANTIATION
161 #include "itkQuaternionRigidTransform.hxx"
162 #endif
163 
164 #endif /* itkQuaternionRigidTransform_h */
Superclass::InputCovariantVectorType InputCovariantVectorType
Superclass::ParametersType ParametersType
void SetParameters(const ParametersType &parameters) override
Superclass::FixedParametersType FixedParametersType
void PrintSelf(std::ostream &os, Indent indent) const override
Superclass::TranslationType TranslationType
Superclass::InverseMatrixType InverseMatrixType
Light weight base class for most itk classes.
Superclass::CenterType CenterType
virtual void SetIdentity(void) override
Rigid3DTransform of a vector space (e.g. space coordinates)
Superclass::InputVectorType InputVectorType
Superclass::OutputVectorValueType OutputVectorValueType
Superclass::FixedParametersType FixedParametersType
Superclass::InputCovariantVectorType InputCovariantVectorType
Superclass::OutputVnlVectorType OutputVnlVectorType
Superclass::MatrixType MatrixType
Superclass::OutputVectorType OutputVectorType
Superclass::InputVnlVectorType InputVnlVectorType
vnl_quaternion< TParametersValueType > VnlQuaternionType
Superclass::OutputPointType OutputPointType
Superclass::InputVectorType InputVectorType
void ComputeMatrixParameters() override
Superclass::OutputVectorValueType OutputVectorValueType
Superclass::TranslationType TranslationType
static const unsigned int InputSpaceDimension
Superclass::OutputCovariantVectorType OutputCovariantVectorType
Superclass::InverseMatrixType InverseMatrixType
QuaternionRigidTransform of a vector space (e.g. space coordinates).
Superclass::OutputPointType OutputPointType
SmartPointer< const Self > ConstPointer
Superclass::OutputVectorType OutputVectorType
Superclass::OutputCovariantVectorType OutputCovariantVectorType
Superclass::ParametersValueType ParametersValueType
Superclass::JacobianType JacobianType
void SetRotation(const VnlQuaternionType &rotation)
Superclass::ParametersValueType ParametersValueType
Superclass::InputPointType InputPointType
void SetVarRotation(const VnlQuaternionType &rotation)
Superclass::InputVnlVectorType InputVnlVectorType
virtual const ParametersType & GetParameters() const override
static const unsigned int OutputSpaceDimension
const InverseMatrixType & GetInverseMatrix() const
static const unsigned int SpaceDimension
Superclass::OffsetType OffsetType
virtual void ComputeJacobianWithRespectToParameters(const InputPointType &p, JacobianType &jacobian) const override
const VnlQuaternionType & GetRotation(void) const
Superclass::ParametersType ParametersType
Superclass::FixedParametersValueType FixedParametersValueType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Superclass::ScalarType ScalarType
Superclass::InputPointType InputPointType
Rigid3DTransform< TParametersValueType > Superclass
static const unsigned int ParametersDimension
Superclass::OutputVnlVectorType OutputVnlVectorType
Superclass::FixedParametersValueType FixedParametersValueType