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

itkScalableAffineTransform.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkScalableAffineTransform.h,v $
00005   Language:  C++
00006   Date:      $Date: 2005/05/03 14:19:23 $
00007   Version:   $Revision: 1.2 $
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 __itkScalableAffineTransform_h
00019 #define __itkScalableAffineTransform_h
00020 
00021 #include "itkAffineTransform.h"
00022 
00023 namespace itk
00024 {
00025 
00026 
00038 template <
00039  class TScalarType=double,      // Data type for scalars (e.g. float or double)
00040  unsigned int NDimensions=3>    // Number of dimensions in the input space
00041 class ITK_EXPORT ScalableAffineTransform 
00042 : public AffineTransform< TScalarType, NDimensions >
00043 {
00044 public:
00046   typedef ScalableAffineTransform                      Self;
00047   typedef AffineTransform< TScalarType, NDimensions >  Superclass;
00048   typedef SmartPointer<Self>                           Pointer;
00049   typedef SmartPointer<const Self>                     ConstPointer;
00050     
00052   itkTypeMacro( ScalableAffineTransform, AffineTransform );
00053   
00055   itkNewMacro( Self );
00056   
00058   itkStaticConstMacro(InputSpaceDimension, unsigned int, NDimensions);
00059   itkStaticConstMacro(OutputSpaceDimension, unsigned int, NDimensions);
00060   itkStaticConstMacro(SpaceDimension, unsigned int, NDimensions);
00061   itkStaticConstMacro(ParametersDimension, unsigned int,
00062                       NDimensions*(NDimensions+1));
00063 
00065   typedef typename Superclass::ParametersType            ParametersType;
00066   typedef typename Superclass::JacobianType              JacobianType;
00067   typedef typename Superclass::ScalarType                ScalarType;
00068   typedef typename Superclass::InputVectorType           InputVectorType;
00069   typedef typename Superclass::OutputVectorType          OutputVectorType;
00070   typedef typename Superclass::InputCovariantVectorType     
00071                                                      InputCovariantVectorType;
00072   typedef typename Superclass::OutputCovariantVectorType    
00073                                                      OutputCovariantVectorType;
00074   typedef typename Superclass::InputVnlVectorType        InputVnlVectorType;
00075   typedef typename Superclass::OutputVnlVectorType       OutputVnlVectorType;
00076   typedef typename Superclass::InputPointType            InputPointType;
00077   typedef typename Superclass::OutputPointType           OutputPointType;
00078   typedef typename Superclass::MatrixType                MatrixType;
00079   typedef typename Superclass::InverseMatrixType         InverseMatrixType;
00080   typedef typename Superclass::CenterType                CenterType;
00081   typedef typename Superclass::OffsetType                OffsetType;
00082   typedef typename Superclass::TranslationType           TranslationType;
00083     
00087   void SetIdentity( void );
00088   
00090   virtual void SetScale( const InputVectorType & scale );
00091   virtual void SetScaleComponent( const InputVectorType & scale )
00092     { this->SetScale(scale); };
00093 
00095   virtual void SetScale( const double scale[NDimensions] );
00096   virtual void SetScaleComponent( const double scale[NDimensions] )
00097     { this->SetScale(scale); };
00098 
00100   virtual const double * GetScale() const 
00101     { return m_Scale; };
00102   virtual const double * GetScaleComponent() const 
00103     { return m_Scale; };
00104 
00109   void SetMatrixComponent(const MatrixType &matrix)
00110     { this->SetMatrix( matrix ); };
00114   const MatrixType & GetMatrixComponent() const 
00115     { return this->GetMatrix(); }
00116 
00120   void SetOffsetComponent(const OffsetType &offset)
00121     { this->SetTranslation( offset ); };
00122 
00126   const OffsetType & GetOffsetComponent(void) const 
00127     { return this->GetTranslation(); }
00128 
00129 
00130 protected:
00138   ScalableAffineTransform(const MatrixType &matrix,
00139                           const OutputVectorType &offset);
00140   ScalableAffineTransform(unsigned int outputSpaceDimension,
00141                           unsigned int parametersDimension);
00142   ScalableAffineTransform();      
00143    
00144   void ComputeMatrix();
00145 
00147   virtual ~ScalableAffineTransform();
00148 
00150   void PrintSelf(std::ostream &s, Indent indent) const;
00151 
00152   void SetVarScale(const double * scale)
00153     { for(int i=0; i<InputSpaceDimension; i++) { m_Scale[i] = scale[i]; } };
00154 
00155 private:
00156 
00157   ScalableAffineTransform(const Self & other);
00158   const Self & operator=( const Self & );
00159   
00160   double               m_Scale[NDimensions];
00161   InputVectorType      m_MatrixScale;
00162 
00163 }; //class ScalableAffineTransform
00164   
00165 }  // namespace itk
00166 
00167 
00168 #ifndef ITK_MANUAL_INSTANTIATION
00169 #include "itkScalableAffineTransform.txx"
00170 #endif
00171 
00172 #endif /* __itkScalableAffineTransform_h */
00173 

Generated at Wed May 24 23:59:42 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000