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

a cubic b-spline deformation transformation More...

#include <vtkBSplineTransform.h>

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

List of all members.

Public Types

typedef vtkWarpTransform Superclass

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
virtual void PrintSelf (ostream &os, vtkIndent indent)
vtkAbstractTransformMakeTransform ()
unsigned long GetMTime ()
virtual void SetCoefficients (vtkImageData *)
virtual vtkImageDataGetCoefficients ()
virtual void SetDisplacementScale (double)
virtual void SetBorderMode (int)
void SetBorderModeToEdge ()
void SetBorderModeToZero ()
void SetBorderModeToZeroAtBorder ()
virtual int GetBorderMode ()
const char * GetBorderModeAsString ()

Static Public Member Functions

static vtkBSplineTransformNew ()
static int IsTypeOf (const char *type)
static vtkBSplineTransformSafeDownCast (vtkObject *o)

Protected Member Functions

 vtkBSplineTransform ()
 ~vtkBSplineTransform ()
void InternalUpdate ()
void InternalDeepCopy (vtkAbstractTransform *transform)
void ForwardTransformDerivative (const float in[3], float out[3], float derivative[3][3])
void ForwardTransformDerivative (const double in[3], double out[3], double derivative[3][3])
void InverseTransformPoint (const float in[3], float out[3])
void InverseTransformPoint (const double in[3], double out[3])
void InverseTransformDerivative (const float in[3], float out[3], float derivative[3][3])
void InverseTransformDerivative (const double in[3], double out[3], double derivative[3][3])
void ForwardTransformPoint (const float in[3], float out[3])
void ForwardTransformPoint (const double in[3], double out[3])

Protected Attributes

void(* CalculateSpline )(const double point[3], double displacement[3], double derivatives[3][3], void *gridPtr, int inExt[6], vtkIdType inInc[3], int borderMode)
vtkImageDataCoefficients
double DisplacementScale
int BorderMode
void * GridPointer
double GridSpacing [3]
double GridOrigin [3]
int GridExtent [6]
vtkIdType GridIncrements [3]

Detailed Description

a cubic b-spline deformation transformation

vtkBSplineTransform computes a cubic b-spline transformation from a grid of b-spline coefficients.

Warning:
The inverse grid transform is calculated using an iterative method, and is several times more expensive than the forward transform.
See also:
vtkGeneralTransform vtkTransformToGrid vtkImageBSplineCoefficients
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:
vtkBSplineTransform (Tests)

Definition at line 48 of file vtkBSplineTransform.h.


Member Typedef Documentation

Reimplemented from vtkWarpTransform.

Definition at line 52 of file vtkBSplineTransform.h.


Constructor & Destructor Documentation

vtkBSplineTransform::vtkBSplineTransform ( ) [protected]
vtkBSplineTransform::~vtkBSplineTransform ( ) [protected]

Member Function Documentation

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

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

Reimplemented from vtkObject.

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

Reimplemented from vtkWarpTransform.

static int vtkBSplineTransform::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 vtkWarpTransform.

virtual int vtkBSplineTransform::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 vtkWarpTransform.

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

Reimplemented from vtkWarpTransform.

virtual void vtkBSplineTransform::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 vtkWarpTransform.

virtual void vtkBSplineTransform::SetCoefficients ( vtkImageData ) [virtual]

Set/Get the coefficient grid for the b-spline transform. The vtkBSplineTransform class will never modify the data.

virtual vtkImageData* vtkBSplineTransform::GetCoefficients ( ) [virtual]

Set/Get the coefficient grid for the b-spline transform. The vtkBSplineTransform class will never modify the data.

virtual void vtkBSplineTransform::SetDisplacementScale ( double  ) [virtual]

Set/Get a scale to apply to the transformation.

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

Set/Get the border mode, to alter behavior at the edge of the grid. The Edge mode allows the displacement to converge to the edge coefficient past the boundary, which is similar to the behavior of the vtkGridTransform. The Zero mode allows the displacement to smoothly converge to zero two node-spacings past the boundary, which is useful when you want to create a localized transform. The ZeroAtBorder mode sacrifices smoothness to further localize the transform to just one node-spacing past the boundary.

void vtkBSplineTransform::SetBorderModeToEdge ( ) [inline]

Set/Get the border mode, to alter behavior at the edge of the grid. The Edge mode allows the displacement to converge to the edge coefficient past the boundary, which is similar to the behavior of the vtkGridTransform. The Zero mode allows the displacement to smoothly converge to zero two node-spacings past the boundary, which is useful when you want to create a localized transform. The ZeroAtBorder mode sacrifices smoothness to further localize the transform to just one node-spacing past the boundary.

Definition at line 78 of file vtkBSplineTransform.h.

void vtkBSplineTransform::SetBorderModeToZero ( ) [inline]

Set/Get the border mode, to alter behavior at the edge of the grid. The Edge mode allows the displacement to converge to the edge coefficient past the boundary, which is similar to the behavior of the vtkGridTransform. The Zero mode allows the displacement to smoothly converge to zero two node-spacings past the boundary, which is useful when you want to create a localized transform. The ZeroAtBorder mode sacrifices smoothness to further localize the transform to just one node-spacing past the boundary.

