00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkExtrapolateImageFunction_h
00018 #define __itkExtrapolateImageFunction_h
00019
00020 #include "itkImageFunction.h"
00021
00022 namespace itk
00023 {
00024
00040 template <class TInputImage, class TCoordRep = float>
00041 class ITK_EXPORT ExtrapolateImageFunction :
00042 public ImageFunction< TInputImage,
00043 ITK_TYPENAME NumericTraits<typename TInputImage::PixelType>::RealType, TCoordRep >
00044 {
00045 public:
00047 typedef ExtrapolateImageFunction Self;
00048 typedef ImageFunction<TInputImage,double,TCoordRep> Superclass;
00049 typedef SmartPointer<Self> Pointer;
00050 typedef SmartPointer<const Self> ConstPointer;
00051
00053 itkTypeMacro(ExtrapolateImageFunction, ImageFunction);
00054
00056 typedef typename Superclass::OutputType OutputType;
00057
00059 typedef typename Superclass::InputImageType InputImageType;
00060
00062 itkStaticConstMacro(ImageDimension, unsigned int,
00063 Superclass::ImageDimension);
00064
00066 typedef typename Superclass::PointType PointType;
00067
00069 typedef typename Superclass::IndexType IndexType;
00070
00072 typedef typename Superclass::ContinuousIndexType ContinuousIndexType;
00073
00075 typedef typename NumericTraits<typename TInputImage::PixelType>::RealType RealType;
00076
00082 virtual OutputType Evaluate( const PointType& point ) const
00083 {
00084 ContinuousIndexType index;
00085 this->GetInputImage()->TransformPhysicalPointToContinuousIndex( point, index );
00086 return ( this->EvaluateAtContinuousIndex( index ) );
00087 }
00089
00095 virtual OutputType EvaluateAtContinuousIndex(
00096 const ContinuousIndexType & index ) const = 0;
00097
00103 virtual OutputType EvaluateAtIndex(
00104 const IndexType & index ) const = 0;
00105
00106 protected:
00107 ExtrapolateImageFunction(){};
00108 ~ExtrapolateImageFunction(){};
00109 void PrintSelf(std::ostream& os, Indent indent) const
00110 { Superclass::PrintSelf( os, indent ); }
00111
00112 private:
00113 ExtrapolateImageFunction( const Self& );
00114 void operator=( const Self& );
00115
00116 };
00117
00118 }
00119
00120 #endif
00121