Public Member Functions | Static Public Member Functions | List of all members
mirtk::GenericLinearInterpolateImageFunction< TImage > Class Template Reference

#include <LinearInterpolateImageFunction.h>

Inheritance diagram for mirtk::GenericLinearInterpolateImageFunction< TImage >:
Inheritance graph
Collaboration diagram for mirtk::GenericLinearInterpolateImageFunction< TImage >:
Collaboration graph

Public Member Functions

virtual void BoundingInterval (double, int &, int &) const
 
virtual void EvaluateJacobianInside (Matrix &, double, double, double=0, double=NaN) const
 
virtual void EvaluateJacobianOutside (Matrix &, double, double, double=0, double=NaN) const
 
virtual void EvaluateJacobianWithPaddingInside (Matrix &, double, double, double=0, double=NaN) const
 
virtual void EvaluateJacobianWithPaddingOutside (Matrix &, double, double, double=0, double=NaN) const
 
 GenericLinearInterpolateImageFunction ()
 Default constructor.
 
VoxelType Get (double, double, double=0, double=0) const
 
template<class TOtherImage >
TOtherImage::VoxelType Get (const TOtherImage *, double, double, double=0, double=0) const
 
VoxelType Get2D (double, double, double=0, double=0) const
 
template<class TOtherImage >
TOtherImage::VoxelType Get2D (const TOtherImage *, double, double, double=0, double=0) const
 
VoxelType Get3D (double, double, double=0, double=0) const
 
template<class TOtherImage >
TOtherImage::VoxelType Get3D (const TOtherImage *, double, double, double=0, double=0) const
 
VoxelType Get4D (double, double, double=0, double=0) const
 
template<class TOtherImage >
TOtherImage::VoxelType Get4D (const TOtherImage *, double, double, double=0, double=0) const
 
virtual VoxelType GetInside (double, double, double=0, double=0) const
 
template<>
GenericLinearInterpolateImageFunction< BaseImage >::VoxelType GetInside (double x, double y, double z, double t) const
 
virtual VoxelType GetInside2D (double, double, double=0, double=0) const
 Evaluate generic 2D image without handling boundary conditions.
 
virtual VoxelType GetInside3D (double, double, double=0, double=0) const
 Evaluate generic 3D image without handling boundary conditions.
 
virtual VoxelType GetInside4D (double, double, double=0, double=0) const
 Evaluate generic 4D image without handling boundary conditions.
 
virtual VoxelType GetOutside (double, double, double=0, double=0) const
 Evaluate generic image at an arbitrary location (in pixels)
 
virtual VoxelType GetWithPadding (double, double, double=0, double=0) const
 
template<class TOtherImage >
TOtherImage::VoxelType GetWithPadding (const TOtherImage *, double, double, double=0, double=0) const
 
VoxelType GetWithPadding2D (double, double, double=0, double=0) const
 
template<class TOtherImage >
TOtherImage::VoxelType GetWithPadding2D (const TOtherImage *, double, double, double=0, double=0) const
 
VoxelType GetWithPadding3D (double, double, double=0, double=0) const
 
template<class TOtherImage >
TOtherImage::VoxelType GetWithPadding3D (const TOtherImage *, double, double, double=0, double=0) const
 
VoxelType GetWithPadding4D (double, double, double=0, double=0) const
 
template<class TOtherImage >
TOtherImage::VoxelType GetWithPadding4D (const TOtherImage *, double, double, double=0, double=0) const
 
virtual VoxelType GetWithPaddingInside (double, double, double=0, double=0) const
 
virtual VoxelType GetWithPaddingOutside (double, double, double=0, double=0) const
 
virtual void Initialize (bool=false)
 Initialize interpolation function. More...
 
void Jacobian (Matrix &, double, double, double=0., double=NaN) const
 Get 1st order derivatives of given image at arbitrary location (in pixels)
 
template<class TOtherImage >
void Jacobian (Matrix &, const TOtherImage *, double, double, double=0., double=NaN) const
 
void Jacobian2D (Matrix &, double, double, double=0., double=NaN) const
 
template<class TOtherImage >
void Jacobian2D (Matrix &, const TOtherImage *, double, double, double=0., double=NaN) const
 
void Jacobian3D (Matrix &, double, double, double=0., double=NaN) const
 
template<class TOtherImage >
void Jacobian3D (Matrix &, const TOtherImage *, double, double, double=0., double=NaN) const
 
void Jacobian4D (Matrix &, double, double, double=0., double=NaN) const
 
template<class TOtherImage >
void Jacobian4D (Matrix &, const TOtherImage *, double, double, double=0., double=NaN) const
 
void JacobianWithPadding (Matrix &, double, double, double=0, double=NaN) const
 Get 1st order derivatives of given image at arbitrary location (in pixels)
 
