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

itkVersorTransform.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkVersorTransform.h,v $
00005   Language:  C++
00006   Date:      $Date: 2006/03/19 04:36:59 $
00007   Version:   $Revision: 1.15 $
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 
00018 #ifndef __itkVersorTransform_h
00019 #define __itkVersorTransform_h
00020 
00021 #include <iostream>
00022 #include "itkRigid3DTransform.h"
00023 #include "vnl/vnl_quaternion.h"
00024 #include "itkVersor.h"
00025 
00026 namespace itk
00027 {
00028 
00038 template < class TScalarType=double >//Data type for scalars (float or double)
00039 class ITK_EXPORT VersorTransform : public Rigid3DTransform< TScalarType > 
00040 {
00041 public:
00042 
00044   typedef VersorTransform                   Self;
00045   typedef Rigid3DTransform< TScalarType >   Superclass;
00046   typedef SmartPointer<Self>                Pointer;
00047   typedef SmartPointer<const Self>          ConstPointer;
00048 
00050   itkTypeMacro( VersorTransform, Rigid3DTransform );
00051 
00053   itkNewMacro( Self );
00054 
00056   itkStaticConstMacro(SpaceDimension, unsigned int, 3);
00057   itkStaticConstMacro(InputSpaceDimension, unsigned int, 3);
00058   itkStaticConstMacro(OutputSpaceDimension, unsigned int, 3);
00059   itkStaticConstMacro(ParametersDimension, unsigned int, 3);
00061 
00063   typedef typename Superclass::ParametersType         ParametersType;
00064   typedef typename Superclass::JacobianType           JacobianType;
00065   typedef typename Superclass::ScalarType             ScalarType;
00066   typedef typename Superclass::InputPointType         InputPointType;
00067   typedef typename Superclass::OutputPointType        OutputPointType;
00068   typedef typename Superclass::InputVectorType        InputVectorType;
00069   typedef typename Superclass::OutputVectorType       OutputVectorType;
00070   typedef typename Superclass::InputVnlVectorType     InputVnlVectorType;
00071   typedef typename Superclass::OutputVnlVectorType    OutputVnlVectorType;
00072   typedef typename Superclass::InputCovariantVectorType 
00073                                                       InputCovariantVectorType;
00074   typedef typename Superclass::OutputCovariantVectorType
00075                                                       OutputCovariantVectorType;
00076   typedef typename Superclass::MatrixType             MatrixType;
00077   typedef typename Superclass::InverseMatrixType      InverseMatrixType;
00078   typedef typename Superclass::CenterType             CenterType;
00079   typedef typename Superclass::OffsetType             OffsetType;
00080 
00082   typedef vnl_quaternion<TScalarType>                 VnlQuaternionType;
00083 
00085   typedef Versor<TScalarType>                   VersorType;
00086   typedef typename VersorType::VectorType       AxisType;
00087   typedef typename VersorType::ValueType        AngleType;
00088 
00097   void SetParameters( const ParametersType & parameters );
00098 
00100   const ParametersType& GetParameters(void) const;
00101 
00103   void SetRotation( const VersorType & versor );
00104   void SetRotation( const AxisType & axis, AngleType angle );
00105   itkGetConstReferenceMacro(Versor, VersorType);
00107 
00109   virtual void SetIdentity(void);
00110 
00116   const JacobianType & GetJacobian(const InputPointType  &point ) const;
00117 
00118 protected:
00119 
00121   VersorTransform(const MatrixType &matrix,
00122                   const OutputVectorType &offset);
00123   VersorTransform(unsigned int outputDims,
00124                   unsigned int paramDims);
00125   VersorTransform();
00127 
00129   ~VersorTransform(){};
00130 
00133   virtual void SetRotationMatrix(const MatrixType & matrix)
00134     { this->Superclass::SetRotationMatrix( matrix ); }
00135 
00136   void SetVarVersor(const VersorType & newVersor)
00137     { m_Versor = newVersor; }
00138 
00140   void PrintSelf(std::ostream &os, Indent indent) const;
00141 
00144   void ComputeMatrix(void);
00145   void ComputeMatrixParameters(void);
00147 
00148 private:
00150   VersorTransform(const Self & other); // Not implemented
00151 
00153   const Self & operator=( const Self & ); // Not implemented
00154 
00156   VersorType    m_Versor;
00157 
00158 }; //class VersorTransform
00159 
00160 
00161 }  // namespace itk
00162 
00163 
00164 #ifndef ITK_MANUAL_INSTANTIATION
00165 #include "itkVersorTransform.txx"
00166 #endif
00167 
00168 #endif /* __itkVersorTransform_h */
00169 

Generated at Fri Sep 8 04:20:06 2006 for ITK by doxygen 1.4.7 written by Dimitri van Heesch, © 1997-2000