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
00034 template < class TScalarType=double >
00035 class ITK_EXPORT ScaleSkewVersor3DTransform :
00036 public VersorRigid3DTransform< TScalarType >
00037 {
00038 public:
00040 typedef ScaleSkewVersor3DTransform Self;
00041 typedef VersorRigid3DTransform< TScalarType > Superclass;
00042 typedef SmartPointer<Self> Pointer;
00043 typedef SmartPointer<const Self> ConstPointer;
00044
00046 itkNewMacro( Self );
00047
00049 itkTypeMacro( ScaleSkewVersor3DTransform, VersorRigid3DTransform );
00050
00052 itkStaticConstMacro(InputSpaceDimension, unsigned int, 3);
00053 itkStaticConstMacro(OutputSpaceDimension, unsigned int, 3);
00054 itkStaticConstMacro(ParametersDimension, unsigned int, 15);
00055
00057 typedef typename Superclass::ParametersType ParametersType;
00058 typedef typename Superclass::JacobianType JacobianType;
00059 typedef typename Superclass::ScalarType ScalarType;
00060 typedef typename Superclass::InputPointType InputPointType;
00061 typedef typename Superclass::OutputPointType OutputPointType;
00062 typedef typename Superclass::InputVectorType InputVectorType;
00063 typedef typename Superclass::OutputVectorType OutputVectorType;
00064 typedef typename Superclass::InputVnlVectorType InputVnlVectorType;
00065 typedef typename Superclass::OutputVnlVectorType OutputVnlVectorType;
00066 typedef typename Superclass::InputCovariantVectorType
00067 InputCovariantVectorType;
00068 typedef typename Superclass::OutputCovariantVectorType
00069 OutputCovariantVectorType;
00070 typedef typename Superclass::MatrixType MatrixType;
00071 typedef typename Superclass::InverseMatrixType InverseMatrixType;
00072 typedef typename Superclass::CenterType CenterType;
00073 typedef typename Superclass::OffsetType OffsetType;
00074 typedef typename Superclass::TranslationType TranslationType;
00075
00076 typedef typename Superclass::VersorType VersorType;
00077 typedef typename Superclass::AxisType AxisType;
00078 typedef typename Superclass::AngleType AngleType;
00079
00081 typedef Vector<TScalarType, 3>
00082 ScaleVectorType;
00083 typedef Vector<TScalarType, 6 > SkewVectorType;
00084
00093 virtual void SetParameters( const ParametersType & parameters );
00094 virtual const ParametersType& GetParameters(void) const;
00095
00096 void SetScale( const ScaleVectorType & scale );
00097 itkGetConstReferenceMacro( Scale, ScaleVectorType );
00098
00099 void SetSkew( const SkewVectorType & skew );
00100 itkGetConstReferenceMacro( Skew, SkewVectorType );
00101
00102 void SetIdentity();
00103
00108 const JacobianType & GetJacobian(const InputPointType &point ) const;
00109
00110 protected:
00111 ScaleSkewVersor3DTransform();
00112 ScaleSkewVersor3DTransform(const MatrixType &matrix,
00113 const OutputVectorType &offset);
00114 ScaleSkewVersor3DTransform(unsigned int outputDims,
00115 unsigned int paramDims);
00116 ~ScaleSkewVersor3DTransform(){};
00117
00118 void PrintSelf(std::ostream &os, Indent indent) const;
00119
00120 void SetVarScale(const ScaleVectorType & scale)
00121 { m_Scale = scale; };
00122
00123 void SetVarSkew(const SkewVectorType & skew)
00124 { m_Skew = skew; };
00125
00127 void ComputeMatrix(void);
00128 void ComputeMatrixParameters(void);
00129
00130 private:
00131 ScaleSkewVersor3DTransform(const Self&);
00132 void operator=(const Self&);
00133
00135 ScaleVectorType m_Scale;
00136
00138 SkewVectorType m_Skew;
00139
00140 };
00141
00142
00143 }
00144
00145
00146 #ifndef ITK_MANUAL_INSTANTIATION
00147 #include "itkScaleSkewVersor3DTransform.txx"
00148 #endif
00149
00150 #endif