void JacobianWithPadding2D (Matrix &, double, double, double=0., double=NaN) const
 
void JacobianWithPadding3D (Matrix &, double, double, double=0., double=NaN) const
 
void JacobianWithPadding4D (Matrix &, double, double, double=0., double=NaN) const
 
virtual ~GenericLinearInterpolateImageFunction ()
 Destructor.
 
- Public Member Functions inherited from mirtk::GenericInterpolateImageFunction< TImage >
virtual double EvaluateInside (double, double, double=0, double=0) const
 
virtual void EvaluateInside (double *, double, double, double=0, int=1) const
 
virtual void EvaluateInside (Vector &, double, double, double=0, double=0) const
 
virtual double EvaluateOutside (double, double, double=0, double=0) const
 Evaluate scalar image at an arbitrary location (in pixels)
 
virtual void EvaluateOutside (double *, double, double, double=0, int=1) const
 Evaluate multi-channel image at an arbitrary location (in pixels)
 
virtual void EvaluateOutside (Vector &, double, double, double=0, double=0) const
 Evaluate vector image at an arbitrary location (in pixels)
 
virtual double EvaluateWithPaddingInside (double, double, double=0, double=0) const
 
virtual void EvaluateWithPaddingInside (double *, double, double, double=0, int=1) const
 
virtual void EvaluateWithPaddingInside (Vector &, double, double, double=0, double=0) const
 
virtual double EvaluateWithPaddingOutside (double, double, double=0, double=0) const
 
virtual void EvaluateWithPaddingOutside (double *, double, double, double=0, int=1) const
 
virtual void EvaluateWithPaddingOutside (Vector &, double, double, double=0, double=0) const
 
virtual void Extrapolator (ExtrapolateImageFunction *, bool=false)
 Set extrapolate image function for evaluation outside of image domain.
 
ExtrapolatorTypeExtrapolator ()
 
const ExtrapolatorTypeExtrapolator () const
 
VoxelType Get (double, double, double=0, double=0) const
 
VoxelType GetWithPadding (double, double, double=0, double=0) const
 
virtual void Input (const BaseImage *)
 Set input image.
 
const ImageType * Input () const
 Get input image.
 
virtual ExtrapolateImageFunctionNew (enum ExtrapolationMode, const BaseImage *=NULL)
 Construct extrapolator which is compatible with this interpolator.
 
VoxelType operator() (double, double, double=0, double=0) const
 Evaluate generic image at an arbitrary location (in pixels)
 
virtual ~GenericInterpolateImageFunction ()
 Destructor.
 
- Public Member Functions inherited from mirtk::InterpolateImageFunction
const ImageAttributesAttributes () const
 Lattice attributes.
 
virtual void BoundingBox (double, double, int &, int &, int &, int &) const
 Returns discrete boundaries of local 2D image region needed for interpolation.
 
virtual void BoundingBox (double, double, double, int &, int &, int &, int &, int &, int &) const
 Returns discrete boundaries of local 3D image region needed for interpolation.
 
virtual void BoundingBox (double, double, double, double, int &, int &, int &, int &, int &, int &, int &, int &) const
 Returns discrete boundaries of local 4D image region needed for interpolation.
 
double Evaluate (double, double, double=0, double=0) const
 
double Evaluate (const Point &, double=0) const
 
double Evaluate (double, double, double=0, double=0)
 
void Evaluate (double *, double, double, double=0, int=1) const
 
void Evaluate (double *, const Point &, int=1) const
 
void Evaluate (Vector &, double, double, double=0, double=0) const
 
template<class TVoxel >
void Evaluate (GenericImage< TVoxel > &) const
 Evaluate image function at all locations of the output image.
 
void EvaluateJacobian (Matrix &, double, double, double=0, double=NaN) const
 
void EvaluateJacobianWithPadding (Matrix &, double, double, double=0, double=NaN) const
 
double EvaluateWithPadding (double, double, double=0, double=0) const
 
void EvaluateWithPadding (double *, double, double, double=0, int=1) const
 
void EvaluateWithPadding (Vector &, double, double, double=0, double=0) const
 
enum ExtrapolationMode ExtrapolationMode () const
 Get extrapolation mode used by this interpolator.
 
ExtrapolateImageFunctionExtrapolator ()
 
const ExtrapolateImageFunctionExtrapolator () const
 
void ImageToWorld (double &, double &) const
 Convert image location (in pixels) to world coordinates (in mm)
 
void ImageToWorld (double &, double &, double &) const
 Convert image location (in pixels) to world coordinates (in mm)
 
void ImageToWorld (Point &) const
 Convert image location (in pixels) to world coordinates (in mm)
 
void ImageToWorld (Vector3 &) const
 Convert image vector (in pixels) to world coordinates (in mm)
 
virtual void Initialize ()
 
void Input (const BaseImage *)
 Set input image.
 
