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: 2005/05/03 14:19:23 $
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 __itkQuaternionRigidTransform_h
00018 #define __itkQuaternionRigidTransform_h
00019 
00020 #include <iostream>
00021 #include "itkRigid3DTransform.h"
00022 #include "vnl/vnl_quaternion.h"
00023 
00024 namespace itk
00025 {
00026 
00033 template < class TScalarType=double >    // Data type for scalars (float or double)
00034 class ITK_EXPORT QuaternionRigidTransform :
00035         public Rigid3DTransform< TScalarType > 
00036 {
00037 public:
00039   typedef QuaternionRigidTransform            Self;
00040   typedef Rigid3DTransform< TScalarType >     Superclass;
00041   typedef SmartPointer<Self>                  Pointer;
00042   typedef SmartPointer<const Self>            ConstPointer;
00043   
00045   itkNewMacro( Self );
00046 
00048   itkTypeMacro( QuaternionRigidTransform, Rigid3DTransform );
00049 
00051   itkStaticConstMacro(InputSpaceDimension, unsigned int, 3);
00052   itkStaticConstMacro(OutputSpaceDimension, unsigned int, 3);
00053   itkStaticConstMacro(SpaceDimension, unsigned int, 3);
00054   itkStaticConstMacro(ParametersDimension, unsigned int, 7);
00055 
00057   typedef typename Superclass::ParametersType         ParametersType;
00058   typedef typename Superclass::JacobianType           JacobianType;
00059   typedef typename Superclass::ScalarType             ScalarType;
00060   typedef typename Superclass::InputPointType         InputPointType;
00061   typedef typename Superclass::OutputPointType        OutputPointType;
00062   typedef typename Superclass::InputVectorType        InputVectorType;
00063   typedef typename Superclass::OutputVectorType       OutputVectorType;
00064   typedef typename Superclass::InputVnlVectorType     InputVnlVectorType;
00065   typedef typename Superclass::OutputVnlVectorType    OutputVnlVectorType;
00066   typedef typename Superclass::InputCovariantVectorType 
00067                                                       InputCovariantVectorType;
00068   typedef typename Superclass::OutputCovariantVectorType      
00069                                                       OutputCovariantVectorType;
00070   typedef typename Superclass::MatrixType             MatrixType;
00071   typedef typename Superclass::InverseMatrixType      InverseMatrixType;
00072   typedef typename Superclass::CenterType             CenterType;
00073   typedef typename Superclass::OffsetType             OffsetType;
00074   typedef typename Superclass::TranslationType        TranslationType;
00075 
00076 
00078   typedef vnl_quaternion<TScalarType>           VnlQuaternionType;
00079 
00084   void SetRotation(const VnlQuaternionType &rotation);
00085 
00089   const VnlQuaternionType & GetRotation(void) const
00090     { return m_Rotation; }
00091 
00093   virtual void SetIdentity(void);
00094 
00100   void SetParameters( const ParametersType & parameters );
00101   virtual const ParametersType & GetParameters() const;
00102 
00108   const JacobianType & GetJacobian(const InputPointType  &point ) const;
00109 
00110 protected:
00111   QuaternionRigidTransform(const MatrixType &matrix,
00112                            const OutputVectorType &offset);
00113   QuaternionRigidTransform(unsigned int outputDims,
00114                            unsigned int paramDims);
00115   QuaternionRigidTransform();
00116   ~QuaternionRigidTransform(){};
00117 
00118   void ComputeMatrix();
00119 
00120   void ComputeMatrixParameters();
00121 
00122   void SetVarRotation(const VnlQuaternionType & rotation)
00123     { m_Rotation = rotation; };
00124 
00125   const InverseMatrixType & GetInverseMatrix( void ) const;
00126 
00127   void PrintSelf(std::ostream &os, Indent indent) const;
00128 
00129 private:
00130   QuaternionRigidTransform(const Self&); //purposely not implemented
00131   void operator=(const Self&); //purposely not implemented
00132 
00134   VnlQuaternionType   m_Rotation;
00135 
00136 }; //class QuaternionRigidTransform
00137 
00138 
00139 }  // namespace itk
00140 
00141 
00142 #ifndef ITK_MANUAL_INSTANTIATION
00143 #include "itkQuaternionRigidTransform.txx"
00144 #endif
00145 
00146 #endif /* __itkQuaternionRigidTransform_h */

Generated at Wed May 24 23:53:45 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000