VTK  9.1.0
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
vtkGenericImageInterpolator Class Reference

interpolate data values from images using vtkGenericDataArray API More...

#include <vtkGenericImageInterpolator.h>

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

Public Types

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

Public Member Functions

virtual vtkTypeBool IsA (const char *type)
 Return 1 if this class is the same type of (or a subclass of) the named class. More...
 
vtkGenericImageInterpolatorNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent) override
 Methods invoked by print to print information about the object including superclasses. More...
 
void Update () override
 Update the interpolator. More...
 
- Public Member Functions inherited from vtkImageInterpolator
virtual vtkTypeBool IsA (const char *type)
 Return 1 if this class is the same type of (or a subclass of) the named class. More...
 
vtkImageInterpolatorNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent) override
 Methods invoked by print to print information about the object including superclasses. More...
 
void ComputeSupportSize (const double matrix[16], int size[3]) override
 Get the support size for use in computing update extents. More...
 
bool IsSeparable () override
 Returns true if the interpolator supports weight precomputation. More...
 
void FreePrecomputedWeights (vtkInterpolationWeights *&weights) override
 Free the precomputed weights. More...
 
virtual void SetInterpolationMode (int mode)
 The interpolation mode for point scalars (default: linear). More...
 
void SetInterpolationModeToNearest ()
 The interpolation mode for point scalars (default: linear). More...
 
void SetInterpolationModeToLinear ()
 The interpolation mode for point scalars (default: linear). More...
 
void SetInterpolationModeToCubic ()
 The interpolation mode for point scalars (default: linear). More...
 
int GetInterpolationMode ()
 The interpolation mode for point scalars (default: linear). More...
 
virtual const char * GetInterpolationModeAsString ()
 The interpolation mode for point scalars (default: linear). More...
 
void PrecomputeWeightsForExtent (const double matrix[16], const int extent[6], int newExtent[6], vtkInterpolationWeights *&weights) override
 If the data is going to be sampled on a regular grid, then the interpolation weights can be precomputed. More...
 
void PrecomputeWeightsForExtent (const float matrix[16], const int extent[6], int newExtent[6], vtkInterpolationWeights *&weights) override
 If the data is going to be sampled on a regular grid, then the interpolation weights can be precomputed. More...
 
- Public Member Functions inherited from vtkAbstractImageInterpolator
virtual vtkTypeBool IsA (const char *type)
 Return 1 if this class is the same type of (or a subclass of) the named class. More...
 
vtkAbstractImageInterpolatorNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent) override
 Methods invoked by print to print information about the object including superclasses. More...
 
virtual void Initialize (vtkDataObject *data)
 Initialize the interpolator with the data that you wish to interpolate. More...
 
virtual void ReleaseData ()
 Release any data stored by the interpolator. More...
 
void DeepCopy (vtkAbstractImageInterpolator *obj)
 Copy the interpolator. More...
 
virtual void Update ()
 Update the interpolator. More...
 
double Interpolate (double x, double y, double z, int component)
 Get the result of interpolating the specified component of the input data, which should be set to zero if there is only one component. More...
 
bool Interpolate (const double point[3], double *value)
 Sample the input data. More...
 
void SetOutValue (double outValue)
 The value to return when the point is out of bounds. More...
 
double GetOutValue ()
 
void SetTolerance (double tol)
 The tolerance to apply when checking whether a point is out of bounds. More...
 
double GetTolerance ()
 
void SetComponentOffset (int offset)
 This method specifies which component of the input will be interpolated, or if ComponentCount is also set, it specifies the first component. More...
 
int GetComponentOffset ()
 
void SetComponentCount (int count)
 This method specifies the number of components to extract. More...
 
int GetComponentCount ()
 
int ComputeNumberOfComponents (int inputComponents)
 Compute the number of output components based on the ComponentOffset, ComponentCount, and the number of components in the input data. More...
 
int GetNumberOfComponents ()
 Get the number of components that will be returned when Interpolate() is called. More...
 
void SetSlidingWindow (bool x)
 Enable sliding window for separable kernels. More...
 
void SlidingWindowOn ()
 
void SlidingWindowOff ()
 
bool GetSlidingWindow ()
 
virtual void ComputeSupportSize (const double matrix[16], int support[3])=0
 Get the support size for use in computing update extents. More...
 
virtual bool IsSeparable ()=0
 True if the interpolation is separable, which means that the weights can be precomputed in order to accelerate the interpolation. More...
 
virtual void FreePrecomputedWeights (vtkInterpolationWeights *&weights)
 Free the weights that were provided by PrecomputeWeightsForExtent. More...
 
void InterpolateIJK (const double point[3], double *value)
 A version of Interpolate that takes structured coords instead of data coords. More...
 
void InterpolateIJK (const float point[3], float *value)
 A version of Interpolate that takes structured coords instead of data coords. More...
 
