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-11-28 15:58:04 $
00007   Version:   $Revision: 1.15 $
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   typedef typename Superclass::ParametersValueType    ParametersValueType;
00093 
00095   typedef typename Superclass::JacobianType  JacobianType;
00096 
00098   typedef typename Superclass::OffsetType       OffsetType;
00099   typedef typename Superclass::OffsetValueType  OffsetValueType;
00100 
00102   typedef typename Superclass::MatrixType       MatrixType;
00103   typedef typename Superclass::MatrixValueType  MatrixValueType;
00104 
00106   typedef typename Superclass::InputPointType   InputPointType;
00107   typedef typename Superclass::OutputPointType  OutputPointType;
00108 
00110   typedef typename Superclass::InputVectorType   InputVectorType;
00111   typedef typename Superclass::OutputVectorType  OutputVectorType;
00112 
00114   typedef typename Superclass::InputCovariantVectorType   InputCovariantVectorType;
00115   typedef typename Superclass::OutputCovariantVectorType  OutputCovariantVectorType;
00116 
00118   typedef typename Superclass::InputVnlVectorType   InputVnlVectorType;
00119   typedef typename Superclass::OutputVnlVectorType  OutputVnlVectorType;
00120 
00123   typedef typename Superclass::InverseTransformBaseType InverseTransformBaseType;
00124   typedef typename InverseTransformBaseType::Pointer    InverseTransformBasePointer;
00125 
00127   void SetScale( ScaleType scale );
00128   itkGetConstReferenceMacro( Scale, ScaleType );
00130 
00140   void SetParameters( const ParametersType & parameters );
00141 
00151   const ParametersType & GetParameters( void ) const; 
00152 
00157  const JacobianType & GetJacobian(const InputPointType  &point ) const;
00158 
00160   virtual void SetIdentity( void );
00161 
00166   void CloneInverseTo( Pointer & newinverse ) const;
00167 
00169   bool GetInverse(Self* inverse) const;
00170 
00172   virtual InverseTransformBasePointer GetInverseTransform() const;
00173 
00178   void CloneTo( Pointer & clone ) const;
00179 
00193   virtual void SetMatrix( const MatrixType & matrix );
00194 
00195 protected:
00196   Similarity2DTransform();
00197   Similarity2DTransform( unsigned int spaceDimension, 
00198                          unsigned int parametersDimension);
00199 
00200   ~Similarity2DTransform(){};
00201   void PrintSelf(std::ostream &os, Indent indent) const;
00202 
00206   virtual void ComputeMatrix(void);
00207 
00212   virtual void ComputeMatrixParameters(void);
00213 
00215   void SetVarScale( ScaleType scale )
00216     { m_Scale = scale; }
00217 
00218 private:
00219   Similarity2DTransform(const Self&); //purposely not implemented
00220   void operator=(const Self&); //purposely not implemented
00221 
00222   ScaleType     m_Scale; 
00223 
00224 }; //class Similarity2DTransform
00225 
00226 
00227 }  // namespace itk
00228 
00229 // Define instantiation macro for this template.
00230 #define ITK_TEMPLATE_Similarity2DTransform(_, EXPORT, x, y) namespace itk { \
00231   _(1(class EXPORT Similarity2DTransform< ITK_TEMPLATE_1 x >)) \
00232   namespace Templates { typedef Similarity2DTransform< ITK_TEMPLATE_1 x > Similarity2DTransform##y; } \
00233   }
00234 
00235 #if ITK_TEMPLATE_EXPLICIT
00236 # include "Templates/itkSimilarity2DTransform+-.h"
00237 #endif
00238 
00239 #if ITK_TEMPLATE_TXX
00240 # include "itkSimilarity2DTransform.txx"
00241 #endif
00242 
00243 #endif /* __itkSimilarity2DTransform_h */
00244 

Generated at Fri Apr 16 19:41:49 2010 for ITK by doxygen 1.6.1 written by Dimitri van Heesch, © 1997-2000