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

itkIdentityTransform.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkIdentityTransform.h,v $
00005   Language:  C++
00006   Date:      $Date: 2002/09/11 19:57:12 $
00007   Version:   $Revision: 1.8 $
00008 
00009   Copyright (c) 2002 Insight 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 #ifndef __itkIdentityTransform_h
00018 #define __itkIdentityTransform_h
00019 
00020 #include "itkObject.h"
00021 #include "itkPoint.h"
00022 #include "itkVector.h"
00023 #include "itkCovariantVector.h"
00024 #include "vnl/vnl_vector_fixed.h"
00025 #include "itkArray.h"
00026 #include "itkArray2D.h"
00027 #include "itkTransform.h"
00028 
00029 #include "itkObjectFactory.h"
00030 
00031 
00032 namespace itk
00033 {
00034   
00054 template <class TScalarType,
00055           unsigned int NDimensions=3>
00056 class ITK_EXPORT  IdentityTransform  : public Transform<TScalarType,NDimensions,NDimensions>
00057 {
00058 public:
00060   typedef IdentityTransform  Self;
00061   typedef Transform<TScalarType,NDimensions,NDimensions> Superclass;
00062   typedef SmartPointer< Self >   Pointer;
00063   typedef SmartPointer< const Self >  ConstPointer;
00064   
00066   itkNewMacro(Self);
00067 
00069   itkTypeMacro( IdentityTransform, Transform );
00070 
00072   itkStaticConstMacro(InputSpaceDimension, unsigned int, NDimensions);
00073   itkStaticConstMacro(OutputSpaceDimension, unsigned int, NDimensions);
00074   
00076   typedef  TScalarType     ScalarType;
00077 
00079   typedef  typename Superclass::ParametersType                 ParametersType;
00080 
00082   typedef  typename Superclass::JacobianType                   JacobianType;
00083 
00085   typedef Vector<TScalarType,
00086                 itkGetStaticConstMacro(InputSpaceDimension)>  InputVectorType;
00087   typedef Vector<TScalarType,
00088                 itkGetStaticConstMacro(OutputSpaceDimension)> OutputVectorType;
00089   
00091   typedef CovariantVector<TScalarType,
00092                           itkGetStaticConstMacro(InputSpaceDimension)>  InputCovariantVectorType;
00093   typedef CovariantVector<TScalarType,
00094                           itkGetStaticConstMacro(OutputSpaceDimension)> OutputCovariantVectorType;
00095   
00097   typedef vnl_vector_fixed<TScalarType,
00098                            itkGetStaticConstMacro(InputSpaceDimension)>  InputVnlVectorType;
00099   typedef vnl_vector_fixed<TScalarType,
00100                            itkGetStaticConstMacro(OutputSpaceDimension)> OutputVnlVectorType;
00101   
00103   typedef Point<TScalarType,
00104                 itkGetStaticConstMacro(InputSpaceDimension)> InputPointType;
00105   typedef Point<TScalarType,
00106                 itkGetStaticConstMacro(OutputSpaceDimension)> OutputPointType;
00107   
00109   virtual OutputPointType TransformPoint(const InputPointType  &point ) const
00110     { return point; }
00111 
00113   virtual OutputVectorType TransformVector(const InputVectorType &vector) const
00114     { return vector; }
00115 
00117   virtual OutputVnlVectorType TransformVector(const InputVnlVectorType &vector) const
00118     { return vector; }
00119 
00121   virtual OutputCovariantVectorType TransformCovariantVector(
00122     const InputCovariantVectorType &vector) const
00123     { return vector; }
00124 
00127   virtual void SetParameters(const ParametersType &) {};
00128 
00157   virtual const JacobianType & GetJacobian(const InputPointType  &point ) const
00158     { 
00159     m_Jacobian = JacobianType(NDimensions,1); 
00160     m_Jacobian.Fill(0.0); 
00161     return m_Jacobian;
00162     }
00163 
00164 
00165 
00166 protected:
00167   IdentityTransform():Transform<TScalarType,NDimensions,NDimensions>(NDimensions,1) {}; 
00168   virtual ~IdentityTransform() {};
00169 
00170 
00171 private:
00172   IdentityTransform(const Self&); //purposely not implemented
00173   void operator=(const Self&); //purposely not implemented
00174 
00175 
00176 };
00177 
00178 } // end namespace itk
00179 
00180 
00181 #endif
00182 
00183 
00184 

Generated at Wed Mar 12 01:12:59 2003 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000