VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkImageBSplineCoefficients Class Reference

convert image to b-spline knots More...

#include <vtkImageBSplineCoefficients.h>

Inherits vtkThreadedImageAlgorithm.

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 vtkObjectBase * NewInstanceInternal () const
 
 vtkImageBSplineCoefficients ()
 
 ~vtkImageBSplineCoefficients ()
 
virtual void AllocateOutputData (vtkImageData *out, vtkInformation *outInfo, int *uExtent)
 
virtual vtkImageData * AllocateOutputData (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

typedef vtkThreadedImageAlgorithm vtkImageBSplineCoefficients::Superclass

Definition at line 60 of file vtkImageBSplineCoefficients.h.

Constructor & Destructor Documentation

vtkImageBSplineCoefficients::vtkImageBSplineCoefficients ( )
protected
vtkImageBSplineCoefficients::~vtkImageBSplineCoefficients ( )
protected

Member Function Documentation

static vtkImageBSplineCoefficients* vtkImageBSplineCoefficients::New ( )
static
static int vtkImageBSplineCoefficients::IsTypeOf ( const char *  type)
static
virtual int vtkImageBSplineCoefficients::IsA ( const char *  type)
virtual
static vtkImageBSplineCoefficients* vtkImageBSplineCoefficients::SafeDownCast ( vtkObjectBase *  o)
static
virtual vtkObjectBase* vtkImageBSplineCoefficients::NewInstanceInternal ( ) const
protectedvirtual
vtkImageBSplineCoefficients* vtkImageBSplineCoefficients::NewInstance ( ) const
void vtkImageBSplineCoefficients::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
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 81 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 83 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 85 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 97 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 99 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 128 of file vtkImageBSplineCoefficients.h.

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

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

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

Member Data Documentation

int vtkImageBSplineCoefficients::SplineDegree
protected

Definition at line 155 of file vtkImageBSplineCoefficients.h.

int vtkImageBSplineCoefficients::BorderMode
protected

Definition at line 156 of file vtkImageBSplineCoefficients.h.

int vtkImageBSplineCoefficients::OutputScalarType
protected

Definition at line 157 of file vtkImageBSplineCoefficients.h.

int vtkImageBSplineCoefficients::Bypass
protected

Definition at line 158 of file vtkImageBSplineCoefficients.h.

int vtkImageBSplineCoefficients::DataWasPassed
protected

Definition at line 159 of file vtkImageBSplineCoefficients.h.

int vtkImageBSplineCoefficients::Iteration
protected

Definition at line 160 of file vtkImageBSplineCoefficients.h.


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