20 #ifndef MIRTK_CubicBSplineInterpolateImageFunction_H 21 #define MIRTK_CubicBSplineInterpolateImageFunction_H 23 #include "mirtk/BSpline.h" 24 #include "mirtk/BaseImage.h" 25 #include "mirtk/InterpolateImageFunction.h" 26 #include "mirtk/MirrorExtrapolateImageFunction.h" 43 template <
class TImage>
47 mirtkGenericInterpolatorMacro(
49 Interpolation_CubicBSpline
110 VoxelType
Get2D(
double,
double,
double = 0,
double = 0)
const;
125 template <
class TOtherImage>
typename TOtherImage::VoxelType
126 Get2D(
const TOtherImage *,
double,
double,
double = 0,
double = 0)
const;
138 template <
class TOtherImage,
class TCoefficient>
typename TCoefficient::VoxelType
140 double,
double,
double = 0,
double = 0)
const;
146 VoxelType
Get3D(
double,
double,
double = 0,
double = 0)
const;
161 template <
class TOtherImage>
typename TOtherImage::VoxelType
162 Get3D(
const TOtherImage *,
double,
double,
double = 0,
double = 0)
const;
174 template <
class TOtherImage,
class TCoefficient>
typename TCoefficient::VoxelType
176 double,
double,
double = 0,
double = 0)
const;
182 VoxelType
Get4D(
double,
double,
double = 0,
double = 0)
const;
197 template <
class TOtherImage>
typename TOtherImage::VoxelType
198 Get4D(
const TOtherImage *,
double,
double,
double = 0,
double = 0)
const;
210 template <
class TOtherImage,
class TCoefficient>
typename TCoefficient::VoxelType
212 double,
double,
double = 0,
double = 0)
const;
218 VoxelType
Get(
double,
double,
double = 0,
double = 0)
const;
224 virtual VoxelType
GetWithPadding(
double,
double,
double = 0,
double = 0)
const;
233 template <
class TOtherImage>
typename TOtherImage::VoxelType
234 Get(
const TOtherImage *,
double,
double,
double = 0,
double = 0)
const;
246 template <
class TOtherImage,
class TCoefficient>
typename TCoefficient::VoxelType
248 double,
double,
double = 0,
double = 0)
const;
251 virtual VoxelType
GetInside2D(
double,
double,
double = 0,
double = 0)
const;
254 virtual VoxelType
GetInside3D(
double,
double,
double = 0,
double = 0)
const;
257 virtual VoxelType
GetInside4D(
double,
double,
double = 0,
double = 0)
const;
264 virtual VoxelType
GetInside(
double,
double,
double = 0,
double = 0)
const;
267 virtual VoxelType
GetOutside(
double,
double,
double = 0,
double = 0)
const;
305 #endif // MIRTK_CubicBSplineInterpolateImageFunction_H
virtual VoxelType GetInside2D(double, double, double=0, double=0) const
Evaluate generic 2D image without handling boundary conditions.
VoxelType Get(double, double, double=0, double=0) const
virtual VoxelType GetInside4D(double, double, double=0, double=0) const
Evaluate generic 4D image without handling boundary conditions.
virtual void Update()
Update spline coefficients.
virtual void Initialize()
virtual VoxelType GetWithPaddingInside(double, double, double=0, double=0) const
virtual ~GenericCubicBSplineInterpolateImageFunction()
Destructor.
mirtkAttributeMacro(bool, UseInputCoefficients)
Input image contains spline coefficients.
virtual VoxelType GetInside(double, double, double=0, double=0) const
VoxelType Get2D(double, double, double=0, double=0) const
VoxelType GetWithPadding3D(double, double, double=0, double=0) const
virtual VoxelType GetWithPadding(double, double, double=0, double=0) const
VoxelType Get4D(double, double, double=0, double=0) const
CubicBSplineInterpolateImageFunction()
Constructor.
virtual VoxelType GetWithPaddingOutside(double, double, double=0, double=0) const
VoxelType Get3D(double, double, double=0, double=0) const
VoxelType GetWithPadding4D(double, double, double=0, double=0) const
GenericCubicBSplineInterpolateImageFunction()
Constructor.
int _s2
Strides for fast iteration over coefficient image.
virtual VoxelType GetOutside(double, double, double=0, double=0) const
Evaluate generic image at an arbitrary location (in pixels)
VoxelType GetWithPadding2D(double, double, double=0, double=0) const
mirtkAggregateMacro(CoefficientExtrapolator, InfiniteCoefficient)
Infinite discrete coefficient image obtained by extrapolation.
virtual void BoundingInterval(double, int &, int &) const
virtual VoxelType GetInside3D(double, double, double=0, double=0) const
Evaluate generic 3D image without handling boundary conditions.