VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkImageBSplineInterpolator Class Reference

perform b-spline interpolation on images More...

#include <vtkImageBSplineInterpolator.h>

Inheritance diagram for vtkImageBSplineInterpolator:
[legend]
Collaboration diagram for vtkImageBSplineInterpolator:
[legend]

Public Types

typedef vtkAbstractImageInterpolator Superclass
 
- Public Types inherited from vtkAbstractImageInterpolator
typedef vtkObject Superclass
 
- Public Types inherited from vtkObject
typedef vtkObjectBase Superclass
 

Public Member Functions

virtual int IsA (const char *type)
 
vtkImageBSplineInterpolatorNewInstance () const
 
virtual void PrintSelf (ostream &os, vtkIndent indent)
 
virtual void ComputeSupportSize (const double matrix[16], int support[3])
 
virtual bool IsSeparable ()
 
virtual void FreePrecomputedWeights (vtkInterpolationWeights *&weights)
 
void SetSplineDegree (int degree)
 
int GetSplineDegree ()
 
int GetSplineDegreeMinValue ()
 
int GetSplineDegreeMaxValue ()
 
virtual void PrecomputeWeightsForExtent (const double matrix[16], const int extent[6], int newExtent[6], vtkInterpolationWeights *&weights)
 
virtual void PrecomputeWeightsForExtent (const float matrix[16], const int extent[6], int newExtent[6], vtkInterpolationWeights *&weights)
 
- Public Member Functions inherited from vtkAbstractImageInterpolator
vtkAbstractImageInterpolatorNewInstance () const
 
virtual void Initialize (vtkDataObject *data)
 
virtual void ReleaseData ()
 
void DeepCopy (vtkAbstractImageInterpolator *obj)
 
void Update ()
 
double Interpolate (double x, double y, double z, int component)
 
bool Interpolate (const double point[3], double *value)
 
int ComputeNumberOfComponents (int inputComponents)
 
int GetNumberOfComponents ()
 
void SetOutValue (double outValue)
 
double GetOutValue ()
 
void SetTolerance (double tol)
 
double GetTolerance ()
 
void SetComponentOffset (int offset)
 
int GetComponentOffset ()
 
void SetComponentCount (int count)
 
int GetComponentCount ()
 
void InterpolateIJK (const double point[3], double *value)
 
void InterpolateIJK (const float point[3], float *value)
 
bool CheckBoundsIJK (const double x[3])
 
bool CheckBoundsIJK (const float x[3])
 
void SetBorderMode (int mode)
 
void SetBorderModeToClamp ()
 
void SetBorderModeToRepeat ()
 
void SetBorderModeToMirror ()
 
int GetBorderMode ()
 
const char * GetBorderModeAsString ()
 
void InterpolateRow (vtkInterpolationWeights *&weights, int xIdx, int yIdx, int zIdx, double *value, int n)
 
void InterpolateRow (vtkInterpolationWeights *&weights, int xIdx, int yIdx, int zIdx, float *value, int n)
 
virtual doubleGetSpacing ()
 
virtual void GetSpacing (double &, double &, double &)
 
virtual void GetSpacing (double[3])
 
virtual doubleGetOrigin ()
 
virtual void GetOrigin (double &, double &, double &)
 
virtual void GetOrigin (double[3])
 
virtual intGetExtent ()
 
virtual void GetExtent (int &, int &, int &, int &, int &, int &)
 
virtual void GetExtent (int[6])
 
virtual intGetWholeExtent ()
 
virtual void GetWholeExtent (int &, int &, int &, int &, int &, int &)
 
virtual void GetWholeExtent (int[6])
 
- Public Member Functions inherited from vtkObject
vtkObjectNewInstance () const
 
virtual void DebugOn ()
 
virtual void DebugOff ()
 
bool GetDebug ()
 
void SetDebug (bool debugFlag)
 
virtual void Modified ()
 
