itkSimilarity2DTransform.h
Go to the documentation of this file.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);
00084
00086 typedef typename Superclass::ScalarType ScalarType;
00087 typedef TScalarType ScaleType;
00088
00090 typedef typename Superclass::ParametersType ParametersType;
00091
00093 typedef typename Superclass::JacobianType JacobianType;
00094
00096 typedef typename Superclass::OffsetType OffsetType;
00097
00099 typedef typename Superclass::MatrixType MatrixType;
00100
00102 typedef typename Superclass::InputPointType InputPointType;
00103 typedef typename Superclass::OutputPointType OutputPointType;
00104
00106 typedef typename Superclass::InputVectorType InputVectorType;
00107 typedef typename Superclass::OutputVectorType OutputVectorType;
00108
00110 typedef typename Superclass::InputCovariantVectorType InputCovariantVectorType;
00111 typedef typename Superclass::OutputCovariantVectorType OutputCovariantVectorType;
00112
00114 typedef typename Superclass::InputVnlVectorType InputVnlVectorType;
00115 typedef typename Superclass::OutputVnlVectorType OutputVnlVectorType;
00116
00118 void SetScale( ScaleType scale );
00119 itkGetConstReferenceMacro( Scale, ScaleType );
00121
00131 void SetParameters( const ParametersType & parameters );
00132
00142 const ParametersType & GetParameters( void ) const;
00143
00148 const JacobianType & GetJacobian(const InputPointType &point ) const;
00149
00151 virtual void SetIdentity( void );
00152
00157 void CloneInverseTo( Pointer & newinverse ) const;
00158
00163 void CloneTo( Pointer & clone ) const;
00164
00178 virtual void SetMatrix( const MatrixType & matrix );
00179
00180 protected:
00181 Similarity2DTransform();
00182 Similarity2DTransform( unsigned int spaceDimension,
00183 unsigned int parametersDimension);
00184
00185 ~Similarity2DTransform(){};
00186 void PrintSelf(std::ostream &os, Indent indent) const;
00187
00191 virtual void ComputeMatrix(void);
00192
00197 virtual void ComputeMatrixParameters(void);
00198
00200 void SetVarScale( ScaleType scale )
00201 { m_Scale = scale; }
00202
00203 private:
00204 Similarity2DTransform(const Self&);
00205 void operator=(const Self&);
00206
00207 ScaleType m_Scale;
00208
00209 };
00210
00211
00212 }
00213
00214
00215 #define ITK_TEMPLATE_Similarity2DTransform(_, EXPORT, x, y) namespace itk { \
00216 _(1(class EXPORT Similarity2DTransform< ITK_TEMPLATE_1 x >)) \
00217 namespace Templates { typedef Similarity2DTransform< ITK_TEMPLATE_1 x > Similarity2DTransform##y; } \
00218 }
00219
00220 #if ITK_TEMPLATE_EXPLICIT
00221 # include "Templates/itkSimilarity2DTransform+-.h"
00222 #endif
00223
00224 #if ITK_TEMPLATE_TXX
00225 # include "itkSimilarity2DTransform.txx"
00226 #endif
00227
00228 #endif
00229