itkDecomposedAffine3DTransform.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __itkDecomposedAffine3DTransform_h
00019 #define __itkDecomposedAffine3DTransform_h
00020
00021 #include <iostream>
00022 #include "itkEuler3DTransform.h"
00023
00024 namespace itk
00025 {
00026
00048 template < class TScalarType=double >
00049 class ITK_EXPORT DecomposedAffine3DTransform :
00050 public Euler3DTransform< TScalarType >
00051 {
00052 public:
00054 typedef DecomposedAffine3DTransform Self;
00055 typedef Euler3DTransform< TScalarType > Superclass;
00056 typedef SmartPointer<Self> Pointer;
00057 typedef SmartPointer<const Self> ConstPointer;
00058
00060 itkNewMacro( Self );
00061
00063 itkTypeMacro( DecomposedAffine3DTransform, Euler3DTransform );
00064
00066 itkStaticConstMacro(InputSpaceDimension, unsigned int, 3);
00067 itkStaticConstMacro(OutputSpaceDimension, unsigned int, 3);
00068 itkStaticConstMacro(ParametersDimension, unsigned int, 12);
00069
00071 typedef typename Superclass::ParametersType ParametersType;
00072 typedef typename Superclass::JacobianType JacobianType;
00073 typedef typename Superclass::ScalarType ScalarType;
00074 typedef typename Superclass::InputPointType InputPointType;
00075 typedef typename Superclass::OutputPointType OutputPointType;
00076 typedef typename Superclass::InputVectorType InputVectorType;
00077 typedef typename Superclass::OutputVectorType OutputVectorType;
00078 typedef typename Superclass::InputVnlVectorType InputVnlVectorType;
00079 typedef typename Superclass::OutputVnlVectorType OutputVnlVectorType;
00080 typedef typename Superclass::InputCovariantVectorType
00081 InputCovariantVectorType;
00082 typedef typename Superclass::OutputCovariantVectorType
00083 OutputCovariantVectorType;
00084 typedef typename Superclass::MatrixType MatrixType;
00085 typedef typename Superclass::InverseMatrixType InverseMatrixType;
00086 typedef typename Superclass::CenterType CenterType;
00087 typedef typename Superclass::OffsetType OffsetType;
00088 typedef typename Superclass::TranslationType TranslationType;
00089
00090 typedef typename Superclass::AngleType AngleType;
00091
00093 typedef Vector<TScalarType, 3>
00094 ScaleVectorType;
00095 typedef Vector<TScalarType, 3 > SkewVectorType;
00096
00100 virtual void SetMatrix(const MatrixType &matrix);
00101
00110 virtual void SetParameters( const ParametersType & parameters );
00111 virtual const ParametersType& GetParameters(void) const;
00112
00113 void SetScale( const ScaleVectorType & scale );
00114 itkGetConstReferenceMacro( Scale, ScaleVectorType );
00115
00116 void SetSkew( const SkewVectorType & skew );
00117 itkGetConstReferenceMacro( Skew, SkewVectorType );
00118
00119 void SetIdentity();
00120
00125 const JacobianType & GetJacobian(const InputPointType &point ) const;
00126
00127 protected:
00128 DecomposedAffine3DTransform();
00129 DecomposedAffine3DTransform(const MatrixType &matrix,
00130 const OutputVectorType &offset);
00131 DecomposedAffine3DTransform(unsigned int outputDims,
00132 unsigned int paramDims);
00133 ~DecomposedAffine3DTransform(){}
00134
00135 void PrintSelf(std::ostream &os, Indent indent) const;
00136
00137 void SetVarScale(const ScaleVectorType & scale)
00138 { m_Scale = scale; }
00139
00140 void SetVarSkew(const SkewVectorType & skew)
00141 { m_Skew = skew; }
00142
00144 void ComputeMatrix(void);
00145 void ComputeMatrixParameters(void);
00146
00147 private:
00148 DecomposedAffine3DTransform(const Self&);
00149 void operator=(const Self&);
00150
00152 ScaleVectorType m_Scale;
00153
00155 SkewVectorType m_Skew;
00156
00157 };
00158
00159
00160 }
00161
00162
00163 #define ITK_TEMPLATE_DecomposedAffine3DTransform(_, EXPORT, x, y) namespace itk { \
00164 _(1(class EXPORT DecomposedAffine3DTransform< ITK_TEMPLATE_1 x >)) \
00165 namespace Templates { typedef DecomposedAffine3DTransform< ITK_TEMPLATE_1 x > \
00166 DecomposedAffine3DTransform##y; } \
00167 }
00168
00169 #if ITK_TEMPLATE_EXPLICIT
00170 # include "Templates/itkDecomposedAffine3DTransform+-.h"
00171 #endif
00172
00173 #if ITK_TEMPLATE_TXX
00174 # include "itkDecomposedAffine3DTransform.txx"
00175 #endif
00176
00177
00178 #endif