virtual unsigned long GetMTime ()
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 
vtkCommandGetCommand (unsigned long tag)
 
void RemoveObserver (vtkCommand *)
 
void RemoveObservers (unsigned long event, vtkCommand *)
 
void RemoveObservers (const char *event, vtkCommand *)
 
int HasObserver (unsigned long event, vtkCommand *)
 
int HasObserver (const char *event, vtkCommand *)
 
void RemoveObserver (unsigned long tag)
 
void RemoveObservers (unsigned long event)
 
void RemoveObservers (const char *event)
 
void RemoveAllObservers ()
 
int HasObserver (unsigned long event)
 
int HasObserver (const char *event)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
int InvokeEvent (unsigned long event, void *callData)
 
int InvokeEvent (const char *event, void *callData)
 
int InvokeEvent (unsigned long event)
 
int InvokeEvent (const char *event)
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 
virtual void Delete ()
 
virtual void FastDelete ()
 
void Print (ostream &os)
 
virtual void Register (vtkObjectBase *o)
 
virtual void UnRegister (vtkObjectBase *o)
 
void SetReferenceCount (int)
 
void PrintRevisions (ostream &)
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
int GetReferenceCount ()
 

Static Public Member Functions

static vtkImageBSplineInterpolatorNew ()
 
static int IsTypeOf (const char *type)
 
static vtkImageBSplineInterpolatorSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkAbstractImageInterpolator
static int IsTypeOf (const char *type)
 
static vtkAbstractImageInterpolatorSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkObject
static int IsTypeOf (const char *type)
 
static vtkObjectSafeDownCast (vtkObjectBase *o)
 
static vtkObjectNew ()
 
static void BreakOnError ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
- Static Public Member Functions inherited from vtkObjectBase
static int IsTypeOf (const char *name)
 
static vtkObjectBaseNew ()
 

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkImageBSplineInterpolator ()
 
 ~vtkImageBSplineInterpolator ()
 
virtual void InternalUpdate ()
 
virtual void InternalDeepCopy (vtkAbstractImageInterpolator *obj)
 
virtual void BuildKernelLookupTable ()
 
virtual void FreeKernelLookupTable ()
 
virtual void GetInterpolationFunc (void(**doublefunc)(vtkInterpolationInfo *, const double[3], double *))
 
virtual void GetInterpolationFunc (void(**floatfunc)(vtkInterpolationInfo *, const float[3], float *))
 
virtual void GetRowInterpolationFunc (void(**doublefunc)(vtkInterpolationWeights *, int, int, int, double *, int))
 
virtual void GetRowInterpolationFunc (void(**floatfunc)(vtkInterpolationWeights *, int, int, int, float *, int))
 
- Protected Member Functions inherited from vtkAbstractImageInterpolator
 vtkAbstractImageInterpolator ()
 
 ~vtkAbstractImageInterpolator ()
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
virtual ~vtkObject ()
 
virtual void RegisterInternal (vtkObjectBase *, int check)
 
virtual void UnRegisterInternal (vtkObjectBase *, int check)
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void InternalReleaseFocus ()
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void CollectRevisions (ostream &)
 
virtual void ReportReferences (vtkGarbageCollector *)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Protected Attributes

int SplineDegree
 
floatKernelLookupTable
 
- Protected Attributes inherited from vtkAbstractImageInterpolator
vtkDataArrayScalars
 
double StructuredBoundsDouble [6]
 
float StructuredBoundsFloat [6]
 
int WholeExtent [6]
 
int Extent [6]
 
double Spacing [3]
 
double Origin [3]
 
double OutValue
 
double Tolerance
 
int BorderMode
 
int ComponentOffset
 
int ComponentCount
 
vtkInterpolationInfoInterpolationInfo
 
void(* InterpolationFuncDouble )(vtkInterpolationInfo *info, const double point[3], double *outPtr)
 
void(* InterpolationFuncFloat )(vtkInterpolationInfo *info, const float point[3], float *outPtr)
 
