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 }
00088
00094 virtual OutputType EvaluateAtContinuousIndex(
00095 const ContinuousIndexType & index ) const = 0;
00096
00102 virtual OutputType EvaluateAtIndex(
00103 const IndexType & index ) const = 0;
00104
00105 protected:
00106 ExtrapolateImageFunction(){};
00107 ~ExtrapolateImageFunction(){};
00108 void PrintSelf(std::ostream& os, Indent indent) const
00109 { Superclass::PrintSelf( os, indent ); }
00110
00111 private:
00112 ExtrapolateImageFunction( const Self& );
00113 void operator=( const Self& );
00114
00115 };
00116
00117 }
00118
00119 #endif