const BaseImageInput () const
 Get input image.
 
void Inside (double &, double &, double &, double &) const
 
void Inside (double &, double &, double &, double &, double &, double &) const
 
void Inside (double &, double &, double &, double &, double &, double &, double &, double &) const
 
virtual enum InterpolationMode InterpolationMode () const =0
 Get interpolation mode corresponding to this interpolator.
 
bool IsForeground (double, double) const
 
bool IsForeground (double, double, double) const
 
bool IsForeground (double, double, double, double) const
 
bool IsForeground (const Point &) const
 
bool IsForeground (const Point &, double) const
 
bool IsInside (double, double) const
 
bool IsInside (double, double, double) const
 
bool IsInside (double, double, double, double) const
 
bool IsInside (const Point &) const
 
bool IsInside (const Point &, double) const
 
bool IsOutside (double, double) const
 
bool IsOutside (double, double, double) const
 
bool IsOutside (double, double, double, double) const
 
bool IsOutside (const Point &) const
 
bool IsOutside (const Point &, double) const
 
int T () const
 Image size along t axis.
 
double TSize () const
 Image spacing along t axis.
 
virtual void Update ()
 
void WorldToImage (double &, double &) const
 Convert world coordinates (in mm) to image location (in pixels)
 
void WorldToImage (double &, double &, double &) const
 Convert world coordinates (in mm) to image location (in pixels)
 
void WorldToImage (Point &) const
 Convert world coordinates (in mm) to image location (in pixels)
 
void WorldToImage (Vector3 &) const
 Convert world coordinates vector (in mm) to image vector (in pixels)
 
int X () const
 Image size along x axis.
 
double XSize () const
 Image spacing along x axis.
 
int Y () const
 Image size along y axis.
 
double YSize () const
 Image spacing along y axis.
 
int Z () const
 Image size along z axis.
 
double ZSize () const
 Image spacing along z axis.
 
virtual ~InterpolateImageFunction ()
 Destructor.
 
- Public Member Functions inherited from mirtk::ImageFunction
virtual ~ImageFunction ()
 Destructor.
 
- Public Member Functions inherited from mirtk::Object
virtual const char * NameOfClass () const =0
 Get name of class, which this object is an instance of.
 
virtual ParameterList Parameter () const
 Get parameter name/value pairs.
 
bool Parameter (const ParameterList &)
 Set parameters from name/value pairs.
 
virtual bool Set (const char *name, const char *value)
 
virtual ~Object ()
 Destructor.
 

Static Public Member Functions

static int ComputeWeights (double, Real[2])
 
- Static Public Member Functions inherited from mirtk::GenericInterpolateImageFunction< TImage >
static GenericInterpolateImageFunctionNew (enum InterpolationMode=Interpolation_Default, const TImage *=NULL)
 Construct interpolator with default infinite extension of input image.
 
static GenericInterpolateImageFunctionNew (enum InterpolationMode, enum ExtrapolationMode, const TImage *=NULL)
 
- Static Public Member Functions inherited from mirtk::InterpolateImageFunction
static InterpolateImageFunctionNew (enum InterpolationMode=Interpolation_Default, const BaseImage *=NULL)
 Construct interpolator with default infinite extension of input image.
 
static InterpolateImageFunctionNew (enum InterpolationMode, enum ExtrapolationMode, const BaseImage *=NULL)
 
- Static Public Member Functions inherited from mirtk::Object
static const char * NameOfType ()
 Get name of this class type.
 

Additional Inherited Members

- Protected Member Functions inherited from mirtk::GenericInterpolateImageFunction< TImage >
 GenericInterpolateImageFunction ()
 Default constructor.
 
- Protected Member Functions inherited from mirtk::InterpolateImageFunction
 InterpolateImageFunction ()
 Default constructor.
 
- Protected Member Functions inherited from mirtk::ImageFunction
 ImageFunction ()
 Default constructor.
 
 ImageFunction (const ImageFunction &)
 Copy constructor.
 
- Protected Member Functions inherited from mirtk::Object
template<typename... Args>
void Throw (ErrorType err, const char *func, Args... args) const
 
- Static Protected Member Functions inherited from mirtk::Object
template<typename... Args>
static void ThrowStatic (ErrorType err, const char *cls, const char *func, Args... args)
 
- Protected Attributes inherited from mirtk::InterpolateImageFunction
ExtrapolateImageFunction_InfiniteInput
 
bool _InfiniteInputOwner
 Whether infinite discrete image was instantiated by this image function.
 
double _x1
 

Detailed Description

template<class TImage>
class mirtk::GenericLinearInterpolateImageFunction< TImage >

Linear interpolation of generic image

Definition at line 34 of file LinearInterpolateImageFunction.h.

Member Function Documentation

§ BoundingInterval()