void(* RowInterpolationFuncDouble )(vtkInterpolationWeights *weights, int idX, int idY, int idZ, double *outPtr, int n)
 
void(* RowInterpolationFuncFloat )(vtkInterpolationWeights *weights, int idX, int idY, int idZ, float *outPtr, int n)
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Detailed Description

perform b-spline interpolation on images

vtkImageBSplineInterpolator can be used to perform b-spline interpolation on images that have been filtered with vtkImageBSplineCoefficients. The b-spline interpolants provide the maximum possible degree of continuity for a given kernel size, but require that the image data be pre-filtered to generate b-spline coefficients before the interpolation is performed. Interpolating data that has not been pre-filtered will give incorrect results.

See also
vtkImageReslice vtkImageBSplineCoefficients vtkBSplineTransform
Thanks:
This class was written by David Gobbi at the Seaman Family MR Research Centre, Foothills Medical Centre, Calgary, Alberta. DG Gobbi and YP Starreveld, "Uniform B-Splines for the VTK Imaging Pipeline," VTK Journal, 2011, http://hdl.handle.net/10380/3252
Tests:
vtkImageBSplineInterpolator (Tests)

Definition at line 50 of file vtkImageBSplineInterpolator.h.

Member Typedef Documentation

Definition at line 55 of file vtkImageBSplineInterpolator.h.

Constructor & Destructor Documentation

vtkImageBSplineInterpolator::vtkImageBSplineInterpolator ( )
protected
vtkImageBSplineInterpolator::~vtkImageBSplineInterpolator ( )
protected

Member Function Documentation

static vtkImageBSplineInterpolator* vtkImageBSplineInterpolator::New ( )
static
static int vtkImageBSplineInterpolator::IsTypeOf ( const char *  type)
static
virtual int vtkImageBSplineInterpolator::IsA ( const char *  name)
virtual

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkAbstractImageInterpolator.

static vtkImageBSplineInterpolator* vtkImageBSplineInterpolator::SafeDownCast ( vtkObjectBase o)
static
virtual vtkObjectBase* vtkImageBSplineInterpolator::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkAbstractImageInterpolator.

vtkImageBSplineInterpolator* vtkImageBSplineInterpolator::NewInstance ( ) const
virtual void vtkImageBSplineInterpolator::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
virtual

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkAbstractImageInterpolator.

void vtkImageBSplineInterpolator::SetSplineDegree ( int  degree)

Set the degree of the spline polynomial. The default value is 3, and the maximum is 9. The data must be pre-filtered for the same degree of polynomial with vtkImageBSplineCoefficients.

int vtkImageBSplineInterpolator::GetSplineDegree ( )
inline

Set the degree of the spline polynomial. The default value is 3, and the maximum is 9. The data must be pre-filtered for the same degree of polynomial with vtkImageBSplineCoefficients.

Definition at line 63 of file vtkImageBSplineInterpolator.h.

int vtkImageBSplineInterpolator::GetSplineDegreeMinValue ( )
inline

Set the degree of the spline polynomial. The default value is 3, and the maximum is 9. The data must be pre-filtered for the same degree of polynomial with vtkImageBSplineCoefficients.

Definition at line 64 of file vtkImageBSplineInterpolator.h.

int vtkImageBSplineInterpolator::GetSplineDegreeMaxValue ( )
inline

Set the degree of the spline polynomial. The default value is 3, and the maximum is 9. The data must be pre-filtered for the same degree of polynomial with vtkImageBSplineCoefficients.

Definition at line 65 of file vtkImageBSplineInterpolator.h.

virtual void vtkImageBSplineInterpolator::ComputeSupportSize ( const double  matrix[16],
int  support[3] 
)
virtual

Get the support size for use in computing update extents. If the data will be sampled on a regular grid, then pass a matrix describing the structured coordinate transformation between the output and the input. Otherwise, pass NULL as the matrix to retrieve the full kernel size.

