20 #ifndef MIRTK_FastCubicBSplineInterpolateImageFunction2D_HXX 21 #define MIRTK_FastCubicBSplineInterpolateImageFunction2D_HXX 23 #include "mirtk/FastCubicBSplineInterpolateImageFunction2D.h" 24 #include "mirtk/FastCubicBSplineInterpolateImageFunction.hxx" 31 template <
class TImage>
35 this->NumberOfDimensions(2);
39 template <
class TImage>
40 inline typename GenericFastCubicBSplineInterpolateImageFunction2D<TImage>::VoxelType
42 ::Get(
double x,
double y,
double z,
double t)
const 44 return this->Get2D(x, y, z, t);
48 template <
class TImage>
49 inline typename GenericFastCubicBSplineInterpolateImageFunction2D<TImage>::VoxelType
53 return this->GetWithPadding2D(x, y, z, t);
57 template <
class TImage>
template <
class TOtherImage>
58 inline typename TOtherImage::VoxelType
60 ::Get(
const TOtherImage *coeff,
double x,
double y,
double z,
double t)
const 62 return this->Get2D(coeff, x, y, z, t);
66 template <
class TImage>
template <
class TOtherImage,
class TCoefficient>
67 inline typename TCoefficient::VoxelType
70 double x,
double y,
double z,
double t)
const 72 return this->GetWithPadding2D(input, coeff, x, y, z, t);
76 template <
class TImage>
77 inline typename GenericFastCubicBSplineInterpolateImageFunction2D<TImage>::VoxelType
82 return this->GetInside2D(x, y, z, t);
86 template <
class TImage>
87 inline typename GenericFastCubicBSplineInterpolateImageFunction2D<TImage>::VoxelType
91 if (this->_InfiniteCoefficient) {
92 return voxel_cast<VoxelType>(
Get(this->_InfiniteCoefficient, x, y, z, t));
94 return Get(x, y, z, t);
99 template <
class TImage>
100 inline typename GenericFastCubicBSplineInterpolateImageFunction2D<TImage>::VoxelType
104 return voxel_cast<VoxelType>(GetWithPadding(this->Input(), &this->_Coefficient, x, y, z, t));
108 template <
class TImage>
109 inline typename GenericFastCubicBSplineInterpolateImageFunction2D<TImage>::VoxelType
113 if (this->Extrapolator() && this->_InfiniteCoefficient) {
114 return voxel_cast<VoxelType>(GetWithPadding(this->Extrapolator(), this->_InfiniteCoefficient, x, y, z, t));
116 return GetWithPadding(x, y, z, t);
123 #endif // MIRTK_FastCubicBSplineInterpolateImageFunction2D_HXX GenericFastCubicBSplineInterpolateImageFunction2D()
Default constructor.
string Get(const ParameterList ¶ms, string name)
Get parameter value from parameters list.
virtual VoxelType GetOutside(double, double, double=0, double=0) const
Evaluate generic image at an arbitrary location (in pixels)
virtual VoxelType GetInside(double, double, double=0, double=0) const
virtual VoxelType GetWithPaddingOutside(double, double, double=0, double=0) const
VoxelType GetWithPadding(double, double, double=0, double=0) const
virtual VoxelType GetWithPaddingInside(double, double, double=0, double=0) const
VoxelType Get(double, double, double=0, double=0) const