go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkAdvancedEuler3DTransform.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkAdvancedEuler3DTransform.h,v $
00005   Language:  C++
00006   Date:      $Date: 2008-10-13 15:36:31 $
00007   Version:   $Revision: 1.14 $
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 __itkAdvancedEuler3DTransform_h
00018 #define __itkAdvancedEuler3DTransform_h
00019 
00020 #include <iostream>
00021 #include "itkAdvancedRigid3DTransform.h"
00022 
00023 namespace itk
00024 {
00025 
00046 template < class TScalarType=double >    // Data type for scalars (float or double)
00047 class ITK_EXPORT AdvancedEuler3DTransform :
00048             public AdvancedRigid3DTransform< TScalarType >
00049 {
00050 public:
00052   typedef AdvancedEuler3DTransform                  Self;
00053   typedef AdvancedRigid3DTransform< TScalarType >   Superclass;
00054   typedef SmartPointer<Self>                Pointer;
00055   typedef SmartPointer<const Self>          ConstPointer;
00056 
00058   itkNewMacro( Self );
00059 
00061   itkTypeMacro( AdvancedEuler3DTransform, AdvancedRigid3DTransform );
00062 
00064   itkStaticConstMacro(SpaceDimension, unsigned int, 3);
00065   itkStaticConstMacro(InputSpaceDimension, unsigned int, 3);
00066   itkStaticConstMacro(OutputSpaceDimension, unsigned int, 3);
00067   itkStaticConstMacro(ParametersDimension, unsigned int, 6);
00068 
00069   typedef typename Superclass::ParametersType             ParametersType;
00070   typedef typename Superclass::JacobianType               JacobianType;
00071   typedef typename Superclass::ScalarType                 ScalarType;
00072   typedef typename Superclass::InputVectorType            InputVectorType;
00073   typedef typename Superclass::OutputVectorType           OutputVectorType;
00074   typedef typename Superclass::InputCovariantVectorType   InputCovariantVectorType;
00075   typedef typename Superclass::OutputCovariantVectorType  OutputCovariantVectorType;
00076   typedef typename Superclass::InputVnlVectorType         InputVnlVectorType;
00077   typedef typename Superclass::OutputVnlVectorType        OutputVnlVectorType;
00078   typedef typename Superclass::InputPointType             InputPointType;
00079   typedef typename Superclass::OutputPointType            OutputPointType;
00080   typedef typename Superclass::MatrixType                 MatrixType;
00081   typedef typename Superclass::InverseMatrixType          InverseMatrixType;
00082   typedef typename Superclass::CenterType                 CenterType;
00083   typedef typename Superclass::TranslationType            TranslationType;
00084   typedef typename Superclass::OffsetType                 OffsetType;
00085   typedef typename Superclass::ScalarType                 AngleType;
00086 
00087   typedef typename Superclass
00088     ::NonZeroJacobianIndicesType                    NonZeroJacobianIndicesType;
00089   typedef typename Superclass::SpatialJacobianType  SpatialJacobianType;
00090   typedef typename Superclass
00091     ::JacobianOfSpatialJacobianType                 JacobianOfSpatialJacobianType;
00092   typedef typename Superclass::SpatialHessianType   SpatialHessianType;
00093   typedef typename Superclass
00094     ::JacobianOfSpatialHessianType                  JacobianOfSpatialHessianType;
00095   typedef typename Superclass::InternalMatrixType   InternalMatrixType;
00096 
00101   void SetParameters( const ParametersType & parameters );
00102   const ParametersType& GetParameters(void) const;
00103 
00105   void SetRotation(ScalarType angleX,ScalarType angleY,ScalarType angleZ);
00106   itkGetConstMacro(AngleX, ScalarType);
00107   itkGetConstMacro(AngleY, ScalarType);
00108   itkGetConstMacro(AngleZ, ScalarType);
00109 
00111   virtual void GetJacobian(
00112     const InputPointType &,
00113     JacobianType &,
00114     NonZeroJacobianIndicesType & ) const;
00115 
00117   itkSetMacro(ComputeZYX,bool);
00118   itkGetConstMacro(ComputeZYX,bool);
00119 
00120   virtual void SetIdentity(void);
00121 
00122 
00123 protected:
00124   AdvancedEuler3DTransform();
00125   AdvancedEuler3DTransform(const MatrixType & matrix,
00126                    const OutputPointType & offset);
00127   AdvancedEuler3DTransform(unsigned int outputSpaceDims,
00128                    unsigned int paramsSpaceDims);
00129 
00130   ~AdvancedEuler3DTransform(){};
00131 
00132   void PrintSelf(std::ostream &os, Indent indent) const;
00133 
00135   void SetVarRotation(ScalarType angleX, ScalarType angleY, ScalarType angleZ);
00136 
00138   void ComputeMatrix(void);
00139   void ComputeMatrixParameters(void);
00140 
00142   virtual void PrecomputeJacobianOfSpatialJacobian(void);
00143 
00144 private:
00145   AdvancedEuler3DTransform(const Self&); //purposely not implemented
00146   void operator=(const Self&); //purposely not implemented
00147 
00148   ScalarType  m_AngleX;
00149   ScalarType  m_AngleY;
00150   ScalarType  m_AngleZ;
00151   bool        m_ComputeZYX;
00152 
00153 }; //class AdvancedEuler3DTransform
00154 
00155 
00156 }  // namespace itk
00157 
00158 // Define instantiation macro for this template.
00159 #define ITK_TEMPLATE_AdvancedEuler3DTransform(_, EXPORT, x, y) namespace itk { \
00160   _(1(class EXPORT AdvancedEuler3DTransform< ITK_TEMPLATE_1 x >)) \
00161   namespace Templates { typedef AdvancedEuler3DTransform< ITK_TEMPLATE_1 x > \
00162                                             AdvancedEuler3DTransform##y; } \
00163   }
00164 
00165 #if ITK_TEMPLATE_EXPLICIT
00166 # include "Templates/itkAdvancedEuler3DTransform+-.h"
00167 #endif
00168 
00169 #if ITK_TEMPLATE_TXX
00170 # include "itkAdvancedEuler3DTransform.txx"
00171 #endif
00172 
00173 #endif /* __itkAdvancedEuler3DTransform_h */


Generated on 24-05-2012 for elastix by doxygen 1.7.6.1 elastix logo