#include <FastLinearImageGradientFunction.h>
Public Member Functions | |
virtual void | BoundingInterval (double, int &, int &) const |
GenericFastLinearImageGradientFunction () | |
Default constructor. | |
virtual GradientType | Get (double, double, double=0, double=0) const |
template<class TOtherImage > | |
GradientType | Get (const TOtherImage *, double, double, double=0, double=0) const |
GradientType | Get2D (double, double, double=0, double=0) const |
template<class TOtherImage > | |
GradientType | Get2D (const TOtherImage *, double, double, double=0, double=0) const |
GradientType | Get3D (double, double, double=0, double=0) const |
template<class TOtherImage > | |
GradientType | Get3D (const TOtherImage *, double, double, double=0, double=0) const |
GradientType | Get4D (double, double, double=0, double=0) const |
template<class TOtherImage > | |
GradientType | Get4D (const TOtherImage *, double, double, double=0, double=0) const |
virtual GradientType | GetInside (double, double, double=0, double=0) const |
virtual GradientType | GetOutside (double, double, double=0, double=0) const |
Evaluate generic image at an arbitrary location (in pixels) | |
virtual GradientType | GetWithPadding (double, double, double=0, double=0) const |
template<class TOtherImage > | |
GradientType | GetWithPadding (const TOtherImage *, double, double, double=0, double=0) const |
GradientType | GetWithPadding2D (double, double, double=0, double=0) const |
template<class TOtherImage > | |
GradientType | GetWithPadding2D (const TOtherImage *, double, double, double=0, double=0) const |
GradientType | GetWithPadding3D (double, double, double=0, double=0) const |
template<class TOtherImage > | |
GradientType | GetWithPadding3D (const TOtherImage *, double, double, double=0, double=0) const |
GradientType | GetWithPadding4D (double, double, double=0, double=0) const |
template<class TOtherImage > | |
GradientType | GetWithPadding4D (const TOtherImage *, double, double, double=0, double=0) const |
virtual GradientType | GetWithPaddingInside (double, double, double=0, double=0) const |
virtual GradientType | GetWithPaddingOutside (double, double, double=0, double=0) const |
virtual void | Initialize (bool=false) |
Initialize interpolation function. | |
virtual | ~GenericFastLinearImageGradientFunction () |
Destructor. | |
Public Member Functions inherited from mirtk::GenericImageGradientFunction< TImage > | |
virtual void | Extrapolator (ExtrapolateImageFunction *, bool=false) |
Set extrapolate image function for evaluation outside of image domain. | |
ExtrapolatorType * | Extrapolator () |
const ExtrapolatorType * | Extrapolator () const |
virtual void | Input (const BaseImage *) |
Set input image. | |
const ImageType * | Input () const |
Get input image. | |
virtual ExtrapolateImageFunction * | New (enum ExtrapolationMode, const BaseImage *=NULL) |
Construct extrapolator which is compatible with this interpolator. | |
virtual | ~GenericImageGradientFunction () |
Destructor. | |
Public Member Functions inherited from mirtk::ImageGradientFunction | |
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. | |
void | Evaluate (double *, double, double, double=0, int=1) const |
virtual void | EvaluateInside (double *, double, double, double=0, int=1) const |
virtual void | EvaluateOutside (double *, double, double, double=0, int=1) const |
void | EvaluateWithPadding (double *, double, double, double=0, int=1) const |
virtual void | EvaluateWithPaddingInside (double *, double, double, double=0, int=1) const |
virtual void | EvaluateWithPaddingOutside (double *, double, double, double=0, int=1) const |
enum ExtrapolationMode | ExtrapolationMode () const |
Get extrapolation mode used by this interpolator. | |
ExtrapolateImageFunction * | Extrapolator () |
const ExtrapolateImageFunction * | Extrapolator () const |
GradientType | Get (double, double, double=0, double=0) const |
double | GetTOrigin () const |
Get temporal origin of input image. | |
GradientType | GetWithPadding (double, double, double=0, double=0) const |
const BaseImage * | Input () 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 image gradient function. | |
bool | IsForeground (double, double) const |
bool | IsForeground (double, double, double) const |
bool | IsForeground (double, double, double, double) const |
bool | IsInside (double, double) const |
bool | IsInside (double, double, double) const |
bool | IsInside (double, double, double, double) const |
bool | IsOutside (double, double) const |
bool | IsOutside (double, double, double) const |
bool | IsOutside (double, double, double, double) const |
GradientType | operator() (double, double, double=0, double=0) const |
Evaluate image gradient at an arbitrary location (in pixels) | |
void | WorldToImage (double &, double &) const |
Convert world coordinates to image location (in pixels) | |
void | WorldToImage (double &, double &, double &) const |
Convert world coordinates to image location (in pixels) | |
void | WorldToImage (Point &) const |
Convert world coordinates to image location (in pixels) | |
virtual | ~ImageGradientFunction () |
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::GenericImageGradientFunction< TImage > | |
static GenericImageGradientFunction * | New (enum InterpolationMode, const TImage *=NULL) |
Construct interpolator with default infinite extension of input image. | |
static GenericImageGradientFunction * | New (enum InterpolationMode, enum ExtrapolationMode, const TImage *=NULL) |
Static Public Member Functions inherited from mirtk::ImageGradientFunction | |
static ImageGradientFunction * | New (enum InterpolationMode, const BaseImage *=NULL) |
Construct image gradient function with default infinite extension of input image. | |
static ImageGradientFunction * | New (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 | |
Public Types inherited from mirtk::ImageGradientFunction | |
typedef Vector3D< double > | GradientType |
Type of interpolated gradient vectors. | |
Protected Member Functions inherited from mirtk::GenericImageGradientFunction< TImage > | |
GenericImageGradientFunction () | |
Default constructor. | |
Protected Member Functions inherited from mirtk::ImageGradientFunction | |
ImageGradientFunction () | |
Default constructor. | |
void | ImageGradientToWorld (GradientType &) const |
Orient and scale image gradient by world to image matrix. | |
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::ImageGradientFunction | |
ExtrapolateImageFunction * | _InfiniteInput |
bool | _InfiniteInputOwner |
Whether infinite discrete image was instantiated by this image function. | |
BaseImage * | _Input |
Input image for filter. | |
Matrix | _Orientation |
Image orientation matrix. | |
GradientType | _VoxelSize |
Image resolution. | |
double | _x1 |
Fast linear interpolation of generic image gradient
This image gradient evaluation function approximates the image gradient using the derivative of the linear interpolation kernel. The difference to the GenericLinearImageGradientFunction is that the resulting finite differences are not necessarily central. In the extreme case, where the gradient is evaluated at a voxel center, the gradient computation corresponds to a forward difference scheme. When the evaluation point is in between two voxel centers, however, the resulting gradient interpolation is a central difference. Side effects resulting from this are generally only noticeable at coarse image resolutions.
Definition at line 44 of file FastLinearImageGradientFunction.h.
|
virtual |
Returns interval of discrete image indices whose values are needed for interpolation of the image value at a given continuous coordinate
Implements mirtk::ImageGradientFunction.
Definition at line 78 of file FastLinearImageGradientFunction.hxx.
|
inlinestatic |
Returns truncated integral part of floating point
[in] | x | Floating point number. |
[out] | w | Linear interpolation weights for closest lattice nodes. |
Definition at line 90 of file FastLinearImageGradientFunction.hxx.
|
inlinevirtual |
Get gradient 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.
Reimplemented in mirtk::GenericFastLinearImageGradientFunction3D< TImage >, mirtk::GenericFastLinearImageGradientFunction3D< BaseImage >, mirtk::GenericFastLinearImageGradientFunction2D< TImage >, and mirtk::GenericFastLinearImageGradientFunction2D< BaseImage >.
Definition at line 579 of file FastLinearImageGradientFunction.hxx.
|
inline |
Get gradient 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 605 of file FastLinearImageGradientFunction.hxx.
|
inline |
Get gradient of given 2D image at arbitrary location (in pixels)
This function is used to interpolate the image gradient at arbitrary locations when no extrapolator was set.
Definition at line 106 of file FastLinearImageGradientFunction.hxx.
|
inline |
Get gradient 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 186 of file FastLinearImageGradientFunction.hxx.
|
inline |
Get gradient 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 253 of file FastLinearImageGradientFunction.hxx.
|
inline |
Get gradient 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 341 of file FastLinearImageGradientFunction.hxx.
|
inline |
Get gradient 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 415 of file FastLinearImageGradientFunction.hxx.
|
inline |
Get gradient 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 503 of file FastLinearImageGradientFunction.hxx.
|
inlinevirtual |
Evaluate generic image gradient 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::ImageGradientFunction.
Reimplemented in mirtk::GenericFastLinearImageGradientFunction3D< TImage >, mirtk::GenericFastLinearImageGradientFunction3D< BaseImage >, mirtk::GenericFastLinearImageGradientFunction2D< TImage >, and mirtk::GenericFastLinearImageGradientFunction2D< BaseImage >.
Definition at line 631 of file FastLinearImageGradientFunction.hxx.
|
inlinevirtual |
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.
Reimplemented in mirtk::GenericFastLinearImageGradientFunction3D< TImage >, mirtk::GenericFastLinearImageGradientFunction3D< BaseImage >, mirtk::GenericFastLinearImageGradientFunction2D< TImage >, and mirtk::GenericFastLinearImageGradientFunction2D< BaseImage >.
Definition at line 592 of file FastLinearImageGradientFunction.hxx.
|
inline |
Get gradient 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 618 of file FastLinearImageGradientFunction.hxx.
|
inline |
Get gradient 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 148 of file FastLinearImageGradientFunction.hxx.
|
inline |
Get gradient 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 215 of file FastLinearImageGradientFunction.hxx.
|
inline |
Get gradient 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 300 of file FastLinearImageGradientFunction.hxx.
|
inline |
Get gradient 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 374 of file FastLinearImageGradientFunction.hxx.
|
inline |
Get gradient 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 463 of file FastLinearImageGradientFunction.hxx.
|
inline |
Get gradient 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 539 of file FastLinearImageGradientFunction.hxx.
|
inlinevirtual |
Evaluate generic image gradient 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::ImageGradientFunction.
Reimplemented in mirtk::GenericFastLinearImageGradientFunction3D< TImage >, mirtk::GenericFastLinearImageGradientFunction3D< BaseImage >, mirtk::GenericFastLinearImageGradientFunction2D< TImage >, and mirtk::GenericFastLinearImageGradientFunction2D< BaseImage >.
Definition at line 653 of file FastLinearImageGradientFunction.hxx.
|
inlinevirtual |
Evaluate generic image gradient at an arbitrary location (in pixels)
If the location is partially inside the foreground region of the image, only the foreground values are interpolated. Otherwise, the _DefaultValue is returned.
Implements mirtk::ImageGradientFunction.
Reimplemented in mirtk::GenericFastLinearImageGradientFunction3D< TImage >, mirtk::GenericFastLinearImageGradientFunction3D< BaseImage >, mirtk::GenericFastLinearImageGradientFunction2D< TImage >, and mirtk::GenericFastLinearImageGradientFunction2D< BaseImage >.
Definition at line 662 of file FastLinearImageGradientFunction.hxx.