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

itkTransform.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkTransform.h,v $
00005   Language:  C++
00006   Date:      $Date: 2002/09/11 19:57:13 $
00007   Version:   $Revision: 1.31 $
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 __itkTransform_h
00018 #define __itkTransform_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 
00028 #include "itkObjectFactory.h"
00029 
00030 
00031 namespace itk
00032 {
00033   
00050 template <class TScalarType,
00051           unsigned int NInputDimensions=3, 
00052           unsigned int NOutputDimensions=3>
00053 class ITK_EXPORT  Transform  : public Object
00054 {
00055 public:
00057   typedef Transform  Self;
00058   typedef Object Superclass;
00059   typedef SmartPointer< Self >   Pointer;
00060   typedef SmartPointer< const Self >  ConstPointer;
00061   
00063   itkNewMacro(Self);
00064 
00066   itkTypeMacro( Transform, Object );
00067 
00069   itkStaticConstMacro(InputSpaceDimension, unsigned int, NInputDimensions);
00070   itkStaticConstMacro(OutputSpaceDimension, unsigned int, NOutputDimensions);
00071 
00073   typedef  TScalarType     ScalarType;
00074 
00076   typedef  Array< double >                           ParametersType;
00077 
00079   typedef  Array2D< double >                           JacobianType;
00080 
00082   typedef Vector<TScalarType, NInputDimensions>  InputVectorType;
00083   typedef Vector<TScalarType, NOutputDimensions> OutputVectorType;
00084   
00086   typedef CovariantVector<TScalarType, NInputDimensions>  InputCovariantVectorType;
00087   typedef CovariantVector<TScalarType, NOutputDimensions> OutputCovariantVectorType;
00088   
00090   typedef vnl_vector_fixed<TScalarType, NInputDimensions>  InputVnlVectorType;
00091   typedef vnl_vector_fixed<TScalarType, NOutputDimensions> OutputVnlVectorType;
00092   
00094   typedef Point<TScalarType, NInputDimensions> InputPointType;
00095   typedef Point<TScalarType, NOutputDimensions> OutputPointType;
00096   
00098   virtual OutputPointType TransformPoint(const InputPointType  & ) const
00099     { return OutputPointType(); } 
00100 
00102   virtual OutputVectorType    TransformVector(const InputVectorType &) const
00103     { return OutputVectorType(); }
00104 
00106   virtual OutputVnlVectorType TransformVector(const InputVnlVectorType &) const
00107     { return OutputVnlVectorType(); }
00108 
00110   virtual OutputCovariantVectorType TransformCovariantVector(
00111     const InputCovariantVectorType &) const
00112     { return OutputCovariantVectorType(); } 
00113 
00116   virtual void SetParameters(const ParametersType &) {};
00117 
00119   virtual const ParametersType& GetParameters(void) const
00120     { return m_Parameters; }
00121 
00150   virtual const JacobianType & GetJacobian(const InputPointType  &) const
00151     { 
00152     std::cout << "This message should never show up" << std::endl;
00153     m_Jacobian = JacobianType(NInputDimensions,1); 
00154     m_Jacobian.Fill(0.0); 
00155     return m_Jacobian;
00156     }
00157 
00158 
00160   unsigned int virtual GetNumberOfParameters(void) const 
00161                       { return m_Parameters.Size(); }
00162 
00163 
00164 protected:
00165   Transform(); 
00166   Transform(unsigned int Dimension, unsigned int NumberOfParameters);
00167   virtual ~Transform() {};
00168 
00169 
00170   mutable ParametersType     m_Parameters;
00171 
00172   mutable JacobianType       m_Jacobian;
00173 
00174 private:
00175   Transform(const Self&); //purposely not implemented
00176   void operator=(const Self&); //purposely not implemented
00177 
00178 
00179 };
00180 
00181 } // end namespace itk
00182 
00183 #ifndef ITK_MANUAL_INSTANTIATION
00184 #include "itkTransform.txx"
00185 #endif
00186 
00187 #endif
00188 
00189 
00190 

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