Definition at line 80 of file vtkBSplineTransform.h.

void vtkBSplineTransform::SetBorderModeToZeroAtBorder ( ) [inline]

Set/Get the border mode, to alter behavior at the edge of the grid. The Edge mode allows the displacement to converge to the edge coefficient past the boundary, which is similar to the behavior of the vtkGridTransform. The Zero mode allows the displacement to smoothly converge to zero two node-spacings past the boundary, which is useful when you want to create a localized transform. The ZeroAtBorder mode sacrifices smoothness to further localize the transform to just one node-spacing past the boundary.

Definition at line 82 of file vtkBSplineTransform.h.

virtual int vtkBSplineTransform::GetBorderMode ( ) [virtual]

Set/Get the border mode, to alter behavior at the edge of the grid. The Edge mode allows the displacement to converge to the edge coefficient past the boundary, which is similar to the behavior of the vtkGridTransform. The Zero mode allows the displacement to smoothly converge to zero two node-spacings past the boundary, which is useful when you want to create a localized transform. The ZeroAtBorder mode sacrifices smoothness to further localize the transform to just one node-spacing past the boundary.

const char* vtkBSplineTransform::GetBorderModeAsString ( )

Set/Get the border mode, to alter behavior at the edge of the grid. The Edge mode allows the displacement to converge to the edge coefficient past the boundary, which is similar to the behavior of the vtkGridTransform. The Zero mode allows the displacement to smoothly converge to zero two node-spacings past the boundary, which is useful when you want to create a localized transform. The ZeroAtBorder mode sacrifices smoothness to further localize the transform to just one node-spacing past the boundary.

vtkAbstractTransform* vtkBSplineTransform::MakeTransform ( ) [virtual]

Make another transform of the same type.

Implements vtkAbstractTransform.

unsigned long vtkBSplineTransform::GetMTime ( ) [virtual]

Get the MTime.

Reimplemented from vtkAbstractTransform.

void vtkBSplineTransform::InternalUpdate ( ) [protected, virtual]

Update the displacement grid.

Reimplemented from vtkAbstractTransform.

void vtkBSplineTransform::InternalDeepCopy ( vtkAbstractTransform transform) [protected, virtual]

Copy this transform from another of the same type.

Reimplemented from vtkAbstractTransform.

void vtkBSplineTransform::ForwardTransformPoint ( const float  in[3],
float  out[3] 
) [protected, virtual]

Internal functions for calculating the transformation.

Implements vtkWarpTransform.

void vtkBSplineTransform::ForwardTransformPoint ( const double  in[3],
double  out[3] 
) [protected, virtual]

Internal functions for calculating the transformation.

Implements vtkWarpTransform.

void vtkBSplineTransform::ForwardTransformDerivative ( const float  in[3],
float  out[3],
float  derivative[3][3] 
) [protected, virtual]

Calculate the forward transform as well as the derivative.

Implements vtkWarpTransform.

void vtkBSplineTransform::ForwardTransformDerivative ( const double  in[3],
double  out[3],
double  derivative[3][3] 
) [protected, virtual]

Calculate the forward transform as well as the derivative.

Implements vtkWarpTransform.

void vtkBSplineTransform::InverseTransformPoint ( const float  in[3],
float  out[3] 
) [protected, virtual]

If the InverseFlag is set to 1, then a call to InternalTransformPoint results in a call to InverseTransformPoint. The inverse transformation is calculated from using Newton's method.

Reimplemented from vtkWarpTransform.

void vtkBSplineTransform::InverseTransformPoint ( const double  in[3],
double  out[3] 
) [protected, virtual]

If the InverseFlag is set to 1, then a call to InternalTransformPoint results in a call to InverseTransformPoint. The inverse transformation is calculated from using Newton's method.

Reimplemented from vtkWarpTransform.

void vtkBSplineTransform::InverseTransformDerivative ( const float  in[3],
float  out[3],
float  derivative[3][3] 
) [protected, virtual]

Calculate the inverse transform as well as the derivative of the forward transform (that's correct: the derivative of the forward transform, not of the inverse transform)

Reimplemented from vtkWarpTransform.

void vtkBSplineTransform::InverseTransformDerivative ( const double  in[3],
double  out[3],
double  derivative[3][3] 
) [protected, virtual]

Calculate the inverse transform as well as the derivative of the forward transform (that's correct: the derivative of the forward transform, not of the inverse transform)

Reimplemented from vtkWarpTransform.


Member Data Documentation

void(* vtkBSplineTransform::CalculateSpline)(const double point[3], double displacement[3], double derivatives[3][3], void *gridPtr, int inExt[6], vtkIdType inInc[3], int borderMode) [protected]

Definition at line 124 of file vtkBSplineTransform.h.

Definition at line 130 of file vtkBSplineTransform.h.

Definition at line 131 of file vtkBSplineTransform.h.

Definition at line 132 of file vtkBSplineTransform.h.

Definition at line 134 of file vtkBSplineTransform.h.

Definition at line 135 of file vtkBSplineTransform.h.

Definition at line 136 of file vtkBSplineTransform.h.

Definition at line 137 of file vtkBSplineTransform.h.

Definition at line 138 of file vtkBSplineTransform.h.


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