VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
vtkImageBSplineCoefficients Class Reference

convert image to b-spline knots More...

#include <vtkImageBSplineCoefficients.h>

Inheritance diagram for vtkImageBSplineCoefficients:
Inheritance graph
[legend]
Collaboration diagram for vtkImageBSplineCoefficients:
Collaboration graph
[legend]

List of all members.

Public Types

typedef vtkThreadedImageAlgorithm Superclass

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
int CheckBounds (const double point[3])
int SplitExtent (int splitExt[6], int startExt[6], int num, int total)
virtual void SetSplineDegree (int)
virtual int GetSplineDegree ()
virtual void SetBorderMode (int)
void SetBorderModeToClamp ()
void SetBorderModeToRepeat ()
void SetBorderModeToMirror ()
virtual int GetBorderMode ()
const char * GetBorderModeAsString ()
virtual void SetOutputScalarType (int)
virtual int GetOutputScalarType ()
void SetOutputScalarTypeToFloat ()
void SetOutputScalarTypeToDouble ()
const char * GetOutputScalarTypeAsString ()
virtual void SetBypass (int)
virtual void BypassOn ()
virtual void BypassOff ()
virtual int GetBypass ()
void Evaluate (const double point[3], double *value)
double Evaluate (double x, double y, double z)
double Evaluate (const double point[3])

Static Public Member Functions

static
vtkImageBSplineCoefficients
New ()
static int IsTypeOf (const char *type)
static
vtkImageBSplineCoefficients
SafeDownCast (vtkObject *o)

Protected Member Functions

 vtkImageBSplineCoefficients ()
 ~vtkImageBSplineCoefficients ()
