Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
mirtk::ShapeBasedInterpolateImageFunction Class Reference

#include <ShapeBasedInterpolateImageFunction.h>

Inheritance diagram for mirtk::ShapeBasedInterpolateImageFunction:
Inheritance graph
Collaboration diagram for mirtk::ShapeBasedInterpolateImageFunction:
Collaboration graph

Public Member Functions

virtual void BoundingInterval (double, int &, int &) const
 
virtual double EvaluateInside (double, double, double, double=0) const
 
virtual void EvaluateInside (Vector &, double, double, double, double=0) const
 
virtual double EvaluateInsideLinear (double, double, double, double=0) const
 
virtual double EvaluateLinear (double, double, double, double=0) const
 Evaluate the filter at arbitrary image location (in pixels)
 
virtual double EvaluateOutside (double, double, double, double=0) const
 Evaluate scalar image at an arbitrary location (in pixels)
 
virtual void EvaluateOutside (Vector &, double, double, double, double=0) const
 
virtual double EvaluateOutsideLinear (double, double, double, double=0) const
 Evaluate the filter at a boundary image location (in pixels)
 
virtual double EvaluateWithPaddingInside (double, double, double, double=0) const
 
virtual void EvaluateWithPaddingInside (Vector &, double, double, double, double=0) const
 
virtual double EvaluateWithPaddingOutside (double, double, double, double=0) const
 
virtual void EvaluateWithPaddingOutside (Vector &, double, double, double, double=0) const
 
virtual void Initialize (bool=false)
 Initialize.
 
 ShapeBasedInterpolateImageFunction ()
 Constructor.
 
virtual ~ShapeBasedInterpolateImageFunction ()
 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.
 
virtual void EvaluateInside (double *, double, double, double=0, int=1) const
 
void EvaluateJacobian (Matrix &, double, double, double=0, double=NaN) const
 
virtual void EvaluateJacobianInside (Matrix &, double, double, double=0, double=NaN) const
 
virtual void EvaluateJacobianOutside (Matrix &, double, double, double=0, double=NaN) const
 
void EvaluateJacobianWithPadding (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
 
virtual void EvaluateOutside (double *, double, double, double=0, int=1) const
 Evaluate multi-channel image at an arbitrary location (in pixels)
 
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
 
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.
 
virtual void Extrapolator (ExtrapolateImageFunction *, bool=false)
 Set extrapolate image function for evaluation outside of image domain.
 
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
 
virtual ExtrapolateImageFunctionNew (enum ExtrapolationMode, const BaseImage *=NULL)
 Construct extrapolator which is compatible with this interpolator.
 
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.
 

Protected Member Functions

void Refine ()
 Initialize second step, fix the union property.
 
- 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
 

Protected Attributes

RealImage _dmap
 Distance map for input image.
 
LinearInterpolateImageFunction _linear_interpolator
 Image function for linear interpolation of resampled input.
 
NearestNeighborInterpolateImageFunction _nn_interpolator
 Image function for nearest neighbor interpolation of resampled input.
 
RealImage _rcdmap
 Isotropic resampled cache image for refine procedure.
 
RealImage _rdmap
 Isotropic resampled distance map for input image with linear interpolation.
 
RealImage _rinput
 Isotropic resampled Input image after shape based interpolation.
 
RealImage _tinput
 Threshold map for input image.
 
- Protected Attributes inherited from mirtk::InterpolateImageFunction
ExtrapolateImageFunction_InfiniteInput
 
bool _InfiniteInputOwner
 Whether infinite discrete image was instantiated by this image function.
 
double _x1
 

Additional Inherited Members

- 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.
 
- Static Protected Member Functions inherited from mirtk::Object
template<typename... Args>
static void ThrowStatic (ErrorType err, const char *cls, const char *func, Args... args)
 

Detailed Description

Shape based interpolation of 3D scalar images

This class defines and implements a shape based interpolation of images.

Definition at line 39 of file ShapeBasedInterpolateImageFunction.h.

Member Function Documentation

§ BoundingInterval()

void mirtk::ShapeBasedInterpolateImageFunction::BoundingInterval ( double  x,
int &  i,
int &  I 
) const
inlinevirtual

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 192 of file ShapeBasedInterpolateImageFunction.h.

§ EvaluateInside() [1/2]

virtual double mirtk::ShapeBasedInterpolateImageFunction::EvaluateInside ( double  ,
double  ,
double  ,
double  = 0 
) const
virtual

Evaluate scalar 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::InterpolateImageFunction.

§ EvaluateInside() [2/2]

void mirtk::ShapeBasedInterpolateImageFunction::EvaluateInside ( Vector v,
double  x,
double  y,
double  z,
double  t = 0 
) const
inlinevirtual

Evaluate vector 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.

Attention
This interpolator is implemented only for scalar images!

Implements mirtk::InterpolateImageFunction.

Definition at line 203 of file ShapeBasedInterpolateImageFunction.h.

§ EvaluateInsideLinear()

virtual double mirtk::ShapeBasedInterpolateImageFunction::EvaluateInsideLinear ( double  ,
double  ,
double  ,
double  = 0 
) const
virtual

Evaluate the filter at an arbitrary image location (in pixels) without handling boundary conditions. This version is faster than the method above, but is only defined inside the image domain.

§ EvaluateOutside()

void mirtk::ShapeBasedInterpolateImageFunction::EvaluateOutside ( Vector v,
double  x,
double  y,
double  z,
double  t = 0 
) const
inlinevirtual

Evaluate vector image at an arbitrary location (in pixels)

Attention
This interpolator is implemented only for scalar images!

Implements mirtk::InterpolateImageFunction.

Definition at line 210 of file ShapeBasedInterpolateImageFunction.h.

§ EvaluateWithPaddingInside() [1/2]

virtual double mirtk::ShapeBasedInterpolateImageFunction::EvaluateWithPaddingInside ( double  ,
double  ,
double  ,
double  = 0 
) const
virtual

Evaluate scalar image 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.

This version is faster than EvaluateWithPaddingOutside, 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::InterpolateImageFunction.

§ EvaluateWithPaddingInside() [2/2]

void mirtk::ShapeBasedInterpolateImageFunction::EvaluateWithPaddingInside ( Vector v,
double  x,
double  y,
double  z,
double  t = 0 
) const
inlinevirtual

Evaluate vector image 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, a vector set to the _DefaultValue is returned.

This version is faster than EvaluateWithPaddingOutside, 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.

Attention
This interpolator is implemented only for scalar images!

Implements mirtk::InterpolateImageFunction.

Definition at line 217 of file ShapeBasedInterpolateImageFunction.h.

§ EvaluateWithPaddingOutside() [1/2]

virtual double mirtk::ShapeBasedInterpolateImageFunction::EvaluateWithPaddingOutside ( double  ,
double  ,
double  ,
double  = 0 
) const
virtual

Evaluate scalar image 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::InterpolateImageFunction.

§ EvaluateWithPaddingOutside() [2/2]

void mirtk::ShapeBasedInterpolateImageFunction::EvaluateWithPaddingOutside ( Vector v,
double  x,
double  y,
double  z,
double  t = 0 
) const
inlinevirtual

Evaluate vector image 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, a vector set to the _DefaultValue is returned.

Attention
This interpolator is implemented only for scalar images!

Implements mirtk::InterpolateImageFunction.

Definition at line 224 of file ShapeBasedInterpolateImageFunction.h.


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