VTK
|
convert image to b-spline knots More...
#include <vtkImageBSplineCoefficients.h>
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.
Definition at line 55 of file vtkImageBSplineCoefficients.h.
Reimplemented from vtkThreadedImageAlgorithm.
Definition at line 60 of file vtkImageBSplineCoefficients.h.
vtkImageBSplineCoefficients::vtkImageBSplineCoefficients | ( | ) | [protected] |
vtkImageBSplineCoefficients::~vtkImageBSplineCoefficients | ( | ) | [protected] |
static vtkImageBSplineCoefficients* vtkImageBSplineCoefficients::New | ( | ) | [static] |
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.
static vtkImageBSplineCoefficients* vtkImageBSplineCoefficients::SafeDownCast | ( | vtkObjectBase * | o | ) | [static] |
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.
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 | ||
) | [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.
virtual int vtkImageBSplineCoefficients::RequestUpdateExtent | ( | vtkInformation * | , |
vtkInformationVector ** | , | ||
vtkInformationVector * | |||
) | [protected, virtual] |
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.
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.