Implements vtkAbstractImageInterpolator.

virtual bool vtkImageBSplineInterpolator::IsSeparable ( )
virtual

Returns true if the interpolator supports weight precomputation. This will always return true for this interpolator.

Implements vtkAbstractImageInterpolator.

virtual void vtkImageBSplineInterpolator::PrecomputeWeightsForExtent ( const double  matrix[16],
const int  extent[6],
int  newExtent[6],
vtkInterpolationWeights *&  weights 
)
virtual

If the data is going to be sampled on a regular grid, then the interpolation weights can be precomputed. A matrix must be supplied that provides a transformation between the provided extent and the structured coordinates of the input. This matrix must perform only permutations, scales, and translation, i.e. each of the three columns must have only one non-zero value. A new extent is provided for out-of-bounds checks. THIS METHOD IS THREAD SAFE.

Reimplemented from vtkAbstractImageInterpolator.

virtual void vtkImageBSplineInterpolator::PrecomputeWeightsForExtent ( const float  matrix[16],
const int  extent[6],
int  newExtent[6],
vtkInterpolationWeights *&  weights 
)
virtual

If the data is going to be sampled on a regular grid, then the interpolation weights can be precomputed. A matrix must be supplied that provides a transformation between the provided extent and the structured coordinates of the input. This matrix must perform only permutations, scales, and translation, i.e. each of the three columns must have only one non-zero value. A new extent is provided for out-of-bounds checks. THIS METHOD IS THREAD SAFE.

Reimplemented from vtkAbstractImageInterpolator.

virtual void vtkImageBSplineInterpolator::FreePrecomputedWeights ( vtkInterpolationWeights *&  weights)
virtual

Free the precomputed weights. THIS METHOD IS THREAD SAFE.

Reimplemented from vtkAbstractImageInterpolator.

virtual void vtkImageBSplineInterpolator::InternalUpdate ( )
protectedvirtual

Update the interpolator.

Implements vtkAbstractImageInterpolator.

virtual void vtkImageBSplineInterpolator::InternalDeepCopy ( vtkAbstractImageInterpolator obj)
protectedvirtual

Copy the interpolator.

Implements vtkAbstractImageInterpolator.

virtual void vtkImageBSplineInterpolator::GetInterpolationFunc ( void(**)(vtkInterpolationInfo *, const double[3], double *)  doublefunc)
protectedvirtual

Get the interpolation functions.

Reimplemented from vtkAbstractImageInterpolator.

virtual void vtkImageBSplineInterpolator::GetInterpolationFunc ( void(**)(vtkInterpolationInfo *, const float[3], float *)  floatfunc)
protectedvirtual

Get the interpolation functions.

Reimplemented from vtkAbstractImageInterpolator.

virtual void vtkImageBSplineInterpolator::GetRowInterpolationFunc ( void(**)(vtkInterpolationWeights *, int, int, int, double *, int doublefunc)
protectedvirtual

Get the row interpolation functions.

Reimplemented from vtkAbstractImageInterpolator.

virtual void vtkImageBSplineInterpolator::GetRowInterpolationFunc ( void(**)(vtkInterpolationWeights *, int, int, int, float *, int floatfunc)
protectedvirtual

Get the row interpolation functions.

Reimplemented from vtkAbstractImageInterpolator.

virtual void vtkImageBSplineInterpolator::BuildKernelLookupTable ( )
protectedvirtual

Build the lookup tables used for the interpolation.

virtual void vtkImageBSplineInterpolator::FreeKernelLookupTable ( )
protectedvirtual

Free the kernel lookup tables.

Member Data Documentation

int vtkImageBSplineInterpolator::SplineDegree
protected

Definition at line 134 of file vtkImageBSplineInterpolator.h.

float* vtkImageBSplineInterpolator::KernelLookupTable
protected

Definition at line 135 of file vtkImageBSplineInterpolator.h.


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