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

itkCentralDifferenceImageFunction.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkCentralDifferenceImageFunction.h,v $
00005   Language:  C++
00006   Date:      $Date: 2002/09/11 19:39:03 $
00007   Version:   $Revision: 1.23 $
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 _itkCentralDifferenceImageFunction_h
00018 #define _itkCentralDifferenceImageFunction_h
00019 
00020 #include "itkImageFunction.h"
00021 
00022 namespace itk
00023 {
00024 
00037 template <class TInputImage, class TCoordRep = float >
00038 class ITK_EXPORT CentralDifferenceImageFunction :
00039   public ImageFunction< TInputImage, double, TCoordRep >
00040 {
00041 public:
00043   typedef CentralDifferenceImageFunction Self;
00044   typedef ImageFunction<TInputImage, double, TCoordRep> Superclass;
00045   typedef SmartPointer<Self> Pointer;
00046   typedef SmartPointer<const Self>  ConstPointer;
00047   
00049   itkTypeMacro(CentralDifferenceImageFunction, ImageFunction);
00050 
00052   itkNewMacro(Self);
00053 
00055   typedef TInputImage InputImageType;
00056 
00058   typedef typename Superclass::OutputType OutputType;
00059 
00061   typedef typename Superclass::IndexType IndexType;
00062   
00064   typedef typename Superclass::ContinuousIndexType ContinuousIndexType;
00065 
00067   typedef typename Superclass::PointType PointType;
00068 
00070   itkStaticConstMacro(ImageDimension, unsigned int,
00071                       InputImageType::ImageDimension);
00072 
00074   virtual double EvaluateAtIndex( const IndexType& index ) const
00075     { return ( this->EvaluateAtIndex( index, 0 ) ); }
00076   virtual double EvaluateAtIndex( const IndexType& index, 
00077     unsigned int dim ) const;
00078   
00080   virtual double Evaluate( const PointType& point ) const
00081     { 
00082       IndexType index;
00083       this->ConvertPointToNearestIndex( point, index );
00084       return this->EvaluateAtIndex( index, 0 ); 
00085     }
00086   virtual double EvaluateAtContinuousIndex( 
00087     const ContinuousIndexType& cindex ) const
00088     { 
00089       IndexType index;
00090       this->ConvertContinuousIndexToNearestIndex( cindex, index );
00091       return this->EvaluateAtIndex( index, 0 ) ; 
00092     }
00093   
00094 protected:
00095   CentralDifferenceImageFunction();
00096   ~CentralDifferenceImageFunction(){};
00097   void PrintSelf(std::ostream& os, Indent indent) const;
00098 
00099 private:
00100   CentralDifferenceImageFunction( const Self& ); //purposely not implemented
00101   void operator=( const Self& ); //purposely not implemented
00102 
00103 };
00104 
00105 } // namespace itk
00106 
00107 #ifndef ITK_MANUAL_INSTANTIATION
00108 #include "itkCentralDifferenceImageFunction.txx"
00109 #endif
00110 
00111 #endif
00112 

Generated at Fri May 21 01:14:32 2004 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000