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
00047 template < class TScalarType=double >
00048 class ITK_EXPORT ScaleSkewVersor3DTransform :
00049 public VersorRigid3DTransform< TScalarType >
00050 {
00051 public:
00053 typedef ScaleSkewVersor3DTransform Self;
00054 typedef VersorRigid3DTransform< TScalarType > Superclass;
00055 typedef SmartPointer<Self> Pointer;
00056 typedef SmartPointer<const Self> ConstPointer;
00057
00059 itkNewMacro( Self );
00060
00062 itkTypeMacro( ScaleSkewVersor3DTransform, VersorRigid3DTransform );
00063
00065 itkStaticConstMacro(InputSpaceDimension, unsigned int, 3);
00066 itkStaticConstMacro(OutputSpaceDimension, unsigned int, 3);
00067 itkStaticConstMacro(ParametersDimension, unsigned int, 15);
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::VersorType VersorType;
00091 typedef typename Superclass::AxisType AxisType;
00092 typedef typename Superclass::AngleType AngleType;
00093
00095 typedef Vector<TScalarType, 3>
00096 ScaleVectorType;
00097 typedef Vector<TScalarType, 6 > SkewVectorType;
00098
00102 virtual void SetMatrix(const MatrixType &matrix);
00103
00112 virtual void SetParameters( const ParametersType & parameters );
00113 virtual const ParametersType& GetParameters(void) const;
00115
00116 void SetScale( const ScaleVectorType & scale );
00117 itkGetConstReferenceMacro( Scale, ScaleVectorType );
00118
00119 void SetSkew( const SkewVectorType & skew );
00120 itkGetConstReferenceMacro( Skew, SkewVectorType );
00121
00122 void SetIdentity();
00123
00128 const JacobianType & GetJacobian(const InputPointType &point ) const;
00129
00130 protected:
00131 ScaleSkewVersor3DTransform();
00132 ScaleSkewVersor3DTransform(const MatrixType &matrix,
00133 const OutputVectorType &offset);
00134 ScaleSkewVersor3DTransform(unsigned int outputDims,
00135 unsigned int paramDims);
00136 ~ScaleSkewVersor3DTransform(){};
00137
00138 void PrintSelf(std::ostream &os, Indent indent) const;
00139
00140 void SetVarScale(const ScaleVectorType & scale)
00141 { m_Scale = scale; };
00142
00143 void SetVarSkew(const SkewVectorType & skew)
00144 { m_Skew = skew; };
00145
00147 void ComputeMatrix(void);
00148 void ComputeMatrixParameters(void);
00150
00151 private:
00152 ScaleSkewVersor3DTransform(const Self&);
00153 void operator=(const Self&);
00154
00156 ScaleVectorType m_Scale;
00157
00159 SkewVectorType m_Skew;
00160
00161 };
00162
00163
00164 }
00165
00166
00167 #define ITK_TEMPLATE_ScaleSkewVersor3DTransform(_, EXPORT, x, y) namespace itk { \
00168 _(1(class EXPORT ScaleSkewVersor3DTransform< ITK_TEMPLATE_1 x >)) \
00169 namespace Templates { typedef ScaleSkewVersor3DTransform< ITK_TEMPLATE_1 x > \
00170 ScaleSkewVersor3DTransform##y; } \
00171 }
00172
00173 #if ITK_TEMPLATE_EXPLICIT
00174 # include "Templates/itkScaleSkewVersor3DTransform+-.h"
00175 #endif
00176
00177 #if ITK_TEMPLATE_TXX
00178 # include "itkScaleSkewVersor3DTransform.txx"
00179 #endif
00180
00181
00182 #endif
00183