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

itkVectorCentralDifferenceImageFunction.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkVectorCentralDifferenceImageFunction.h,v $
00005   Language:  C++
00006   Date:      $Date: 2008-07-04 23:09:49 $
00007   Version:   $Revision: 1.1 $
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 __itkVectorCentralDifferenceImageFunction_h
00019 #define __itkVectorCentralDifferenceImageFunction_h
00020 
00021 #include "itkImageFunction.h"
00022 #include "itkMatrix.h"
00023 #include "itkImageBase.h"
00024 
00025 namespace itk
00026 {
00027 
00028 #ifndef __itkVectorInterpolateImageFunction_h
00029 
00035 template <typename T>
00036 struct GetDimension
00037 {
00038   itkStaticConstMacro(Dimension, int, T::Dimension);
00039 };
00040 #endif
00041 
00042    
00060 template <
00061   class TInputImage, 
00062   class TCoordRep = float >
00063 class ITK_EXPORT VectorCentralDifferenceImageFunction :
00064   public ImageFunction< TInputImage, 
00065                         Matrix<double, \
00066                         ::itk::GetDimension<typename TInputImage::PixelType>::Dimension, \
00067                         ::itk::GetImageDimension<TInputImage>::ImageDimension>,
00068                         TCoordRep >
00069 {
00070 public:
00071   typedef typename TInputImage::PixelType InputPixelType;
00072 
00074   itkStaticConstMacro(Dimension, unsigned int,
00075                       InputPixelType::Dimension);
00076 
00078   itkStaticConstMacro(ImageDimension, unsigned int,
00079                       TInputImage::ImageDimension);
00080 
00082   typedef VectorCentralDifferenceImageFunction Self;
00083   typedef ImageFunction<TInputImage,
00084                         Matrix<double,itkGetStaticConstMacro(Dimension),
00085                                itkGetStaticConstMacro(ImageDimension)>,
00086                         TCoordRep>       Superclass;
00087   typedef SmartPointer<Self>             Pointer;
00088   typedef SmartPointer<const Self>       ConstPointer;
00090 
00092   itkTypeMacro(VectorCentralDifferenceImageFunction, ImageFunction);
00093 
00095   itkNewMacro(Self);
00096 
00098   typedef TInputImage InputImageType;
00099 
00101   typedef typename Superclass::OutputType OutputType;
00102 
00104   typedef typename Superclass::IndexType IndexType;
00105 
00107   typedef typename Superclass::ContinuousIndexType ContinuousIndexType;
00108 
00110   typedef typename Superclass::PointType PointType;
00111 
00119   virtual OutputType EvaluateAtIndex( const IndexType& index ) const;
00120 
00129    virtual OutputType Evaluate( const PointType& point ) const
00130     { 
00131     IndexType index;
00132     this->ConvertPointToNearestIndex( point, index );
00133     return this->EvaluateAtIndex( index ); 
00134     }
00135   virtual OutputType EvaluateAtContinuousIndex( 
00136     const ContinuousIndexType& cindex ) const
00137     { 
00138     IndexType index;
00139     this->ConvertContinuousIndexToNearestIndex( cindex, index );
00140     return this->EvaluateAtIndex( index ); 
00141     }
00143 
00144 protected:
00145   VectorCentralDifferenceImageFunction();
00146   ~VectorCentralDifferenceImageFunction(){};
00147   void PrintSelf(std::ostream& os, Indent indent) const;
00148 
00149 private:
00150   VectorCentralDifferenceImageFunction( const Self& ); //purposely not implemented
00151   void operator=( const Self& ); //purposely not implemented
00152 
00153 };
00154 
00155 } // end namespace itk
00156 
00157 #ifndef ITK_MANUAL_INSTANTIATION
00158 #include "itkVectorCentralDifferenceImageFunction.txx"
00159 #endif
00160 
00161 #endif
00162 

Generated at Tue Jul 29 23:13:43 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000