template<class TImage >
void mirtk::GenericLinearInterpolateImageFunction< TImage >::BoundingInterval ( double  x,
int &  i,
int &  I 
) const
virtual

Returns interval of discrete image indices whose values are needed for interpolation of the image value at a given continuous coordinate

Implements mirtk::InterpolateImageFunction.

Definition at line 110 of file LinearInterpolateImageFunction.hxx.

§ ComputeWeights()

template<class TImage >
int mirtk::GenericLinearInterpolateImageFunction< TImage >::ComputeWeights ( double  x,
Real  w[2] 
)
inlinestatic

Returns truncated integral part of floating point

Parameters
[in]xFloating point number.
[out]wLinear interpolation weights for closest lattice nodes.

Definition at line 95 of file LinearInterpolateImageFunction.hxx.

§ EvaluateJacobianInside()

template<class TImage >
void mirtk::GenericLinearInterpolateImageFunction< TImage >::EvaluateJacobianInside ( Matrix jac,
double  x,
double  y,
double  z = 0,
double  t = NaN 
) const
virtual

Get 1st order derivatives of given image at arbitrary location (in pixels)

When the image has scalar data type and stores vector components in the fourth dimension, the derivatives of all components are evaluated when the t coordinate is set to NaN. Otherwise, only the derivatives of the specified t component are evaluated.

Reimplemented from mirtk::InterpolateImageFunction.

Definition at line 810 of file LinearInterpolateImageFunction.hxx.

§ EvaluateJacobianOutside()

template<class TImage >
void mirtk::GenericLinearInterpolateImageFunction< TImage >::EvaluateJacobianOutside ( Matrix jac,
double  x,
double  y,
double  z = 0,
double  t = NaN 
) const
virtual

Get 1st order derivatives of given image at arbitrary location (in pixels)

When the image has scalar data type and stores vector components in the fourth dimension, the derivatives of all components are evaluated when the t coordinate is set to NaN. Otherwise, only the derivatives of the specified t component are evaluated.

Reimplemented from mirtk::InterpolateImageFunction.

Definition at line 818 of file LinearInterpolateImageFunction.hxx.

§ EvaluateJacobianWithPaddingInside()

template<class TImage >
void mirtk::GenericLinearInterpolateImageFunction< TImage >::EvaluateJacobianWithPaddingInside ( Matrix jac,
double  x,
double  y,
double  z = 0,
double  t = NaN 
) const
virtual

Get 1st order derivatives of given image at arbitrary location (in pixels)

When the image has scalar data type and stores vector components in the fourth dimension, the derivatives of all components are evaluated when the t coordinate is set to NaN. Otherwise, only the derivatives of the specified t component are evaluated.

Reimplemented from mirtk::InterpolateImageFunction.

Definition at line 830 of file LinearInterpolateImageFunction.hxx.

§ EvaluateJacobianWithPaddingOutside()

template<class TImage >
void mirtk::GenericLinearInterpolateImageFunction< TImage >::EvaluateJacobianWithPaddingOutside ( Matrix jac,
double  x,
double  y,
double  z = 0,
double  t = NaN 
) const
virtual

Get 1st order derivatives of given image at arbitrary location (in pixels)

When the image has scalar data type and stores vector components in the fourth dimension, the derivatives of all components are evaluated when the t coordinate is set to NaN. Otherwise, only the derivatives of the specified t component are evaluated.

Reimplemented from mirtk::InterpolateImageFunction.

Definition at line 838 of file LinearInterpolateImageFunction.hxx.

§ Get() [1/2]

template<class TImage >
GenericLinearInterpolateImageFunction< TImage >::VoxelType mirtk::GenericLinearInterpolateImageFunction< TImage >::Get ( double  x,
double  y,
double  z = 0,
double  t = 0 
) const
inline

Get value of given image at arbitrary location (in pixels)

This function is used to interpolate the image value at arbitrary locations when no extrapolator was set.

Definition at line 603 of file LinearInterpolateImageFunction.hxx.

§ Get() [2/2]

template<class TImage >
template<class TOtherImage >
TOtherImage::VoxelType mirtk::GenericLinearInterpolateImageFunction< TImage >::Get ( const TOtherImage *  input,
double  x,
double  y,
double  z = 0,
double  t = 0 
) const
inline

Get value of given image at arbitrary location (in pixels)

If the location is inside the finite domain of the image, an actual image instance can be passed as first argument directly such as an instance of GenericImage. Otherwise, an image function which extends the finite image domain to an infinite lattice is needed, i.e., an instance of a subclass of ExtrapolateImageFunction.

Definition at line 629 of file LinearInterpolateImageFunction.hxx.

§ Get2D() [1/2]

template<class TImage >
GenericLinearInterpolateImageFunction< TImage >::VoxelType mirtk::GenericLinearInterpolateImageFunction< TImage >::Get2D ( double  x,
double  y,
double  z = 0,
double  t = 0 
) const
inline

