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 __itkAdvancedSimilarity2DTransform_h
00019 #define __itkAdvancedSimilarity2DTransform_h
00020
00021 #include <iostream>
00022 #include "itkAdvancedRigid2DTransform.h"
00023
00024 namespace itk
00025 {
00026
00061 template < class TScalarType=double >
00062 class ITK_EXPORT AdvancedSimilarity2DTransform :
00063 public AdvancedRigid2DTransform< TScalarType >
00064 {
00065 public:
00067 typedef AdvancedSimilarity2DTransform Self;
00068 typedef AdvancedRigid2DTransform< TScalarType > Superclass;
00069 typedef SmartPointer<Self> Pointer;
00070 typedef SmartPointer<const Self> ConstPointer;
00071
00073 itkNewMacro( Self );
00074
00076 itkTypeMacro( AdvancedSimilarity2DTransform, AdvancedRigid2DTransform );
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
00116 typedef typename Superclass
00117 ::NonZeroJacobianIndicesType NonZeroJacobianIndicesType;
00118 typedef typename Superclass::SpatialJacobianType SpatialJacobianType;
00119 typedef typename Superclass
00120 ::JacobianOfSpatialJacobianType JacobianOfSpatialJacobianType;
00121 typedef typename Superclass::SpatialHessianType SpatialHessianType;
00122 typedef typename Superclass
00123 ::JacobianOfSpatialHessianType JacobianOfSpatialHessianType;
00124 typedef typename Superclass::InternalMatrixType InternalMatrixType;
00125
00127 void SetScale( ScaleType scale );
00128 itkGetConstReferenceMacro( Scale, ScaleType );
00129
00139 void SetParameters( const ParametersType & parameters );
00140
00150 const ParametersType & GetParameters( void ) const;
00151
00158 virtual void GetJacobian(
00159 const InputPointType &,
00160 JacobianType &,
00161 NonZeroJacobianIndicesType & ) const;
00162
00164 virtual void SetIdentity( void );
00165
00170 void CloneInverseTo( Pointer & newinverse ) const;
00171
00176 void CloneTo( Pointer & clone ) const;
00177
00191 virtual void SetMatrix( const MatrixType & matrix );
00192
00193 protected:
00194 AdvancedSimilarity2DTransform();
00195 AdvancedSimilarity2DTransform( unsigned int spaceDimension,
00196 unsigned int parametersDimension);
00197
00198 ~AdvancedSimilarity2DTransform(){};
00199 void PrintSelf(std::ostream &os, Indent indent) const;
00200
00204 virtual void ComputeMatrix(void);
00205
00210 virtual void ComputeMatrixParameters(void);
00211
00213 void SetVarScale( ScaleType scale )
00214 { m_Scale = scale; }
00215
00217 virtual void PrecomputeJacobianOfSpatialJacobian(void);
00218
00219 private:
00220 AdvancedSimilarity2DTransform(const Self&);
00221 void operator=(const Self&);
00222
00223 ScaleType m_Scale;
00224
00225 };
00226
00227
00228 }
00229
00230
00231 #define ITK_TEMPLATE_AdvancedSimilarity2DTransform(_, EXPORT, x, y) namespace itk { \
00232 _(1(class EXPORT AdvancedSimilarity2DTransform< ITK_TEMPLATE_1 x >)) \
00233 namespace Templates { typedef AdvancedSimilarity2DTransform< ITK_TEMPLATE_1 x > AdvancedSimilarity2DTransform##y; } \
00234 }
00235
00236 #if ITK_TEMPLATE_EXPLICIT
00237 # include "Templates/itkAdvancedSimilarity2DTransform+-.h"
00238 #endif
00239
00240 #if ITK_TEMPLATE_TXX
00241 # include "itkAdvancedSimilarity2DTransform.txx"
00242 #endif
00243
00244 #endif