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
00061 template < class TScalarType=double >
00062 class ITK_EXPORT Similarity2DTransform :
00063 public Rigid2DTransform< TScalarType >
00064 {
00065 public:
00067 typedef Similarity2DTransform Self;
00068 typedef Rigid2DTransform< TScalarType > Superclass;
00069 typedef SmartPointer<Self> Pointer;
00070 typedef SmartPointer<const Self> ConstPointer;
00071
00073 itkNewMacro( Self );
00074
00076 itkTypeMacro( Similarity2DTransform, Rigid2DTransform );
00077
00079 itkStaticConstMacro(SpaceDimension, unsigned int, 2);
00080 itkStaticConstMacro(InputSpaceDimension, unsigned int, 2);
00081 itkStaticConstMacro(OutputSpaceDimension, unsigned int, 2);
00082 itkStaticConstMacro(ParametersDimension, unsigned int, 4);
00083
00085 typedef typename Superclass::ScalarType ScalarType;
00086 typedef TScalarType ScaleType;
00087
00089 typedef typename Superclass::ParametersType ParametersType;
00090
00092 typedef typename Superclass::JacobianType JacobianType;
00093
00095 typedef typename Superclass::OffsetType OffsetType;
00096
00098 typedef typename Superclass::MatrixType MatrixType;
00099
00101 typedef typename Superclass::InputPointType InputPointType;
00102 typedef typename Superclass::OutputPointType OutputPointType;
00103
00105 typedef typename Superclass::InputVectorType InputVectorType;
00106 typedef typename Superclass::OutputVectorType OutputVectorType;
00107
00109 typedef typename Superclass::InputCovariantVectorType InputCovariantVectorType;
00110 typedef typename Superclass::OutputCovariantVectorType OutputCovariantVectorType;
00111
00113 typedef typename Superclass::InputVnlVectorType InputVnlVectorType;
00114 typedef typename Superclass::OutputVnlVectorType OutputVnlVectorType;
00115
00117 void SetScale( ScaleType scale );
00118 itkGetConstReferenceMacro( Scale, ScaleType );
00119
00129 void SetParameters( const ParametersType & parameters );
00130
00140 const ParametersType & GetParameters( void ) const;
00141
00146 const JacobianType & GetJacobian(const InputPointType &point ) const;
00147
00149 virtual void SetIdentity( void );
00150
00155 void CloneInverseTo( Pointer & newinverse ) const;
00156
00161 void CloneTo( Pointer & clone ) const;
00162
00176 virtual void SetMatrix( const MatrixType & matrix );
00177
00178 protected:
00179 Similarity2DTransform();
00180 Similarity2DTransform( unsigned int spaceDimension,
00181 unsigned int parametersDimension);
00182
00183 ~Similarity2DTransform(){};
00184 void PrintSelf(std::ostream &os, Indent indent) const;
00185
00189 virtual void ComputeMatrix(void);
00190
00195 virtual void ComputeMatrixParameters(void);
00196
00198 void SetVarScale( ScaleType scale )
00199 { m_Scale = scale; }
00200
00201 private:
00202 Similarity2DTransform(const Self&);
00203 void operator=(const Self&);
00204
00205 ScaleType m_Scale;
00206
00207 };
00208
00209
00210 }
00211
00212
00213 #ifndef ITK_MANUAL_INSTANTIATION
00214 #include "itkSimilarity2DTransform.txx"
00215 #endif
00216
00217 #endif