20 #ifndef MIRTK_FastCubicBSplineInterpolateImageFunction_H 21 #define MIRTK_FastCubicBSplineInterpolateImageFunction_H 23 #include "mirtk/BaseImage.h" 24 #include "mirtk/InterpolateImageFunction.h" 25 #include "mirtk/MirrorExtrapolateImageFunction.h" 35 template <
class T>
class BSpline;
49 template <
class TImage>
53 mirtkGenericInterpolatorMacro(
55 Interpolation_FastCubicBSpline
116 VoxelType
Get2D(
double,
double,
double = 0,
double = 0)
const;
131 template <
class TOtherImage>
typename TOtherImage::VoxelType
132 Get2D(
const TOtherImage *,
double,
double,
double = 0,
double = 0)
const;
144 template <
class TOtherImage,
class TCoefficient>
typename TCoefficient::VoxelType
146 double,
double,
double = 0,
double = 0)
const;
152 VoxelType
Get3D(
double,
double,
double = 0,
double = 0)
const;
167 template <
class TOtherImage>
typename TOtherImage::VoxelType
168 Get3D(
const TOtherImage *,
double,
double,
double = 0,
double = 0)
const;
180 template <
class TOtherImage,
class TCoefficient>
typename TCoefficient::VoxelType
182 double,
double,
double = 0,
double = 0)
const;
188 VoxelType
Get4D(
double,
double,
double = 0,
double = 0)
const;
203 template <
class TOtherImage>
typename TOtherImage::VoxelType
204 Get4D(
const TOtherImage *,
double,
double,
double = 0,
double = 0)
const;
216 template <
class TOtherImage,
class TCoefficient>
typename TCoefficient::VoxelType
218 double,
double,
double = 0,
double = 0)
const;
224 VoxelType
Get(
double,
double,
double = 0,
double = 0)
const;
230 virtual VoxelType
GetWithPadding(
double,
double,
double = 0,
double = 0)
const;
239 template <
class TOtherImage>
typename TOtherImage::VoxelType
240 Get(
const TOtherImage *,
double,
double,
double = 0,
double = 0)
const;
252 template <
class TOtherImage,
class TCoefficient>
typename TCoefficient::VoxelType
254 double,
double,
double = 0,
double = 0)
const;
257 virtual VoxelType
GetInside2D(
double,
double,
double = 0,
double = 0)
const;
260 virtual VoxelType
GetInside3D(
double,
double,
double = 0,
double = 0)
const;
263 virtual VoxelType
GetInside4D(
double,
double,
double = 0,
double = 0)
const;
270 virtual VoxelType
GetInside(
double,
double,
double = 0,
double = 0)
const;
273 virtual VoxelType
GetOutside(
double,
double,
double = 0,
double = 0)
const;
306 template <
class TOtherImage>
307 void Jacobian2D(
Matrix &,
const TOtherImage *,
double,
double,
double = 0,
double = 0)
const;
321 template <
class TOtherImage>
322 void Jacobian3D(
Matrix &,
const TOtherImage *,
double,
double,
double = 0,
double = 0)
const;
336 template <
class TOtherImage>
337 void Jacobian4D(
Matrix &,
const TOtherImage *,
double,
double,
double = 0,
double = 0)
const;
340 void Jacobian(
Matrix &,
double,
double,
double = 0,
double = 0)
const;
349 template <
class TOtherImage>
350 void Jacobian(
Matrix &,
const TOtherImage *,
double,
double,
double = 0,
double = 0)
const;
379 #endif // MIRTK_FastCubicBSplineInterpolateImageFunction_H VoxelType Get4D(double, double, double=0, double=0) const
virtual void BoundingInterval(double, int &, int &) const
virtual void EvaluateJacobianOutside(Matrix &, double, double, double=0, double=0) const
Get 1st order derivatives of given image at arbitrary location (in pixels)
void Jacobian4D(Matrix &, double, double, double=0, double=0) const
GenericFastCubicBSplineInterpolateImageFunction()
Constructor.
VoxelType GetWithPadding2D(double, double, double=0, double=0) const
FastCubicBSplineInterpolateImageFunction()
Constructor.
void Jacobian3D(Matrix &, 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.
VoxelType GetWithPadding4D(double, double, double=0, double=0) const
virtual void Update()
Update spline coefficients.
virtual void Initialize()
virtual void EvaluateJacobianInside(Matrix &, double, double, double=0, double=0) const
Get 1st order derivatives of given image at arbitrary location (in pixels)
VoxelType Get2D(double, double, double=0, double=0) const
virtual VoxelType GetWithPaddingInside(double, double, double=0, double=0) const
virtual VoxelType GetInside3D(double, double, double=0, double=0) const
Evaluate generic 3D image without handling boundary conditions.
void Jacobian(Matrix &, double, double, double=0, double=0) const
Get 1st order derivatives of given image at arbitrary location (in pixels)
VoxelType Get(double, double, double=0, double=0) const
virtual VoxelType GetWithPadding(double, double, double=0, double=0) const
virtual VoxelType GetWithPaddingOutside(double, double, double=0, double=0) const
virtual ~GenericFastCubicBSplineInterpolateImageFunction()
Destructor.
virtual VoxelType GetOutside(double, double, double=0, double=0) const
Evaluate generic image at an arbitrary location (in pixels)
int _s2
Strides for fast iteration over coefficient image.
mirtkAggregateMacro(CoefficientExtrapolator, InfiniteCoefficient)
Infinite discrete coefficient image obtained by extrapolation.
VoxelType GetWithPadding3D(double, double, double=0, double=0) const
void Jacobian2D(Matrix &, double, double, double=0, double=0) const
virtual VoxelType GetInside(double, double, double=0, double=0) const
VoxelType Get3D(double, double, double=0, double=0) const
mirtkAttributeMacro(bool, UseInputCoefficients)
Input image contains spline coefficients.
virtual VoxelType GetInside2D(double, double, double=0, double=0) const
Evaluate generic 2D image without handling boundary conditions.