Get value of given 2D image at arbitrary location (in pixels)

This function is used to interpolate the image value at arbitrary locations when no extrapolator was set.

Definition at line 123 of file LinearInterpolateImageFunction.hxx.

§ Get2D() [2/2]

template<class TImage >
template<class TOtherImage >
TOtherImage::VoxelType mirtk::GenericLinearInterpolateImageFunction< TImage >::Get2D ( const TOtherImage *  input,
double  x,
double  y,
double  z = 0,
double  t = 0 
) const
inline

Get value of given 2D image at arbitrary location (in pixels)

If the location is inside the finite domain of the image, an actual image instance can be passed as first argument directly such as an instance of GenericImage. Otherwise, an image function which extends the finite image domain to an infinite lattice is needed, i.e., an instance of a subclass of ExtrapolateImageFunction.

Definition at line 203 of file LinearInterpolateImageFunction.hxx.

§ Get3D() [1/2]

template<class TImage >
GenericLinearInterpolateImageFunction< TImage >::VoxelType mirtk::GenericLinearInterpolateImageFunction< TImage >::Get3D ( double  x,
double  y,
double  z = 0,
double  t = 0 
) const
inline

Get value of given 3D image at arbitrary location (in pixels)

This function is used to interpolate the image value at arbitrary locations when no extrapolator was set.

Definition at line 269 of file LinearInterpolateImageFunction.hxx.

§ Get3D() [2/2]

template<class TImage >
template<class TOtherImage >
TOtherImage::VoxelType mirtk::GenericLinearInterpolateImageFunction< TImage >::Get3D ( const TOtherImage *  input,
double  x,
double  y,
double  z = 0,
double  t = 0 
) const
inline

Get value of given 3D image at arbitrary location (in pixels)

If the location is inside the finite domain of the image, an actual image instance can be passed as first argument directly such as an instance of GenericImage. Otherwise, an image function which extends the finite image domain to an infinite lattice is needed, i.e., an instance of a subclass of ExtrapolateImageFunction.

Definition at line 355 of file LinearInterpolateImageFunction.hxx.

§ Get4D() [1/2]

template<class TImage >
GenericLinearInterpolateImageFunction< TImage >::VoxelType mirtk::GenericLinearInterpolateImageFunction< TImage >::Get4D ( double  x,
double  y,
double  z = 0,
double  t = 0 
) const
inline

Get value of given 3D image at arbitrary location (in pixels)

This function is used to interpolate the image value at arbitrary locations when no extrapolator was set.

Definition at line 430 of file LinearInterpolateImageFunction.hxx.

§ Get4D() [2/2]

template<class TImage >
template<class TOtherImage >
TOtherImage::VoxelType mirtk::GenericLinearInterpolateImageFunction< TImage >::Get4D ( const TOtherImage *  input,
double  x,
double  y,
double  z = 0,
double  t = 0 
) const
inline

Get value of given 4D image at arbitrary location (in pixels)

If the location is inside the finite domain of the image, an actual image instance can be passed as first argument directly such as an instance of GenericImage. Otherwise, an image function which extends the finite image domain to an infinite lattice is needed, i.e., an instance of a subclass of ExtrapolateImageFunction.

Definition at line 516 of file LinearInterpolateImageFunction.hxx.

§ GetInside() [1/2]

template<class TImage >
GenericLinearInterpolateImageFunction< TImage >::VoxelType mirtk::GenericLinearInterpolateImageFunction< TImage >::GetInside ( double  x,
double  y,
double  z = 0,
double  t = 0 
) const
inlinevirtual

Evaluate generic image without handling boundary conditions

This version is faster than EvaluateOutside, but is only defined inside the domain for which all image values required for interpolation are defined and thus require no extrapolation of the finite image.

Implements mirtk::GenericInterpolateImageFunction< TImage >.

Reimplemented in mirtk::GenericLinearInterpolateImageFunction2D< TImage >, mirtk::GenericLinearInterpolateImageFunction3D< TImage >, mirtk::GenericLinearInterpolateImageFunction4D< TImage >, mirtk::GenericLinearInterpolateImageFunction2D< BaseImage >, mirtk::GenericLinearInterpolateImageFunction3D< BaseImage >, mirtk::GenericLinearInterpolateImageFunction4D< CPImage >, and mirtk::GenericLinearInterpolateImageFunction4D< BaseImage >.

Definition at line 748 of file LinearInterpolateImageFunction.hxx.

§ GetInside() [2/2]

template<>
GenericLinearInterpolateImageFunction< BaseImage >::VoxelType mirtk::GenericLinearInterpolateImageFunction< BaseImage >::GetInside ( double  ,
double  ,
double  ,
double   
) const
inlinevirtual

Evaluate generic image without handling boundary conditions

