00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __itkSimilarity3DTransform_h
00019 #define __itkSimilarity3DTransform_h
00020
00021 #include <iostream>
00022 #include "itkVersorRigid3DTransform.h"
00023
00024 namespace itk
00025 {
00026
00047 template < class TScalarType=double >
00048 class ITK_EXPORT Similarity3DTransform :
00049 public VersorRigid3DTransform< TScalarType >
00050 {
00051 public:
00053 typedef Similarity3DTransform Self;
00054 typedef VersorRigid3DTransform< TScalarType > Superclass;
00055 typedef SmartPointer<Self> Pointer;
00056 typedef SmartPointer<const Self> ConstPointer;
00057
00059 itkNewMacro( Self );
00060
00062 itkTypeMacro( Similarity3DTransform, VersorRigid3DTransform );
00063
00065 itkStaticConstMacro(SpaceDimension, unsigned int, 3);
00066 itkStaticConstMacro(InputSpaceDimension, unsigned int, 3);
00067 itkStaticConstMacro(OutputSpaceDimension, unsigned int, 3);
00068 itkStaticConstMacro(ParametersDimension, unsigned int, 7);
00070
00072 typedef typename Superclass::ParametersType ParametersType;
00073 typedef typename Superclass::JacobianType JacobianType;
00074 typedef typename Superclass::ScalarType ScalarType;
00075 typedef typename Superclass::InputPointType InputPointType;
00076 typedef typename Superclass::OutputPointType OutputPointType;
00077 typedef typename Superclass::InputVectorType InputVectorType;
00078 typedef typename Superclass::OutputVectorType OutputVectorType;
00079 typedef typename Superclass::InputVnlVectorType InputVnlVectorType;
00080 typedef typename Superclass::OutputVnlVectorType OutputVnlVectorType;
00081 typedef typename Superclass::InputCovariantVectorType
00082 InputCovariantVectorType;
00083 typedef typename Superclass::OutputCovariantVectorType
00084 OutputCovariantVectorType;
00085 typedef typename Superclass::MatrixType MatrixType;
00086 typedef typename Superclass::InverseMatrixType InverseMatrixType;
00087 typedef typename Superclass::CenterType CenterType;
00088 typedef typename Superclass::OffsetType OffsetType;
00089 typedef typename Superclass::TranslationType TranslationType;
00090
00092 typedef typename Superclass::VersorType VersorType;
00093 typedef typename Superclass::AxisType AxisType;
00094 typedef typename Superclass::AngleType AngleType;
00095 typedef TScalarType ScaleType;
00096
00102 virtual void SetMatrix(const MatrixType &matrix);
00103
00108 void SetParameters( const ParametersType & parameters );
00109 virtual const ParametersType& GetParameters(void) const;
00111
00113 void SetScale( ScaleType scale );
00114 itkGetConstReferenceMacro( Scale, ScaleType );
00116
00121 const JacobianType & GetJacobian(const InputPointType &point ) const;
00122
00123 protected:
00124 Similarity3DTransform(unsigned int outputSpaceDim,
00125 unsigned int paramDim);
00126 Similarity3DTransform(const MatrixType & matrix,
00127 const OutputVectorType & offset);
00128 Similarity3DTransform();
00129 ~Similarity3DTransform(){};
00130
00131 void PrintSelf(std::ostream &os, Indent indent) const;
00132
00135 void ComputeMatrix();
00136
00138 void ComputeMatrixParameters();
00139
00140 private:
00141 Similarity3DTransform(const Self&);
00142 void operator=(const Self&);
00143
00144 ScaleType m_Scale;
00145
00146 };
00147
00148
00149 }
00150
00151
00152 #define ITK_TEMPLATE_Similarity3DTransform(_, EXPORT, x, y) namespace itk { \
00153 _(1(class EXPORT Similarity3DTransform< ITK_TEMPLATE_1 x >)) \
00154 namespace Templates { typedef Similarity3DTransform< ITK_TEMPLATE_1 x > Similarity3DTransform##y; } \
00155 }
00156
00157 #if ITK_TEMPLATE_EXPLICIT
00158 # include "Templates/itkSimilarity3DTransform+-.h"
00159 #endif
00160
00161 #if ITK_TEMPLATE_TXX
00162 # include "itkSimilarity3DTransform.txx"
00163 #endif
00164
00165 #endif
00166