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

#include <ImageGradientFunction.h>

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

Public Member Functions

virtual void Extrapolator (ExtrapolateImageFunction *, bool=false)
 Set extrapolate image function for evaluation outside of image domain.
 
ExtrapolatorTypeExtrapolator ()
 
const ExtrapolatorTypeExtrapolator () const
 
virtual void Initialize (bool coeff=false)
 
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.
 
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.
 
virtual void BoundingInterval (double, int &, int &) const =0
 
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.
 
ExtrapolateImageFunctionExtrapolator ()
 
const ExtrapolateImageFunctionExtrapolator () const
 
GradientType Get (double, double, double=0, double=0) const
 
virtual GradientType GetInside (double, double, double=0, double=0) const =0
 
virtual GradientType GetOutside (double, double, double=0, double=0) const =0
 Evaluate generic image gradient at an arbitrary location (in pixels)
 
double GetTOrigin () const
 Get temporal origin of input image.
 
GradientType GetWithPadding (double, double, double=0, double=0) const
 
virtual GradientType GetWithPaddingInside (double, double, double=0, double=0) const =0
 
virtual GradientType GetWithPaddingOutside (double, double, double=0, double=0) const =0
 
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 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 GenericImageGradientFunctionNew (enum InterpolationMode, const TImage *=NULL)
 Construct interpolator with default infinite extension of input image.
 
static GenericImageGradientFunctionNew (enum InterpolationMode, enum ExtrapolationMode, const TImage *=NULL)
 
- Static Public Member Functions inherited from mirtk::ImageGradientFunction
static ImageGradientFunctionNew (enum InterpolationMode, const BaseImage *=NULL)
 Construct image gradient function with default infinite extension of input image.
 
static ImageGradientFunctionNew (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.
 

Protected Member Functions

 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
 

Additional Inherited Members

- Public Types inherited from mirtk::ImageGradientFunction
typedef Vector3D< double > GradientType
 Type of interpolated gradient vectors.
 
- 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
 

Detailed Description

template<class TImage>
class mirtk::GenericImageGradientFunction< TImage >

Abstract base class of generic image gradient functions

This image function interface is templated over the input image type and thus can access the image data using non-virtual getters which return the image values with the appropriate voxel type. Therefore, it is more efficient and type safe to use this image function interface whenever the image type is known. Otherwise, use the abstract ImageGradientFunction interface instead.

See also
ImageGradientFunction

Definition at line 391 of file ImageGradientFunction.h.

Member Function Documentation

§ Extrapolator() [1/2]

template<class TImage >
GenericImageGradientFunction< TImage >::ExtrapolatorType * mirtk::GenericImageGradientFunction< TImage >::Extrapolator ( )
inline

Get extrapolate image function for evaluation outside of image domain or NULL if extrapolation mode is Extrapolation_None

Definition at line 816 of file ImageGradientFunction.h.

§ Extrapolator() [2/2]

template<class TImage >
const GenericImageGradientFunction< TImage >::ExtrapolatorType * mirtk::GenericImageGradientFunction< TImage >::Extrapolator ( ) const
inline

Get extrapolate image function for evaluation outside of image domain or NULL if extrapolation mode is Extrapolation_None

Definition at line 824 of file ImageGradientFunction.h.

§ Initialize()

template<class TImage >
void mirtk::GenericImageGradientFunction< TImage >::Initialize ( bool  coeff = false)
inlinevirtual

Initialize image function

Parameters
[in]coeffWhether input image contains interpolation coefficients already. Otherwise, the interpolate image function will compute these coefficients from the input intensities.

Reimplemented from mirtk::ImageGradientFunction.

Reimplemented in mirtk::GenericFastLinearImageGradientFunction< TImage >, mirtk::GenericFastLinearImageGradientFunction< ImageType >, mirtk::GenericFastLinearImageGradientFunction< BaseImage >, mirtk::GenericLinearImageGradientFunction< TImage >, and mirtk::GenericLinearImageGradientFunction< BaseImage >.

Definition at line 85 of file ImageGradientFunction.hxx.

§ New()

template<class TImage>
GenericImageGradientFunction< TImage > * mirtk::GenericImageGradientFunction< TImage >::New ( enum InterpolationMode  imode,
enum ExtrapolationMode  emode,
const TImage *  image = NULL 
)
static

Construct interpolator with specified infinite extension of input image

The caller is required to set the input, initialize, and destroy the interpolator only, the extrapolator is initialized and destroyed by the interpolator unless the extrapolator has been replaced using the setter.

Definition at line 227 of file ImageGradientFunction.hxx.


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