This version is faster than GetOutside, but is only defined inside the domain for which all image values required for interpolation are defined and thus require no extrapolation of the finite image.

Implements mirtk::GenericInterpolateImageFunction< TImage >.

Reimplemented in mirtk::GenericLinearInterpolateImageFunction2D< BaseImage >, mirtk::GenericLinearInterpolateImageFunction3D< BaseImage >, mirtk::GenericLinearInterpolateImageFunction4D< CPImage >, and mirtk::GenericLinearInterpolateImageFunction4D< BaseImage >.

Definition at line 763 of file LinearInterpolateImageFunction.hxx.

§ GetWithPadding() [1/2]

template<class TImage >
GenericLinearInterpolateImageFunction< TImage >::VoxelType mirtk::GenericLinearInterpolateImageFunction< TImage >::GetWithPadding ( double  x,
double  y,
double  z = 0,
double  t = 0 
) const
inlinevirtual

§ GetWithPadding() [2/2]

template<class TImage >
template<class TOtherImage >
TOtherImage::VoxelType mirtk::GenericLinearInterpolateImageFunction< TImage >::GetWithPadding ( const TOtherImage *  input,
double  x,
double  y,
double  z = 0,
double  t = 0 
) const
inline

Get value of given image at arbitrary location (in pixels)

This function is used to only interpolate foreground image values. If fully outside the foreground region, the _DefaultValue is returned.

If the location is inside the finite domain of the image, an actual image instance can be passed as first argument directly such as an instance of GenericImage. Otherwise, an image function which extends the finite image domain to an infinite lattice is needed, i.e., an instance of a subclass of ExtrapolateImageFunction.

Definition at line 642 of file LinearInterpolateImageFunction.hxx.

§ GetWithPadding2D() [1/2]

template<class TImage >
GenericLinearInterpolateImageFunction< TImage >::VoxelType mirtk::GenericLinearInterpolateImageFunction< TImage >::GetWithPadding2D ( double  x,
double  y,
double  z = 0,
double  t = 0 
) const
inline

Get value of given 2D image at arbitrary location (in pixels)

This function is used to only interpolate foreground image values. If fully outside the foreground region, the _DefaultValue is returned.

Definition at line 164 of file LinearInterpolateImageFunction.hxx.

§ GetWithPadding2D() [2/2]

template<class TImage >
template<class TOtherImage >
TOtherImage::VoxelType mirtk::GenericLinearInterpolateImageFunction< TImage >::GetWithPadding2D ( const TOtherImage *  input,
double  x,
double  y,
double  z = 0,
double  t = 0 
) const
inline

Get value of given 2D image at arbitrary location (in pixels)

This function is used to only interpolate foreground image values. If fully outside the foreground region, the _DefaultValue is returned.

If the location is inside the finite domain of the image, an actual image instance can be passed as first argument directly such as an instance of GenericImage. Otherwise, an image function which extends the finite image domain to an infinite lattice is needed, i.e., an instance of a subclass of ExtrapolateImageFunction.

Definition at line 227 of file LinearInterpolateImageFunction.hxx.

§ GetWithPadding3D() [1/2]

template<class TImage >
GenericLinearInterpolateImageFunction< TImage >::VoxelType mirtk::GenericLinearInterpolateImageFunction< TImage >::GetWithPadding3D ( double  x,
double  y,
double  z = 0,
double  t = 0 
) const
inline

Get value of given 3D image at arbitrary location (in pixels)

This function is used to only interpolate foreground image values. If fully outside the foreground region, the _DefaultValue is returned.

Definition at line 314 of file LinearInterpolateImageFunction.hxx.

§ GetWithPadding3D() [2/2]

template<class TImage >
template<class TOtherImage >
TOtherImage::VoxelType mirtk::GenericLinearInterpolateImageFunction< TImage >::GetWithPadding3D ( const TOtherImage *  input,
double  x,
double  y,
double  z = 0,
double  t = 0 
) const
inline

Get value of given 3D image at arbitrary location (in pixels)

This function is used to only interpolate foreground image values. If fully outside the foreground region, the _DefaultValue is returned.

If the location is inside the finite domain of the image, an actual image instance can be passed as first argument directly such as an instance of GenericImage. Otherwise, an image function which extends the finite image domain to an infinite lattice is needed, i.e., an instance of a subclass of ExtrapolateImageFunction.

Definition at line 385 of file LinearInterpolateImageFunction.hxx.

§ GetWithPadding4D() [1/2]

template<class TImage >
GenericLinearInterpolateImageFunction< TImage >::VoxelType mirtk::GenericLinearInterpolateImageFunction< TImage >::GetWithPadding4D ( double  x,
double  y,
double  z = 0,
double  t = 0 
) const
inline

Get value of given 4D image at arbitrary location (in pixels)