bool CheckBoundsIJK (const double x[3])
 Check an x,y,z point to see if it is within the bounds for the structured coords of the image. More...
 
bool CheckBoundsIJK (const float x[3])
 Check an x,y,z point to see if it is within the bounds for the structured coords of the image. More...
 
void SetBorderMode (int mode)
 The border mode (default: clamp). More...
 
void SetBorderModeToClamp ()
 The border mode (default: clamp). More...
 
void SetBorderModeToRepeat ()
 The border mode (default: clamp). More...
 
void SetBorderModeToMirror ()
 The border mode (default: clamp). More...
 
int GetBorderMode ()
 The border mode (default: clamp). More...
 
const char * GetBorderModeAsString ()
 The border mode (default: clamp). More...
 
void InterpolateRow (vtkInterpolationWeights *&weights, int xIdx, int yIdx, int zIdx, double *value, int n)
 Get a row of samples, using the weights that were precomputed by PrecomputeWeightsForExtent. More...
 
void InterpolateRow (vtkInterpolationWeights *&weights, int xIdx, int yIdx, int zIdx, float *value, int n)
 Get a row of samples, using the weights that were precomputed by PrecomputeWeightsForExtent. More...
 
virtual double * GetSpacing ()
 Get the spacing of the data being interpolated. More...
 
virtual void GetSpacing (double &, double &, double &)
 Get the spacing of the data being interpolated. More...
 
virtual void GetSpacing (double[3])
 Get the spacing of the data being interpolated. More...
 
virtual double * GetOrigin ()
 Get the origin of the data being interpolated. More...
 
virtual void GetOrigin (double &, double &, double &)
 Get the origin of the data being interpolated. More...
 
virtual void GetOrigin (double[3])
 Get the origin of the data being interpolated. More...
 
virtual int * GetExtent ()
 Get the extent of the data being interpolated. More...
 
virtual void GetExtent (int &, int &, int &, int &, int &, int &)
 Get the extent of the data being interpolated. More...
 
virtual void GetExtent (int[6])
 Get the extent of the data being interpolated. More...
 
- Public Member Functions inherited from vtkObject
 vtkBaseTypeMacro (vtkObject, vtkObjectBase)
 
virtual void DebugOn ()
 Turn debugging output on. More...
 
virtual void DebugOff ()
 Turn debugging output off. More...
 
bool GetDebug ()
 Get the value of the debug flag. More...
 
void SetDebug (bool debugFlag)
 Set the value of the debug flag. More...
 
virtual void Modified ()
 Update the modification time for this object. More...
 
virtual vtkMTimeType GetMTime ()
 Return this object's modified time. More...
 
void PrintSelf (ostream &os, vtkIndent indent) override
 Methods invoked by print to print information about the object including superclasses. More...
 
void RemoveObserver (unsigned long tag)
 
void RemoveObservers (unsigned long event)
 
void RemoveObservers (const char *event)
 
void RemoveAllObservers ()
 
vtkTypeBool HasObserver (unsigned long event)
 
vtkTypeBool HasObserver (const char *event)
 
int InvokeEvent (unsigned long event)
 
