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

itkEuler3DTransform.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkEuler3DTransform.h,v $
00005   Language:  C++
00006   Date:      $Date: 2007/01/30 20:56:07 $
00007   Version:   $Revision: 1.13 $
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 __itkEuler3DTransform_h
00018 #define __itkEuler3DTransform_h
00019 
00020 #include <iostream>
00021 #include "itkRigid3DTransform.h"
00022 
00023 namespace itk
00024 {
00025 
00044 template < class TScalarType=double >    // Data type for scalars (float or double)
00045 class ITK_EXPORT Euler3DTransform : 
00046             public Rigid3DTransform< TScalarType > 
00047 {
00048 public:
00050   typedef Euler3DTransform                  Self;
00051   typedef Rigid3DTransform< TScalarType >   Superclass;
00052   typedef SmartPointer<Self>                Pointer;
00053   typedef SmartPointer<const Self>          ConstPointer;
00054 
00056   itkNewMacro( Self );
00057 
00059   itkTypeMacro( Euler3DTransform, Rigid3DTransform );
00060 
00062   itkStaticConstMacro(SpaceDimension, unsigned int, 3);
00063   itkStaticConstMacro(InputSpaceDimension, unsigned int, 3);
00064   itkStaticConstMacro(OutputSpaceDimension, unsigned int, 3);
00065   itkStaticConstMacro(ParametersDimension, unsigned int, 6);
00067 
00068   typedef typename Superclass::ParametersType             ParametersType;
00069   typedef typename Superclass::JacobianType               JacobianType;
00070   typedef typename Superclass::ScalarType                 ScalarType;
00071   typedef typename Superclass::InputVectorType            InputVectorType;
00072   typedef typename Superclass::OutputVectorType           OutputVectorType;
00073   typedef typename Superclass::InputCovariantVectorType  
00074                                                      InputCovariantVectorType;
00075   typedef typename Superclass::OutputCovariantVectorType  
00076                                                      OutputCovariantVectorType;
00077   typedef typename Superclass::InputVnlVectorType         InputVnlVectorType;
00078   typedef typename Superclass::OutputVnlVectorType        OutputVnlVectorType;
00079   typedef typename Superclass::InputPointType             InputPointType;
00080   typedef typename Superclass::OutputPointType            OutputPointType;
00081   typedef typename Superclass::MatrixType                 MatrixType;
00082   typedef typename Superclass::InverseMatrixType          InverseMatrixType;
00083   typedef typename Superclass::CenterType                 CenterType;
00084   typedef typename Superclass::TranslationType            TranslationType;
00085   typedef typename Superclass::OffsetType                 OffsetType;
00086 
00087   typedef typename Superclass::ScalarType                 AngleType;
00088   
00093   void SetParameters( const ParametersType & parameters );
00094   const ParametersType& GetParameters(void) const;
00096 
00098   void SetRotation(ScalarType angleX,ScalarType angleY,ScalarType angleZ);
00099   itkGetConstMacro(AngleX, ScalarType);
00100   itkGetConstMacro(AngleY, ScalarType);
00101   itkGetConstMacro(AngleZ, ScalarType);
00103 
00108   const JacobianType & GetJacobian(const InputPointType  &point ) const;
00109 
00111   itkSetMacro(ComputeZYX,bool);
00112   itkGetConstMacro(ComputeZYX,bool);
00114 
00115   virtual void SetIdentity(void);
00116 
00117 
00118 protected:
00119   Euler3DTransform();
00120   Euler3DTransform(const MatrixType & matrix,
00121                    const OutputPointType & offset);
00122   Euler3DTransform(unsigned int outputSpaceDims,
00123                    unsigned int paramsSpaceDims);
00124 
00125   ~Euler3DTransform(){};
00126 
00127   void PrintSelf(std::ostream &os, Indent indent) const;
00128 
00129   void SetVarRotation(ScalarType angleX, ScalarType angleY, ScalarType angleZ)
00130     { m_AngleX = angleX; m_AngleY = angleY; m_AngleZ = angleZ; };
00131 
00133   void ComputeMatrix(void);
00134  void ComputeMatrixParameters(void);
00136 
00137 private:
00138   Euler3DTransform(const Self&); //purposely not implemented
00139   void operator=(const Self&); //purposely not implemented
00140 
00141   ScalarType  m_AngleX; 
00142   ScalarType  m_AngleY; 
00143   ScalarType  m_AngleZ;
00144   bool        m_ComputeZYX;
00145 
00146 }; //class Euler3DTransform
00147 
00148 
00149 }  // namespace itk
00150 
00151 // Define instantiation macro for this template.
00152 #define ITK_TEMPLATE_Euler3DTransform(_, EXPORT, x, y) namespace itk { \
00153   _(1(class EXPORT Euler3DTransform< ITK_TEMPLATE_1 x >)) \
00154   namespace Templates { typedef Euler3DTransform< ITK_TEMPLATE_1 x > \
00155                                             Euler3DTransform##y; } \
00156   }
00157 
00158 #if ITK_TEMPLATE_EXPLICIT
00159 # include "Templates/itkEuler3DTransform+-.h"
00160 #endif
00161 
00162 #if ITK_TEMPLATE_TXX
00163 # include "itkEuler3DTransform.txx"
00164 #endif
00165 
00166 #endif /* __itkEuler3DTransform_h */
00167 

Generated at Tue Jul 29 19:52:55 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000