This function is used to only interpolate foreground image values. If fully outside the foreground region, the _DefaultValue is returned.

Definition at line 476 of file LinearInterpolateImageFunction.hxx.

§ GetWithPadding4D() [2/2]

template<class TImage >
template<class TOtherImage >
TOtherImage::VoxelType mirtk::GenericLinearInterpolateImageFunction< TImage >::GetWithPadding4D ( const TOtherImage *  input,
double  x,
double  y,
double  z = 0,
double  t = 0 
) const
inline

Get value of given 4D image at arbitrary location (in pixels)

This function is used to only interpolate foreground image values. If fully outside the foreground region, the _DefaultValue is returned.

If the location is inside the finite domain of the image, an actual image instance can be passed as first argument directly such as an instance of GenericImage. Otherwise, an image function which extends the finite image domain to an infinite lattice is needed, i.e., an instance of a subclass of ExtrapolateImageFunction.

Definition at line 558 of file LinearInterpolateImageFunction.hxx.

§ GetWithPaddingInside()

template<class TImage >
GenericLinearInterpolateImageFunction< TImage >::VoxelType mirtk::GenericLinearInterpolateImageFunction< TImage >::GetWithPaddingInside ( double  x,
double  y,
double  z = 0,
double  t = 0 
) const
inlinevirtual

Evaluate generic image without handling boundary conditions

If the location is partially inside the foreground region of the image, only the foreground values are interpolated. Otherwise, the _DefaultValue is returned.

This version is faster than GetWithPaddingOutside, but is only defined inside the domain for which all image values required for interpolation are defined and thus require no extrapolation of the finite image.

Implements mirtk::GenericInterpolateImageFunction< TImage >.

Reimplemented in mirtk::GenericLinearInterpolateImageFunction2D< TImage >, mirtk::GenericLinearInterpolateImageFunction3D< TImage >, mirtk::GenericLinearInterpolateImageFunction4D< TImage >, mirtk::GenericLinearInterpolateImageFunction2D< BaseImage >, mirtk::GenericLinearInterpolateImageFunction3D< BaseImage >, mirtk::GenericLinearInterpolateImageFunction4D< CPImage >, and mirtk::GenericLinearInterpolateImageFunction4D< BaseImage >.

Definition at line 785 of file LinearInterpolateImageFunction.hxx.

§ GetWithPaddingOutside()

template<class TImage >
GenericLinearInterpolateImageFunction< TImage >::VoxelType mirtk::GenericLinearInterpolateImageFunction< TImage >::GetWithPaddingOutside ( double  x,
double  y,
double  z = 0,
double  t = 0 
) const
inlinevirtual

§ Initialize()

template<class TImage >
void mirtk::GenericLinearInterpolateImageFunction< TImage >::Initialize ( bool  coeff = false)
virtual

Initialize interpolation function.

Initialize base class

Reimplemented from mirtk::GenericInterpolateImageFunction< TImage >.

Definition at line 53 of file LinearInterpolateImageFunction.hxx.

§ Jacobian()

template<class TImage >
template<class TOtherImage >
void mirtk::GenericLinearInterpolateImageFunction< TImage >::Jacobian ( Matrix jac,
const TOtherImage *  input,
double  x,
double  y,
double  z = 0.,
double  t = NaN 
) const

Get 1st order derivatives of given image at arbitrary location (in pixels)

If the location is inside the finite domain of the image, an actual image instance can be passed as first argument directly such as an instance of GenericImage. Otherwise, an image function which extends the finite image domain to an infinite lattice is needed, i.e., an instance of a subclass of ExtrapolateImageFunction.

Definition at line 1513 of file LinearInterpolateImageFunction.hxx.

§ Jacobian2D() [1/2]

template<class TImage >
void mirtk::GenericLinearInterpolateImageFunction< TImage >::Jacobian2D ( Matrix jac,
double  x,
double  y,
double  z = 0.,
double  t = NaN 
) const

Get 1st order derivatives of given 3D image at arbitrary location (in pixels)

This function is used when no extrapolator was set.

When the image has scalar data type and stores vector components in the fourth dimension, the derivatives of all components are evaluated when the t coordinate is set to NaN. Otherwise, only the derivatives of the specified t component are evaluated.

Definition at line 850 of file LinearInterpolateImageFunction.hxx.

§ Jacobian2D() [2/2]

template<class TImage >
template<class TOtherImage >
void mirtk::GenericLinearInterpolateImageFunction< TImage >::Jacobian2D ( Matrix jac,
const TOtherImage *  input,
double  x,
double  y,
double  z = 0.,
double  t = NaN 
) const

Get 1st order derivatives of given 3D image at arbitrary location (in pixels)

If the location is inside the finite domain of the image, an actual image instance can be passed as first argument directly such as an instance of GenericImage. Otherwise, an image function which extends the finite image domain to an infinite lattice is needed, i.e., an instance of a subclass of ExtrapolateImageFunction.

