00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkEuler3DTransform_h
00018 #define __itkEuler3DTransform_h
00019
00020 #include <iostream>
00021 #include "itkRigid3DTransform.h"
00022
00023 namespace itk
00024 {
00025
00033 template < class TScalarType=double >
00034 class ITK_EXPORT Euler3DTransform :
00035 public Rigid3DTransform< TScalarType >
00036 {
00037 public:
00039 typedef Euler3DTransform Self;
00040 typedef Rigid3DTransform< TScalarType > Superclass;
00041 typedef SmartPointer<Self> Pointer;
00042 typedef SmartPointer<const Self> ConstPointer;
00043
00045 itkNewMacro( Self );
00046
00048 itkTypeMacro( Euler3DTransform, Rigid3DTransform );
00049
00051 itkStaticConstMacro(SpaceDimension, unsigned int, 3);
00052 itkStaticConstMacro(InputSpaceDimension, unsigned int, 3);
00053 itkStaticConstMacro(OutputSpaceDimension, unsigned int, 3);
00054 itkStaticConstMacro(ParametersDimension, unsigned int, 6);
00055
00056 typedef typename Superclass::ParametersType ParametersType;
00057 typedef typename Superclass::JacobianType JacobianType;
00058 typedef typename Superclass::ScalarType ScalarType;
00059 typedef typename Superclass::InputVectorType InputVectorType;
00060 typedef typename Superclass::OutputVectorType OutputVectorType;
00061 typedef typename Superclass::InputCovariantVectorType
00062 InputCovariantVectorType;
00063 typedef typename Superclass::OutputCovariantVectorType
00064 OutputCovariantVectorType;
00065 typedef typename Superclass::InputVnlVectorType InputVnlVectorType;
00066 typedef typename Superclass::OutputVnlVectorType OutputVnlVectorType;
00067 typedef typename Superclass::InputPointType InputPointType;
00068 typedef typename Superclass::OutputPointType OutputPointType;
00069 typedef typename Superclass::MatrixType MatrixType;
00070 typedef typename Superclass::InverseMatrixType InverseMatrixType;
00071 typedef typename Superclass::CenterType CenterType;
00072 typedef typename Superclass::TranslationType TranslationType;
00073 typedef typename Superclass::OffsetType OffsetType;
00074
00075 typedef typename Superclass::ScalarType AngleType;
00076
00081 void SetParameters( const ParametersType & parameters );
00082 const ParametersType& GetParameters(void) const;
00083
00085 void SetRotation(ScalarType angleX,ScalarType angleY,ScalarType angleZ);
00086 itkGetConstMacro(AngleX, ScalarType);
00087 itkGetConstMacro(AngleY, ScalarType);
00088 itkGetConstMacro(AngleZ, ScalarType);
00089
00094 const JacobianType & GetJacobian(const InputPointType &point ) const;
00095
00097 itkSetMacro(ComputeZYX,bool);
00098 itkGetConstMacro(ComputeZYX,bool);
00099
00100 virtual void SetIdentity(void);
00101
00102
00103 protected:
00104 Euler3DTransform();
00105 Euler3DTransform(const MatrixType & matrix,
00106 const OutputPointType & offset);
00107 Euler3DTransform(unsigned int outputSpaceDims,
00108 unsigned int paramsSpaceDims);
00109
00110 ~Euler3DTransform(){};
00111
00112 void PrintSelf(std::ostream &os, Indent indent) const;
00113
00114 void SetVarRotation(ScalarType angleX, ScalarType angleY, ScalarType angleZ)
00115 { m_AngleX = angleX; m_AngleY = angleY; m_AngleZ = angleZ; };
00116
00118 void ComputeMatrix(void);
00119 void ComputeMatrixParameters(void);
00120
00121 private:
00122 Euler3DTransform(const Self&);
00123 void operator=(const Self&);
00124
00125 ScalarType m_AngleX;
00126 ScalarType m_AngleY;
00127 ScalarType m_AngleZ;
00128 bool m_ComputeZYX;
00129
00130 };
00131
00132
00133 }
00134
00135
00136 #ifndef ITK_MANUAL_INSTANTIATION
00137 #include "itkEuler3DTransform.txx"
00138 #endif
00139
00140 #endif