00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __itkSimilarity2DTransform_h
00019 #define __itkSimilarity2DTransform_h
00020
00021 #include <iostream>
00022 #include "itkRigid2DTransform.h"
00023
00024 namespace itk
00025 {
00026
00034 template < class TScalarType=double >
00035 class ITK_EXPORT Similarity2DTransform :
00036 public Rigid2DTransform< TScalarType >
00037 {
00038 public:
00040 typedef Similarity2DTransform Self;
00041 typedef Rigid2DTransform< TScalarType > Superclass;
00042 typedef SmartPointer<Self> Pointer;
00043 typedef SmartPointer<const Self> ConstPointer;
00044
00046 itkNewMacro( Self );
00047
00049 itkTypeMacro( Similarity2DTransform, Rigid2DTransform );
00050
00052 itkStaticConstMacro(SpaceDimension, unsigned int, 2);
00053 itkStaticConstMacro(ParametersSpaceDimension, unsigned int, 4);
00054
00056 typedef typename Superclass::ScalarType ScalarType;
00057
00059 typedef typename Superclass::ParametersType ParametersType;
00060
00062 typedef typename Superclass::JacobianType JacobianType;
00063
00065 typedef typename Superclass::OffsetType OffsetType;
00066
00068 typedef typename Superclass::InputPointType InputPointType;
00069 typedef typename Superclass::OutputPointType OutputPointType;
00070
00072 typedef typename Superclass::InputVectorType InputVectorType;
00073 typedef typename Superclass::OutputVectorType OutputVectorType;
00074
00076 typedef typename Superclass::InputCovariantVectorType InputCovariantVectorType;
00077 typedef typename Superclass::OutputCovariantVectorType OutputCovariantVectorType;
00078
00080 typedef typename Superclass::InputVnlVectorType InputVnlVectorType;
00081 typedef typename Superclass::OutputVnlVectorType OutputVnlVectorType;
00082
00087 void SetParameters( const ParametersType & parameters );
00088
00090 void SetRotation(TScalarType angle);
00091
00093 void SetScale(TScalarType scale);
00094
00100 const ParametersType & GetParameters( void ) const;
00101
00102
00107 const JacobianType & GetJacobian(const InputPointType &point ) const;
00108
00111 virtual void SetIdentity( void );
00112
00113
00114 protected:
00115 Similarity2DTransform();
00116 ~Similarity2DTransform(){};
00117 void PrintSelf(std::ostream &os, Indent indent) const;
00118
00120 void ComputeMatrix(void);
00121
00122 private:
00123 Similarity2DTransform(const Self&);
00124 void operator=(const Self&);
00125
00126 TScalarType m_Angle;
00127
00128 TScalarType m_Scale;
00129
00130 };
00131
00132
00133 }
00134
00135
00136 #ifndef ITK_MANUAL_INSTANTIATION
00137 #include "itkSimilarity2DTransform.txx"
00138 #endif
00139
00140 #endif