When the image has scalar data type and stores vector components in the fourth dimension, the derivatives of all components are evaluated when the t coordinate is set to NaN. Otherwise, only the derivatives of the specified t component are evaluated.

Definition at line 1325 of file LinearInterpolateImageFunction.hxx.

§ Jacobian3D() [1/2]

template<class TImage >
void mirtk::GenericLinearInterpolateImageFunction< TImage >::Jacobian3D ( Matrix jac,
double  x,
double  y,
double  z = 0.,
double  t = NaN 
) const

Get 1st order derivatives of given 3D image at arbitrary location (in pixels)

This function is used when no extrapolator was set.

When the image has scalar data type and stores vector components in the fourth dimension, the derivatives of all components are evaluated when the t coordinate is set to NaN. Otherwise, only the derivatives of the specified t component are evaluated.

Definition at line 923 of file LinearInterpolateImageFunction.hxx.

§ Jacobian3D() [2/2]

template<class TImage >
template<class TOtherImage >
void mirtk::GenericLinearInterpolateImageFunction< TImage >::Jacobian3D ( Matrix jac,
const TOtherImage *  input,
double  x,
double  y,
double  z = 0.,
double  t = NaN 
) const

Get 1st order derivatives of given 3D image at arbitrary location (in pixels)

If the location is inside the finite domain of the image, an actual image instance can be passed as first argument directly such as an instance of GenericImage. Otherwise, an image function which extends the finite image domain to an infinite lattice is needed, i.e., an instance of a subclass of ExtrapolateImageFunction.

When the image has scalar data type and stores vector components in the fourth dimension, the derivatives of all components are evaluated when the t coordinate is set to NaN. Otherwise, only the derivatives of the specified t component are evaluated.

Definition at line 1392 of file LinearInterpolateImageFunction.hxx.

§ Jacobian4D() [1/2]

template<class TImage >
void mirtk::GenericLinearInterpolateImageFunction< TImage >::Jacobian4D ( Matrix jac,
double  x,
double  y,
double  z = 0.,
double  t = NaN 
) const

Get 1st order derivatives of given 4D image at arbitrary location (in pixels)

This function is used when no extrapolator was set.

Definition at line 1007 of file LinearInterpolateImageFunction.hxx.

§ Jacobian4D() [2/2]

template<class TImage >
template<class TOtherImage >
void mirtk::GenericLinearInterpolateImageFunction< TImage >::Jacobian4D ( Matrix jac,
const TOtherImage *  input,
double  x,
double  y,
double  z = 0.,
double  t = NaN 
) const

Get 1st order derivatives of given 4D image at arbitrary location (in pixels)

If the location is inside the finite domain of the image, an actual image instance can be passed as first argument directly such as an instance of GenericImage. Otherwise, an image function which extends the finite image domain to an infinite lattice is needed, i.e., an instance of a subclass of ExtrapolateImageFunction.

Definition at line 1466 of file LinearInterpolateImageFunction.hxx.

§ JacobianWithPadding2D()

template<class TImage >
void mirtk::GenericLinearInterpolateImageFunction< TImage >::JacobianWithPadding2D ( Matrix jac,
double  x,
double  y,
double  z = 0.,
double  t = NaN 
) const

Get 1st order derivatives of given 3D image at arbitrary location (in pixels)

Set derivatives to zero outside the image foreground.

When the image has scalar data type and stores vector components in the fourth dimension, the derivatives of all components are evaluated when the t coordinate is set to NaN. Otherwise, only the derivatives of the specified t component are evaluated.

Definition at line 1079 of file LinearInterpolateImageFunction.hxx.

§ JacobianWithPadding3D()

template<class TImage >
void mirtk::GenericLinearInterpolateImageFunction< TImage >::JacobianWithPadding3D ( Matrix jac,
double  x,
double  y,
double  z = 0.,
double  t = NaN 
) const

Get 1st order derivatives of given 3D image at arbitrary location (in pixels)

Set derivatives to zero outside the image foreground.

When the image has scalar data type and stores vector components in the fourth dimension, the derivatives of all components are evaluated when the t coordinate is set to NaN. Otherwise, only the derivatives of the specified t component are evaluated.

Definition at line 1159 of file LinearInterpolateImageFunction.hxx.

§ JacobianWithPadding4D()

template<class TImage >
void mirtk::GenericLinearInterpolateImageFunction< TImage >::JacobianWithPadding4D ( Matrix jac,
double  x,
double  y,
double  z = 0.,
double  t = NaN 
) const

Get 1st order derivatives of given 4D image at arbitrary location (in pixels)

Set derivatives to zero outside the image foreground.

Definition at line 1250 of file LinearInterpolateImageFunction.hxx.


The documentation for this class was generated from the following files: