Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkSimilarity2DTransform.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkSimilarity2DTransform.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-04-09 09:23:21 $
00007   Version:   $Revision: 1.13 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
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 
00062 template < class TScalarType=double >    // Data type for scalars (float or double)
00063 class ITK_EXPORT Similarity2DTransform : 
00064             public Rigid2DTransform< TScalarType > 
00065 {
00066 public:
00068   typedef Similarity2DTransform             Self;
00069   typedef Rigid2DTransform< TScalarType >   Superclass;
00070   typedef SmartPointer<Self>                Pointer;
00071   typedef SmartPointer<const Self>          ConstPointer;
00072 
00074   itkNewMacro( Self );
00075 
00077   itkTypeMacro( Similarity2DTransform, Rigid2DTransform );
00078 
00080   itkStaticConstMacro(SpaceDimension,           unsigned int, 2);
00081   itkStaticConstMacro(InputSpaceDimension,      unsigned int, 2);
00082   itkStaticConstMacro(OutputSpaceDimension,     unsigned int, 2);
00083   itkStaticConstMacro(ParametersDimension,      unsigned int, 4);
00085 
00087   typedef typename Superclass::ScalarType  ScalarType;
00088   typedef          TScalarType             ScaleType;
00089 
00091   typedef typename Superclass::ParametersType  ParametersType;
00092 
00094   typedef typename Superclass::JacobianType  JacobianType;
00095 
00097   typedef typename Superclass::OffsetType  OffsetType;
00098 
00100   typedef typename Superclass::MatrixType MatrixType;
00101 
00103   typedef typename Superclass::InputPointType   InputPointType;
00104   typedef typename Superclass::OutputPointType  OutputPointType;
00105 
00107   typedef typename Superclass::InputVectorType   InputVectorType;
00108   typedef typename Superclass::OutputVectorType  OutputVectorType;
00109 
00111   typedef typename Superclass::InputCovariantVectorType   InputCovariantVectorType;
00112   typedef typename Superclass::OutputCovariantVectorType  OutputCovariantVectorType;
00113 
00115   typedef typename Superclass::InputVnlVectorType   InputVnlVectorType;
00116   typedef typename Superclass::OutputVnlVectorType  OutputVnlVectorType;
00117 
00120   typedef typename Superclass::InverseTransformBaseType InverseTransformBaseType;
00121   typedef typename InverseTransformBaseType::Pointer    InverseTransformBasePointer;
00122 
00124   void SetScale( ScaleType scale );
00125   itkGetConstReferenceMacro( Scale, ScaleType );
00127 
00137   void SetParameters( const ParametersType & parameters );
00138 
00148   const ParametersType & GetParameters( void ) const; 
00149 
00154  const JacobianType & GetJacobian(const InputPointType  &point ) const;
00155 
00157   virtual void SetIdentity( void );
00158 
00163   void CloneInverseTo( Pointer & newinverse ) const;
00164 
00166   bool GetInverse(Self* inverse) const;
00167 
00169   virtual InverseTransformBasePointer GetInverseTransform() const;
00170 
00175   void CloneTo( Pointer & clone ) const;
00176 
00190   virtual void SetMatrix( const MatrixType & matrix );
00191 
00192 protected:
00193   Similarity2DTransform();
00194   Similarity2DTransform( unsigned int spaceDimension, 
00195                          unsigned int parametersDimension);
00196 
00197   ~Similarity2DTransform(){};
00198   void PrintSelf(std::ostream &os, Indent indent) const;
00199 
00203   virtual void ComputeMatrix(void);
00204 
00209   virtual void ComputeMatrixParameters(void);
00210 
00212   void SetVarScale( ScaleType scale )
00213     { m_Scale = scale; }
00214 
00215 private:
00216   Similarity2DTransform(const Self&); //purposely not implemented
00217   void operator=(const Self&); //purposely not implemented
00218 
00219   ScaleType     m_Scale; 
00220 
00221 }; //class Similarity2DTransform
00222 
00223 
00224 }  // namespace itk
00225 
00226 // Define instantiation macro for this template.
00227 #define ITK_TEMPLATE_Similarity2DTransform(_, EXPORT, x, y) namespace itk { \
00228   _(1(class EXPORT Similarity2DTransform< ITK_TEMPLATE_1 x >)) \
00229   namespace Templates { typedef Similarity2DTransform< ITK_TEMPLATE_1 x > Similarity2DTransform##y; } \
00230   }
00231 
00232 #if ITK_TEMPLATE_EXPLICIT
00233 # include "Templates/itkSimilarity2DTransform+-.h"
00234 #endif
00235 
00236 #if ITK_TEMPLATE_TXX
00237 # include "itkSimilarity2DTransform.txx"
00238 #endif
00239 
00240 #endif /* __itkSimilarity2DTransform_h */
00241 

Generated at Thu May 28 11:38:45 2009 for ITK by doxygen 1.5.5 written by Dimitri van Heesch, © 1997-2000