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 int IsA (const char *type)
vtkImageBSplineCoefficientsNewInstance () const
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 (vtkObjectBase *o)

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 vtkImageBSplineCoefficients ()
 ~vtkImageBSplineCoefficients ()
virtual void AllocateOutputData (vtkImageData *out, vtkInformation *outInfo, int *uExtent)
virtual vtkImageDataAllocateOutputData (vtkDataObject *out, vtkInformation *outInfo)
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 55 of file vtkImageBSplineCoefficients.h.


Member Typedef Documentation

Reimplemented from vtkThreadedImageAlgorithm.

Definition at line 60 of file vtkImageBSplineCoefficients.h.


Constructor & Destructor Documentation


Member Function Documentation

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

Reimplemented from vtkAlgorithm.

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.

Reimplemented from vtkThreadedImageAlgorithm.

virtual vtkObjectBase* vtkImageBSplineCoefficients::NewInstanceInternal ( ) const [protected, virtual]

Reimplemented from vtkThreadedImageAlgorithm.

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.

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.

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 81 of file vtkImageBSplineCoefficients.h.

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 83 of file vtkImageBSplineCoefficients.h.

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 85 of file vtkImageBSplineCoefficients.h.

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.

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.

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.

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.

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 97 of file vtkImageBSplineCoefficients.h.

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 99 of file vtkImageBSplineCoefficients.h.

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.

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.

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.

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 128 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,
vtkInformation outInfo,
int uExtent 
) [protected, virtual]

Allocate the output data. This will be called before RequestData, it is not necessary for subclasses to call this method themselves.

Reimplemented from vtkImageAlgorithm.

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

Allocate the output data. This will be called before RequestData, it is not necessary for subclasses to call this method themselves.

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 request,
vtkInformationVector **  inputVector,
vtkInformationVector outputVector 
) [protected, virtual]

Subclasses can reimplement this method to collect information from their inputs and set information for their outputs.

Reimplemented from vtkImageAlgorithm.

Subclasses can reimplement this method to translate the update extent requests from each output port into update extent requests for the input connections.

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 155 of file vtkImageBSplineCoefficients.h.

Definition at line 156 of file vtkImageBSplineCoefficients.h.

Definition at line 157 of file vtkImageBSplineCoefficients.h.

Definition at line 158 of file vtkImageBSplineCoefficients.h.

Definition at line 159 of file vtkImageBSplineCoefficients.h.

Definition at line 160 of file vtkImageBSplineCoefficients.h.


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