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

itkQuaternionRigidTransform.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkQuaternionRigidTransform.h,v $
00005   Language:  C++
00006   Date:      $Date: 2002/09/11 19:57:13 $
00007   Version:   $Revision: 1.13 $
00008 
00009   Copyright (c) 2002 Insight 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 __itkQuaternionRigidTransform_h
00018 #define __itkQuaternionRigidTransform_h
00019 
00020 #include <iostream>
00021 #include "itkTransform.h"
00022 #include "vnl/vnl_quaternion.h"
00023 #include "itkPoint.h"
00024 #include "itkMatrix.h"
00025 
00026 namespace itk
00027 {
00028 
00035 template < class TScalarType=double >    // Data type for scalars (float or double)
00036 class ITK_EXPORT QuaternionRigidTransform :
00037         public Transform< TScalarType, 3, 3> // Dimensions of input and output spaces
00038 {
00039 public:
00041   typedef QuaternionRigidTransform Self;
00042   typedef Transform< TScalarType, 3, 3>     Superclass;
00043 
00044   typedef SmartPointer<Self>        Pointer;
00045   typedef SmartPointer<const Self>  ConstPointer;
00046   
00048   itkNewMacro( Self );
00049 
00051   itkTypeMacro( QuaternionRigidTransform, Transform );
00052 
00054   typedef typename Superclass::ScalarType  ScalarType;
00055 
00057   typedef typename Superclass::ParametersType  ParametersType;
00058   
00060   typedef typename Superclass::JacobianType  JacobianType;
00061 
00063   typedef vnl_quaternion<TScalarType>           VnlQuaternionType;
00064 
00066   itkStaticConstMacro(SpaceDimension, unsigned int, 3);
00067   itkStaticConstMacro(ParametersDimension, unsigned int, 7);
00068 
00070   itkStaticConstMacro(InputSpaceDimension, unsigned int,
00071                       Superclass::InputSpaceDimension);
00072   itkStaticConstMacro(OutputSpaceDimension, unsigned int,
00073                       Superclass::OutputSpaceDimension);
00074 
00076   typedef Matrix<ScalarType, itkGetStaticConstMacro(InputSpaceDimension), itkGetStaticConstMacro(InputSpaceDimension)> MatrixType;
00077 
00079   typedef Vector<TScalarType, itkGetStaticConstMacro(InputSpaceDimension)> OffsetType;
00080 
00082   typedef typename Superclass::InputPointType    InputPointType;
00083   typedef typename Superclass::OutputPointType   OutputPointType;
00084   
00088   const OffsetType & GetOffset(void) const
00089     { return m_Offset; }
00090 
00094   const VnlQuaternionType & GetRotation(void) const
00095     { return m_Rotation; }
00096 
00101   const MatrixType & GetRotationMatrix(void) const
00102     { return m_RotationMatrix; }
00103 
00108   void SetOffset(const OffsetType &offset)
00109     { m_Offset = offset; return; }
00110 
00114   void SetRotation(const VnlQuaternionType &rotation);
00115 
00120   OutputPointType     TransformPoint(const InputPointType  &point ) const;
00121 
00127   void SetParameters( const ParametersType & parameters );
00128 
00134   const JacobianType & GetJacobian(const InputPointType  &point ) const;
00135 
00136 protected:
00137   QuaternionRigidTransform();
00138   ~QuaternionRigidTransform(){};
00139   void PrintSelf(std::ostream &os, Indent indent) const;
00140 
00145    MatrixType          m_RotationMatrix;
00146 
00147 private:
00148   QuaternionRigidTransform(const Self&); //purposely not implemented
00149   void operator=(const Self&); //purposely not implemented
00150 
00152   OffsetType          m_Offset;
00153 
00155   VnlQuaternionType   m_Rotation;
00156 
00157 }; //class QuaternionRigidTransform
00158 
00159 
00160 }  // namespace itk
00161 
00162 
00163 #ifndef ITK_MANUAL_INSTANTIATION
00164 #include "itkQuaternionRigidTransform.txx"
00165 #endif
00166 
00167 #endif /* __itkQuaternionRigidTransform_h */

Generated at Wed Mar 12 01:13:09 2003 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000