virtual void AllocateOutputData (vtkImageData *out, int *uExtent)
virtual vtkImageDataAllocateOutputData (vtkDataObject *out)
virtual int RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
virtual int RequestInformation (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
virtual int RequestUpdateExtent (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
virtual void ThreadedExecute (vtkImageData *inData, vtkImageData *outData, int outExt[6], int threadId)

Protected Attributes

int SplineDegree
int BorderMode
int OutputScalarType
int Bypass
int DataWasPassed
int Iteration

Detailed Description

convert image to b-spline knots

vtkImageBSplineCoefficients prepares an image for b-spline interpolation by converting the image values into b-spline knot coefficients. It is a necessary pre-filtering step before applying b-spline interpolation with vtkImageReslice.

This class is based on code provided by Philippe Thevenaz of EPFL, Lausanne, Switzerland. Please acknowledge his contribution by citing the following paper: [1] P. Thevenaz, T. Blu, M. Unser, "Interpolation Revisited," IEEE Transactions on Medical Imaging 19(7):739-758, 2000.

The clamped boundary condition (which is the default) is taken from code presented in the following paper: [2] D. Ruijters, P. Thevenaz, "GPU Prefilter for Accurate Cubic B-spline Interpolation," The Computer Journal, doi: 10.1093/comjnl/bxq086, 2010.

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:
vtkImageBSplineCoefficients (Tests)

Definition at line 54 of file vtkImageBSplineCoefficients.h.


Member Typedef Documentation

Reimplemented from vtkThreadedImageAlgorithm.

Definition at line 59 of file vtkImageBSplineCoefficients.h.


Constructor & Destructor Documentation

vtkImageBSplineCoefficients::vtkImageBSplineCoefficients ( ) [protected]
vtkImageBSplineCoefficients::~vtkImageBSplineCoefficients ( ) [protected]

Member Function Documentation

static vtkImageBSplineCoefficients* vtkImageBSplineCoefficients::New ( ) [static]

Create an object with Debug turned off, modified time initialized to zero, and reference counting on.

Reimplemented from vtkAlgorithm.

virtual const char* vtkImageBSplineCoefficients::GetClassName ( ) [virtual]

Reimplemented from vtkThreadedImageAlgorithm.

static int vtkImageBSplineCoefficients::IsTypeOf ( const char *  name) [static]

Return 1 if this class type 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 vtkThreadedImageAlgorithm.

virtual int vtkImageBSplineCoefficients::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 vtkThreadedImageAlgorithm.

static vtkImageBSplineCoefficients* vtkImageBSplineCoefficients::SafeDownCast ( vtkObject o) [static]

Reimplemented from vtkThreadedImageAlgorithm.

void vtkImageBSplineCoefficients::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 vtkThreadedImageAlgorithm.

virtual void vtkImageBSplineCoefficients::SetSplineDegree ( int  ) [virtual]

Set the degree of the spline polynomial. The default value is 3, and the maximum is 9.

virtual int vtkImageBSplineCoefficients::GetSplineDegree ( ) [virtual]

Set the degree of the spline polynomial. The default value is 3, and the maximum is 9.

virtual void vtkImageBSplineCoefficients::SetBorderMode ( int  ) [virtual]

Set the border mode. The filter that is used to create the coefficients must repeat the image somehow to make a theoritically infinite input. The default is to clamp values that are off the edge of the image, to the value at the closest point on the edge. The other ways of virtually extending the image are to produce mirrored copies, which results in optimal smoothness at the boundary, or to repeat the image, which results in a cyclic or periodic spline.

void vtkImageBSplineCoefficients::SetBorderModeToClamp ( ) [inline]

Set the border mode. The filter that is used to create the coefficients must repeat the image somehow to make a theoritically infinite input. The default is to clamp values that are off the edge of the image, to the value at the closest point on the edge. The other ways of virtually extending the image are to produce mirrored copies, which results in optimal smoothness at the boundary, or to repeat the image, which results in a cyclic or periodic spline.

Definition at line 80 of file vtkImageBSplineCoefficients.h.

void vtkImageBSplineCoefficients::SetBorderModeToRepeat ( ) [inline]

Set the border mode. The filter that is used to create the coefficients must repeat the image somehow to make a theoritically infinite input. The default is to clamp values that are off the edge of the image, to the value at the closest point on the edge. The other ways of virtually extending the image are to produce mirrored copies, which results in optimal smoothness at the boundary, or to repeat the image, which results in a cyclic or periodic spline.

Definition at line 82 of file vtkImageBSplineCoefficients.h.

void vtkImageBSplineCoefficients::SetBorderModeToMirror ( ) [inline]

Set the border mode. The filter that is used to create the coefficients must repeat the image somehow to make a theoritically infinite input. The default is to clamp values that are off the edge of the image, to the value at the closest point on the edge. The other ways of virtually extending the image are to produce mirrored copies, which results in optimal smoothness at the boundary, or to repeat the image, which results in a cyclic or periodic spline.

Definition at line 84 of file vtkImageBSplineCoefficients.h.

virtual int vtkImageBSplineCoefficients::GetBorderMode ( ) [virtual]

Set the border mode. The filter that is used to create the coefficients must repeat the image somehow to make a theoritically infinite input. The default is to clamp values that are off the edge of the image, to the value at the closest point on the edge. The other ways of virtually extending the image are to produce mirrored copies, which results in optimal smoothness at the boundary, or to repeat the image, which results in a cyclic or periodic spline.

const char* vtkImageBSplineCoefficients::GetBorderModeAsString ( )

Set the border mode. The filter that is used to create the coefficients must repeat the image somehow to make a theoritically infinite input. The default is to clamp values that are off the edge of the image, to the value at the closest point on the edge. The other ways of virtually extending the image are to produce mirrored copies, which results in optimal smoothness at the boundary, or to repeat the image, which results in a cyclic or periodic spline.

virtual void vtkImageBSplineCoefficients::SetOutputScalarType ( int  ) [virtual]

Set the scalar type of the output. Default is float. Floating-point output is used to avoid overflow, since the range of the output values is larger than the input values.

virtual int vtkImageBSplineCoefficients::GetOutputScalarType ( ) [virtual]

Set the scalar type of the output. Default is float. Floating-point output is used to avoid overflow, since the range of the output values is larger than the input values.

void vtkImageBSplineCoefficients::SetOutputScalarTypeToFloat ( ) [inline]

Set the scalar type of the output. Default is float. Floating-point output is used to avoid overflow, since the range of the output values is larger than the input values.

Definition at line 96 of file vtkImageBSplineCoefficients.h.

void vtkImageBSplineCoefficients::SetOutputScalarTypeToDouble ( ) [inline]

Set the scalar type of the output. Default is float. Floating-point output is used to avoid overflow, since the range of the output values is larger than the input values.

Definition at line 98 of file vtkImageBSplineCoefficients.h.

const char* vtkImageBSplineCoefficients::GetOutputScalarTypeAsString ( )

Set the scalar type of the output. Default is float. Floating-point output is used to avoid overflow, since the range of the output values is larger than the input values.

virtual void vtkImageBSplineCoefficients::SetBypass ( int  ) [virtual]

Bypass the filter, do not do any processing. If this is on, then the output data will reference the input data directly, and the output type will be the same as the input type. This is useful a downstream filter sometimes uses b-spline interpolation and sometimes uses other forms of interpolation.

virtual void vtkImageBSplineCoefficients::BypassOn ( ) [virtual]

Bypass the filter, do not do any processing. If this is on, then the output data will reference the input data directly, and the output type will be the same as the input type. This is useful a downstream filter sometimes uses b-spline interpolation and sometimes uses other forms of interpolation.

virtual void vtkImageBSplineCoefficients::BypassOff ( ) [virtual]

Bypass the filter, do not do any processing. If this is on, then the output data will reference the input data directly, and the output type will be the same as the input type. This is useful a downstream filter sometimes uses b-spline interpolation and sometimes uses other forms of interpolation.

virtual int vtkImageBSplineCoefficients::GetBypass ( ) [virtual]

Bypass the filter, do not do any processing. If this is on, then the output data will reference the input data directly, and the output type will be the same as the input type. This is useful a downstream filter sometimes uses b-spline interpolation and sometimes uses other forms of interpolation.

int vtkImageBSplineCoefficients::CheckBounds ( const double  point[3])

Check a point against the image bounds. Return 0 if out of bounds, and 1 if inside bounds. Calling Evaluate on a point outside the bounds will not generate an error, but the value returned will depend on the BorderMode.

void vtkImageBSplineCoefficients::Evaluate ( const double  point[3],
double value 
)

Interpolate a value from the image. You must call Update() before calling this method for the first time. The first signature can return multiple components, while the second signature is for use on single-component images.

double vtkImageBSplineCoefficients::Evaluate ( double  x,
double  y,
double  z 
)

Interpolate a value from the image. You must call Update() before calling this method for the first time. The first signature can return multiple components, while the second signature is for use on single-component images.

double vtkImageBSplineCoefficients::Evaluate ( const double  point[3]) [inline]

Interpolate a value from the image. You must call Update() before calling this method for the first time. The first signature can return multiple components, while the second signature is for use on single-component images.

Definition at line 127 of file vtkImageBSplineCoefficients.h.

int vtkImageBSplineCoefficients::SplitExtent ( int  splitExt[6],
int  startExt[6],
int  num,
int  total 
) [virtual]

Internal method. Override SplitExtent so that the full extent is available in the direction currently being processed.

Reimplemented from vtkThreadedImageAlgorithm.

virtual void vtkImageBSplineCoefficients::AllocateOutputData ( vtkImageData out,
int uExtent 
) [protected, virtual]

Reimplemented from vtkImageAlgorithm.

virtual vtkImageData* vtkImageBSplineCoefficients::AllocateOutputData ( vtkDataObject out) [protected, virtual]

Reimplemented from vtkImageAlgorithm.

virtual int vtkImageBSplineCoefficients::RequestData ( vtkInformation request,
vtkInformationVector **  inputVector,
vtkInformationVector outputVector 
) [protected, virtual]

This is called by the superclass. This is the method you should override.

Reimplemented from vtkThreadedImageAlgorithm.

virtual int vtkImageBSplineCoefficients::RequestInformation ( vtkInformation ,
vtkInformationVector **  ,
vtkInformationVector  
) [protected, virtual]

Reimplemented from vtkImageAlgorithm.

virtual int vtkImageBSplineCoefficients::RequestUpdateExtent ( vtkInformation ,
vtkInformationVector **  ,
vtkInformationVector  
) [protected, virtual]

Reimplemented from vtkImageAlgorithm.

virtual void vtkImageBSplineCoefficients::ThreadedExecute ( vtkImageData inData,
vtkImageData outData,
int  outExt[6],
int  threadId 
) [protected, virtual]

Reimplemented from vtkThreadedImageAlgorithm.


Member Data Documentation

Definition at line 152 of file vtkImageBSplineCoefficients.h.

Definition at line 153 of file vtkImageBSplineCoefficients.h.

Definition at line 154 of file vtkImageBSplineCoefficients.h.

Definition at line 155 of file vtkImageBSplineCoefficients.h.

Definition at line 156 of file vtkImageBSplineCoefficients.h.

Definition at line 157 of file vtkImageBSplineCoefficients.h.


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