int InvokeEvent (const char *event)
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
vtkCommandGetCommand (unsigned long tag)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
void RemoveObserver (vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
void RemoveObservers (unsigned long event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
void RemoveObservers (const char *event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
vtkTypeBool HasObserver (unsigned long event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
vtkTypeBool HasObserver (const char *event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 Overloads to AddObserver that allow developers to add class member functions as callbacks for events. More...
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 Overloads to AddObserver that allow developers to add class member functions as callbacks for events. More...
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 Allow user to set the AbortFlagOn() with the return value of the callback method. More...
 
int InvokeEvent (unsigned long event, void *callData)
 This method invokes an event and return whether the event was aborted or not. More...
 
int InvokeEvent (const char *event, void *callData)
 This method invokes an event and return whether the event was aborted or not. More...
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 Return the class name as a string. More...
 
virtual vtkTypeBool IsA (const char *name)
 Return 1 if this class is the same type of (or a subclass of) the named class. More...
 
virtual vtkIdType GetNumberOfGenerationsFromBase (const char *name)
 Given the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class). More...
 
virtual void Delete ()
 Delete a VTK object. More...
 
virtual void FastDelete ()
 Delete a reference to this object. More...
 
void InitializeObjectBase ()
 
void Print (ostream &os)
 Print an object to an ostream. More...
 
virtual void Register (vtkObjectBase *o)
 Increase the reference count (mark as used by another object). More...
 
virtual void UnRegister (vtkObjectBase *o)
 Decrease the reference count (release by another object). More...
 
int GetReferenceCount ()
 Return the current reference count of this object. More...
 
void SetReferenceCount (int)
 Sets the reference count. More...
 
bool GetIsInMemkind () const
 A local state flag that remembers whether this object lives in the normal or extended memory space. More...
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 Methods invoked by print to print information about the object including superclasses. More...
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 Methods invoked by print to print information about the object including superclasses. More...
 

Static Public Member Functions

static vtkGenericImageInterpolatorNew ()
 
static vtkTypeBool IsTypeOf (const char *type)
 
static vtkGenericImageInterpolatorSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkImageInterpolator
static vtkImageInterpolatorNew ()
 
static vtkTypeBool IsTypeOf (const char *type)
 
static vtkImageInterpolatorSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkAbstractImageInterpolator
static vtkTypeBool IsTypeOf (const char *type)
 
static vtkAbstractImageInterpolatorSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkObject
static vtkObjectNew ()
 Create an object with Debug turned off, modified time initialized to zero, and reference counting on. More...
 
static void BreakOnError ()
 This method is called when vtkErrorMacro executes. More...
 
static void SetGlobalWarningDisplay (int val)
 This is a global flag that controls whether any debug, warning or error messages are displayed. More...
 
static void GlobalWarningDisplayOn ()
 This is a global flag that controls whether any debug, warning or error messages are displayed. More...
 
static void GlobalWarningDisplayOff ()
 This is a global flag that controls whether any debug, warning or error messages are displayed. More...
 
static int GetGlobalWarningDisplay ()
 This is a global flag that controls whether any debug, warning or error messages are displayed. More...
 
- Static Public Member Functions inherited from vtkObjectBase
static vtkTypeBool IsTypeOf (const char *name)
 Return 1 if this class type is the same type of (or a subclass of) the named class. More...
 
static vtkIdType GetNumberOfGenerationsFromBaseType (const char *name)
 Given a the name of a base class of this class type, return the distance of inheritance between this class type and the named class (how many generations of inheritance are there between this class and the named class). More...
 
static vtkObjectBaseNew ()
 Create an object with Debug turned off, modified time initialized to zero, and reference counting on. More...
 
static void SetMemkindDirectory (const char *directoryname)
 The name of a directory, ideally mounted -o dax, to memory map an extended memory space within. More...
 
static bool GetUsingMemkind ()
 A global state flag that controls whether vtkObjects are constructed in the usual way (the default) or within the extended memory space. More...
 

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkGenericImageInterpolator ()
 
 ~vtkGenericImageInterpolator () override
 
void GetInterpolationFunc (void(**doublefunc)(vtkInterpolationInfo *, const double[3], double *)) override
 Get the interpolation functions. More...
 
void GetInterpolationFunc (void(**floatfunc)(vtkInterpolationInfo *, const float[3], float *)) override
 Get the interpolation functions. More...
 
void GetRowInterpolationFunc (void(**doublefunc)(vtkInterpolationWeights *, int, int, int, double *, int)) override
 Get the row interpolation functions. More...
 
void GetRowInterpolationFunc (void(**floatfunc)(vtkInterpolationWeights *, int, int, int, float *, int)) override
 Get the row interpolation functions. More...
 
- Protected Member Functions inherited from vtkImageInterpolator
virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkImageInterpolator ()
 
 ~vtkImageInterpolator () override
 
void InternalUpdate () override
 Update the interpolator. More...
 
void InternalDeepCopy (vtkAbstractImageInterpolator *obj) override
 Copy all members. More...
 
void GetInterpolationFunc (void(**doublefunc)(vtkInterpolationInfo *, const double[3], double *)) override
 Get the interpolation functions. More...
 
void GetInterpolationFunc (void(**floatfunc)(vtkInterpolationInfo *, const float[3], float *)) override
 Get the interpolation functions. More...
 
void GetRowInterpolationFunc (void(**doublefunc)(vtkInterpolationWeights *, int, int, int, double *, int)) override
 Get the row interpolation functions. More...
 
void GetRowInterpolationFunc (void(**floatfunc)(vtkInterpolationWeights *, int, int, int, float *, int)) override
 Get the row interpolation functions. More...
 
- Protected Member Functions inherited from vtkAbstractImageInterpolator
virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkAbstractImageInterpolator ()
 
 ~vtkAbstractImageInterpolator () override
 
virtual void InternalUpdate ()=0
 Subclass-specific updates. More...
 
virtual void InternalDeepCopy (vtkAbstractImageInterpolator *obj)=0
 Subclass-specific copy. More...
 
virtual void GetSlidingWindowFunc (void(**doublefunc)(vtkInterpolationWeights *, int, int, int, double *, int))
 Get the sliding window interpolation functions. More...
 
virtual void GetSlidingWindowFunc (void(**floatfunc)(vtkInterpolationWeights *, int, int, int, float *, int))
 Get the sliding window interpolation functions. More...
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
 ~vtkObject () override
 
void RegisterInternal (vtkObjectBase *, vtkTypeBool check) override
 
void UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) override
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=nullptr)
 These methods allow a command to exclusively grab all events. More...
 
void InternalReleaseFocus ()
 These methods allow a command to exclusively grab all events. More...
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void RegisterInternal (vtkObjectBase *, vtkTypeBool check)
 
virtual void UnRegisterInternal (vtkObjectBase *, vtkTypeBool check)
 
virtual void ReportReferences (vtkGarbageCollector *)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Additional Inherited Members

- Static Protected Member Functions inherited from vtkObjectBase
static vtkMallocingFunction GetCurrentMallocFunction ()
 
static vtkReallocingFunction GetCurrentReallocFunction ()
 
static vtkFreeingFunction GetCurrentFreeFunction ()
 
static vtkFreeingFunction GetAlternateFreeFunction ()
 
- Protected Attributes inherited from vtkImageInterpolator
int InterpolationMode
 
- Protected Attributes inherited from vtkAbstractImageInterpolator
vtkDataArrayScalars
 
double StructuredBoundsDouble [6]
 
float StructuredBoundsFloat [6]
 
int Extent [6]
 
double Spacing [3]
 
double Origin [3]
 
double OutValue
 
double Tolerance
 
int BorderMode
 
int ComponentOffset
 
int ComponentCount
 
bool SlidingWindow
 
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
std::atomic< int32_t > ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Detailed Description

interpolate data values from images using vtkGenericDataArray API

vtkGenericImageInterpolator provides a simple interface for interpolating image data. It provides linear, cubic, and nearest-neighbor interpolation. The only difference between it and vtkImageInterpolator is vtkGenericImageInterpolator does not assume an underlying data structure for its data arrays; instead, it uses the API from vtkGenericDataArray to perform calculations.

See also
vtkImageInterpolator vtkImageReslice

Definition at line 34 of file vtkGenericImageInterpolator.h.

Member Typedef Documentation

◆ Superclass

Definition at line 38 of file vtkGenericImageInterpolator.h.

Constructor & Destructor Documentation

◆ vtkGenericImageInterpolator()

vtkGenericImageInterpolator::vtkGenericImageInterpolator ( )
protected

◆ ~vtkGenericImageInterpolator()

vtkGenericImageInterpolator::~vtkGenericImageInterpolator ( )
overrideprotected

Member Function Documentation

◆ New()

static vtkGenericImageInterpolator * vtkGenericImageInterpolator::New ( )
static

◆ IsTypeOf()

static vtkTypeBool vtkGenericImageInterpolator::IsTypeOf ( const char *  type)
static

◆ IsA()

virtual vtkTypeBool vtkGenericImageInterpolator::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 vtkImageInterpolator.

◆ SafeDownCast()

static vtkGenericImageInterpolator * vtkGenericImageInterpolator::SafeDownCast ( vtkObjectBase o)
static

◆ NewInstanceInternal()

virtual vtkObjectBase * vtkGenericImageInterpolator::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkImageInterpolator.

◆ NewInstance()

vtkGenericImageInterpolator * vtkGenericImageInterpolator::NewInstance ( ) const

◆ PrintSelf()

void vtkGenericImageInterpolator::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
overridevirtual

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.

◆ Update()

void vtkGenericImageInterpolator::Update ( )
overridevirtual

Update the interpolator.

If the interpolator has been modified by a Set method since Initialize() was called, you must call this method to update the interpolator before you can use it.

Reimplemented from vtkAbstractImageInterpolator.

◆ GetInterpolationFunc() [1/2]

void vtkGenericImageInterpolator::GetInterpolationFunc ( void(**)(vtkInterpolationInfo *, const double[3], double *)  doublefunc)
overrideprotectedvirtual

Get the interpolation functions.

Reimplemented from vtkAbstractImageInterpolator.

◆ GetInterpolationFunc() [2/2]

void vtkGenericImageInterpolator::GetInterpolationFunc ( void(**)(vtkInterpolationInfo *, const float[3], float *)  floatfunc)
overrideprotectedvirtual

Get the interpolation functions.

Reimplemented from vtkAbstractImageInterpolator.

◆ GetRowInterpolationFunc() [1/2]

void vtkGenericImageInterpolator::GetRowInterpolationFunc ( void(**)(vtkInterpolationWeights *, int, int, int, double *, int)  doublefunc)
overrideprotectedvirtual

Get the row interpolation functions.

Reimplemented from vtkAbstractImageInterpolator.

◆ GetRowInterpolationFunc() [2/2]

void vtkGenericImageInterpolator::GetRowInterpolationFunc ( void(**)(vtkInterpolationWeights *, int, int, int, float *, int)  floatfunc)
overrideprotectedvirtual

Get the row interpolation functions.

Reimplemented from vtkAbstractImageInterpolator.


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