00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __itkScaleSkewVersor3DTransform_h
00019 #define __itkScaleSkewVersor3DTransform_h
00020
00021 #include <iostream>
00022 #include "itkVersorRigid3DTransform.h"
00023
00024 namespace itk
00025 {
00026
00048 template < class TScalarType=double >
00049 class ITK_EXPORT ScaleSkewVersor3DTransform :
00050 public VersorRigid3DTransform< TScalarType >
00051 {
00052 public:
00054 typedef ScaleSkewVersor3DTransform Self;
00055 typedef VersorRigid3DTransform< TScalarType > Superclass;
00056 typedef SmartPointer<Self> Pointer;
00057 typedef SmartPointer<const Self> ConstPointer;
00058
00060 itkNewMacro( Self );
00061
00063 itkTypeMacro( ScaleSkewVersor3DTransform, VersorRigid3DTransform );
00064
00066 itkStaticConstMacro(InputSpaceDimension, unsigned int, 3);
00067 itkStaticConstMacro(OutputSpaceDimension, unsigned int, 3);
00068 itkStaticConstMacro(ParametersDimension, unsigned int, 15);
00070
00072 typedef typename Superclass::ParametersType ParametersType;
00073 typedef typename Superclass::JacobianType JacobianType;
00074 typedef typename Superclass::ScalarType ScalarType;
00075 typedef typename Superclass::InputPointType InputPointType;
00076 typedef typename Superclass::OutputPointType OutputPointType;
00077 typedef typename Superclass::InputVectorType InputVectorType;
00078 typedef typename Superclass::OutputVectorType OutputVectorType;
00079 typedef typename Superclass::InputVnlVectorType InputVnlVectorType;
00080 typedef typename Superclass::OutputVnlVectorType OutputVnlVectorType;
00081 typedef typename Superclass::InputCovariantVectorType
00082 InputCovariantVectorType;
00083 typedef typename Superclass::OutputCovariantVectorType
00084 OutputCovariantVectorType;
00085 typedef typename Superclass::MatrixType MatrixType;
00086 typedef typename Superclass::InverseMatrixType InverseMatrixType;
00087 typedef typename Superclass::CenterType CenterType;
00088 typedef typename Superclass::OffsetType OffsetType;
00089 typedef typename Superclass::TranslationType TranslationType;
00090
00091 typedef typename Superclass::VersorType VersorType;
00092 typedef typename Superclass::AxisType AxisType;
00093 typedef typename Superclass::AngleType AngleType;
00094
00096 typedef Vector<TScalarType, 3>
00097 ScaleVectorType;
00098 typedef Vector<TScalarType, 6 > SkewVectorType;
00099
00103 virtual void SetMatrix(const MatrixType &matrix);
00104
00113 virtual void SetParameters( const ParametersType & parameters );
00114 virtual const ParametersType& GetParameters(void) const;
00116
00117 void SetScale( const ScaleVectorType & scale );
00118 itkGetConstReferenceMacro( Scale, ScaleVectorType );
00119
00120 void SetSkew( const SkewVectorType & skew );
00121 itkGetConstReferenceMacro( Skew, SkewVectorType );
00122
00123 void SetIdentity();
00124
00129 const JacobianType & GetJacobian(const InputPointType &point ) const;
00130
00131 protected:
00132 ScaleSkewVersor3DTransform();
00133 ScaleSkewVersor3DTransform(const MatrixType &matrix,
00134 const OutputVectorType &offset);
00135 ScaleSkewVersor3DTransform(unsigned int outputDims,
00136 unsigned int paramDims);
00137 ~ScaleSkewVersor3DTransform(){}
00138
00139 void PrintSelf(std::ostream &os, Indent indent) const;
00140
00141 void SetVarScale(const ScaleVectorType & scale)
00142 { m_Scale = scale; }
00143
00144 void SetVarSkew(const SkewVectorType & skew)
00145 { m_Skew = skew; }
00146
00148 void ComputeMatrix(void);
00149 void ComputeMatrixParameters(void);
00151
00152 private:
00153 ScaleSkewVersor3DTransform(const Self&);
00154 void operator=(const Self&);
00155
00157 ScaleVectorType m_Scale;
00158
00160 SkewVectorType m_Skew;
00161
00162 };
00163
00164
00165 }
00166
00167
00168 #define ITK_TEMPLATE_ScaleSkewVersor3DTransform(_, EXPORT, x, y) namespace itk { \
00169 _(1(class EXPORT ScaleSkewVersor3DTransform< ITK_TEMPLATE_1 x >)) \
00170 namespace Templates { typedef ScaleSkewVersor3DTransform< ITK_TEMPLATE_1 x > \
00171 ScaleSkewVersor3DTransform##y; } \
00172 }
00173
00174 #if ITK_TEMPLATE_EXPLICIT
00175 # include "Templates/itkScaleSkewVersor3DTransform+-.h"
00176 #endif
00177
00178 #if ITK_TEMPLATE_TXX
00179 # include "itkScaleSkewVersor3DTransform.txx"
00180 #endif
00181
00182
00183 #endif
00184