Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkRigid3DTransform.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkRigid3DTransform.h,v $ 00005 Language: C++ 00006 Date: $Date: 2003/09/10 14:29:24 $ 00007 Version: $Revision: 1.27 $ 00008 00009 Copyright (c) Insight Software Consortium. All rights reserved. 00010 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 #ifndef __itkRigid3DTransform_h 00018 #define __itkRigid3DTransform_h 00019 00020 #include <iostream> 00021 #include "itkTransform.h" 00022 #include "itkExceptionObject.h" 00023 #include "vnl/vnl_quaternion.h" 00024 #include "itkMatrix.h" 00025 #include "itkVersor.h" 00026 00027 namespace itk 00028 { 00029 00036 template < class TScalarType=double > // Data type for scalars (float or double) 00037 class ITK_EXPORT Rigid3DTransform : 00038 public Transform< TScalarType, 3, 3> // Dimensions of input and output spaces 00039 { 00040 public: 00042 typedef Rigid3DTransform Self; 00043 typedef Transform< TScalarType, 3, 3 > Superclass; 00044 typedef SmartPointer<Self> Pointer; 00045 typedef SmartPointer<const Self> ConstPointer; 00046 00048 itkTypeMacro( Rigid3DTransform, Transform ); 00049 00051 itkNewMacro( Self ); 00052 00054 itkStaticConstMacro(InputSpaceDimension, unsigned int, 3); 00055 itkStaticConstMacro(OutputSpaceDimension, unsigned int, 3); 00056 itkStaticConstMacro(ParametersDimension, unsigned int, 6); 00057 00059 typedef typename Superclass::ScalarType ScalarType; 00060 00062 typedef typename Superclass::ParametersType ParametersType; 00063 00065 typedef typename Superclass::JacobianType JacobianType; 00066 00068 typedef Matrix<ScalarType, itkGetStaticConstMacro(InputSpaceDimension), itkGetStaticConstMacro(InputSpaceDimension)> MatrixType; 00069 00071 typedef Vector<TScalarType, itkGetStaticConstMacro(InputSpaceDimension)> OffsetType; 00072 00074 typedef Vector<TScalarType, itkGetStaticConstMacro(InputSpaceDimension)> InputVectorType; 00075 typedef Vector<TScalarType, itkGetStaticConstMacro(OutputSpaceDimension)> OutputVectorType; 00076 00078 typedef CovariantVector<TScalarType, itkGetStaticConstMacro(InputSpaceDimension)> InputCovariantVectorType; 00079 typedef CovariantVector<TScalarType, itkGetStaticConstMacro(OutputSpaceDimension)> OutputCovariantVectorType; 00080 00082 typedef vnl_vector_fixed<TScalarType, itkGetStaticConstMacro(InputSpaceDimension)> InputVnlVectorType; 00083 typedef vnl_vector_fixed<TScalarType, itkGetStaticConstMacro(OutputSpaceDimension)> OutputVnlVectorType; 00084 00086 typedef Point<TScalarType, itkGetStaticConstMacro(InputSpaceDimension)> InputPointType; 00087 typedef Point<TScalarType, itkGetStaticConstMacro(OutputSpaceDimension)> OutputPointType; 00088 00090 typedef vnl_quaternion<TScalarType> VnlQuaternionType; 00091 00093 typedef Versor<TScalarType> VersorType; 00094 00095 00102 itkGetConstMacro( Offset, OffsetType ); 00103 00110 itkGetConstMacro( RotationMatrix, MatrixType ); 00111 00112 00119 itkSetMacro( Offset, OffsetType ); 00120 00121 00131 void SetRotationMatrix(const MatrixType &matrix); 00132 00133 00138 void Compose(const Self *other, bool pre=false); 00139 00140 00148 void Translate(const OffsetType &offset, bool pre=false); 00149 00150 00158 OutputPointType TransformPoint(const InputPointType &point ) const; 00159 OutputVectorType TransformVector(const InputVectorType &vector) const; 00160 OutputVnlVectorType TransformVector(const InputVnlVectorType &vector) const; 00161 00162 OutputCovariantVectorType TransformCovariantVector( 00163 const InputCovariantVectorType &vector) const; 00164 00172 inline InputPointType BackTransform(const OutputPointType &point ) const; 00173 inline InputVectorType BackTransform(const OutputVectorType &vector) const; 00174 inline InputVnlVectorType BackTransform(const OutputVnlVectorType &vector) const; 00175 00176 inline InputCovariantVectorType BackTransform( 00177 const OutputCovariantVectorType &vector) const; 00178 00186 Pointer Inverse( void ) const; 00187 00189 void SetIdentity(void); 00190 00192 virtual const JacobianType & GetJacobian(const InputPointType &point ) const; 00193 00194 protected: 00195 Rigid3DTransform(); 00196 ~Rigid3DTransform(); 00197 00198 00202 void PrintSelf(std::ostream &os, Indent indent) const; 00203 00204 Rigid3DTransform(unsigned int SpaceDimension, unsigned int ParametersDimension); 00205 // matrix representation of the rotation 00206 // Should be protected in order to be modified 00207 // by derived classes that instantiate an interface 00208 // to rotation computation 00209 MatrixType m_RotationMatrix; 00210 00211 // representation of the inverse rottion 00212 MatrixType m_InverseMatrix; 00213 00214 private: 00215 Rigid3DTransform(const Self&); //purposely not implemented 00216 void operator=(const Self&); //purposely not implemented 00217 00218 // Offset of the transformation 00219 OffsetType m_Offset; 00220 00221 }; //class Rigid3DTransform 00222 00223 00224 } // namespace itk 00225 00226 00227 #ifndef ITK_MANUAL_INSTANTIATION 00228 #include "itkRigid3DTransform.txx" 00229 #endif 00230 00231 #endif /* __itkRigid3DTransform_h */

Generated at Sat Mar 31 02:28:09 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000