00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunction_h
00019 #define __itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunction_h
00020
00021 #include "itkVectorInterpolateImageFunction.h"
00022
00023 namespace itk
00024 {
00025
00053 template <class TInputImage, class TCoordRep = float>
00054 class ITK_EXPORT VectorLinearInterpolateNearestNeighborExtrapolateImageFunction :
00055 public VectorInterpolateImageFunction<TInputImage,TCoordRep>
00056 {
00057 public:
00058
00060 typedef VectorLinearInterpolateNearestNeighborExtrapolateImageFunction Self;
00061 typedef VectorInterpolateImageFunction<TInputImage,TCoordRep> Superclass;
00062 typedef SmartPointer<Self> Pointer;
00063 typedef SmartPointer<const Self> ConstPointer;
00064
00066 itkNewMacro(Self);
00067
00069 itkTypeMacro(VectorLinearInterpolateNearestNeighborExtrapolateImageFunction,
00070 VectorInterpolateImageFunction);
00071
00073 typedef typename Superclass::InputImageType InputImageType;
00074 typedef typename Superclass::PixelType PixelType;
00075 typedef typename Superclass::ValueType ValueType;
00076 typedef typename Superclass::RealType RealType;
00077
00078 typedef typename Superclass::PointType PointType;
00079
00081 itkStaticConstMacro(Dimension, unsigned int,
00082 Superclass::Dimension);
00083
00085 itkStaticConstMacro(ImageDimension, unsigned int,Superclass::ImageDimension);
00086
00088 typedef typename Superclass::IndexType IndexType;
00089
00091 typedef typename Superclass::ContinuousIndexType ContinuousIndexType;
00092
00094 typedef typename Superclass::OutputType OutputType;
00095
00098 virtual bool IsInsideBuffer( const IndexType & ) const
00099 {
00100 return true;
00101 }
00102
00105 virtual bool IsInsideBuffer( const PointType & ) const
00106 {
00107 return true;
00108 }
00109
00112 virtual bool IsInsideBuffer( const ContinuousIndexType & ) const
00113 {
00114 return true;
00115 }
00116
00122 virtual OutputType EvaluateAtContinuousIndex(
00123 const ContinuousIndexType & index ) const;
00124
00130 virtual OutputType EvaluateAtIndex( const IndexType & index ) const;
00131
00132 protected:
00133 VectorLinearInterpolateNearestNeighborExtrapolateImageFunction();
00134 virtual ~VectorLinearInterpolateNearestNeighborExtrapolateImageFunction() {}
00135
00136 virtual void PrintSelf(std::ostream& os, Indent indent) const;
00137
00138 private:
00139 VectorLinearInterpolateNearestNeighborExtrapolateImageFunction(const Self&);
00140 void operator=(const Self&);
00141
00143 static const unsigned long m_Neighbors;
00144
00145 };
00146
00147 }
00148
00149 #ifndef ITK_MANUAL_INSTANTIATION
00150 #include "itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunction.txx"
00151 #endif
00152
00153 #endif
00154