ITK  4.6.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 TScalar = double >
48 // Data type for scalars (float or double)
50  public Rigid3DTransform< TScalar >
51 {
52 public:
58 
60  itkNewMacro(Self);
61 
64 
66  itkStaticConstMacro(InputSpaceDimension, unsigned int, 3);
67  itkStaticConstMacro(OutputSpaceDimension, unsigned int, 3);
68  itkStaticConstMacro(SpaceDimension, unsigned int, 3);
69  itkStaticConstMacro(ParametersDimension, unsigned int, 7);
71 
91 
93  typedef vnl_quaternion<TScalar> VnlQuaternionType;
94 
100  void SetRotation(const VnlQuaternionType & rotation);
101 
105  const VnlQuaternionType & GetRotation(void) const
106  {
107  return m_Rotation;
108  }
109 
111  virtual void SetIdentity(void);
112 
118  void SetParameters(const ParametersType & parameters);
119 
120  virtual const ParametersType & GetParameters() const;
121 
127  virtual void ComputeJacobianWithRespectToParameters( const InputPointType & p, JacobianType & jacobian) const;
128 
129 protected:
130  QuaternionRigidTransform(const MatrixType & matrix, const OutputVectorType & offset);
131  QuaternionRigidTransform(unsigned int paramDims);
134  {
135  }
136 
137  void ComputeMatrix();
138 
140 
141  void SetVarRotation(const VnlQuaternionType & rotation)
142  {
143  m_Rotation = rotation;
144  }
145 
146  const InverseMatrixType & GetInverseMatrix(void) const;
147 
148  void PrintSelf(std::ostream & os, Indent indent) const;
149 
150 private:
151  QuaternionRigidTransform(const Self &); // purposely not implemented
152  void operator=(const Self &); // purposely not implemented
153 
156 }; // class QuaternionRigidTransform
157 } // namespace itk
158 
159 #ifndef ITK_MANUAL_INSTANTIATION
160 #include "itkQuaternionRigidTransform.hxx"
161 #endif
162 
163 #endif /* __itkQuaternionRigidTransform_h */
void SetRotation(const VnlQuaternionType &rotation)
Superclass::InputVectorType InputVectorType
Light weight base class for most itk classes.
Superclass::OutputVectorType OutputVectorType
Superclass::InputPointType InputPointType
virtual const ParametersType & GetParameters() const
Rigid3DTransform of a vector space (e.g. space coordinates)
SmartPointer< const Self > ConstPointer
Superclass::OutputCovariantVectorType OutputCovariantVectorType
static const unsigned int OutputSpaceDimension
void PrintSelf(std::ostream &os, Indent indent) const
Superclass::OutputCovariantVectorType OutputCovariantVectorType
void SetVarRotation(const VnlQuaternionType &rotation)
Superclass::TranslationType TranslationType
static const unsigned int ParametersDimension
vnl_quaternion< TScalar > VnlQuaternionType
Superclass::ScalarType ScalarType
const VnlQuaternionType & GetRotation(void) const
Superclass::InputVnlVectorType InputVnlVectorType
Superclass::ParametersType ParametersType
Superclass::InputVnlVectorType InputVnlVectorType
Superclass::TranslationType TranslationType
QuaternionRigidTransform of a vector space (e.g. space coordinates).
Superclass::InputCovariantVectorType InputCovariantVectorType
const InverseMatrixType & GetInverseMatrix(void) const
Superclass::InputVectorType InputVectorType
Superclass::OutputVectorType OutputVectorType
Superclass::OutputPointType OutputPointType
Superclass::MatrixType MatrixType
static const unsigned int InputSpaceDimension
Superclass::OutputVectorValueType OutputVectorValueType
Superclass::JacobianType JacobianType
Superclass::OutputPointType OutputPointType
Superclass::OutputVnlVectorType OutputVnlVectorType
virtual void ComputeJacobianWithRespectToParameters(const InputPointType &p, JacobianType &jacobian) const
Superclass::ParametersType ParametersType
Superclass::CenterType CenterType
void SetParameters(const ParametersType &parameters)
void operator=(const Self &)
Superclass::OutputVectorValueType OutputVectorValueType
Superclass::InputPointType InputPointType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Superclass::ParametersValueType ParametersValueType
static const unsigned int SpaceDimension
Superclass::OffsetType OffsetType
Superclass::InputCovariantVectorType InputCovariantVectorType
Superclass::InverseMatrixType InverseMatrixType
Superclass::ParametersValueType ParametersValueType
Superclass::OutputVnlVectorType OutputVnlVectorType
Superclass::InverseMatrixType InverseMatrixType
Rigid3DTransform< TScalar > Superclass
virtual void SetIdentity(void)