VTK
|
perform sinc interpolation on images More...
#include <vtkImageSincInterpolator.h>
Public Types | |
typedef vtkAbstractImageInterpolator | Superclass |
![]() | |
typedef vtkObject | Superclass |
![]() | |
typedef vtkObjectBase | Superclass |
Public Member Functions | |
virtual int | IsA (const char *type) |
vtkImageSincInterpolator * | NewInstance () const |
virtual void | PrintSelf (ostream &os, vtkIndent indent) |
virtual void | ComputeSupportSize (const double matrix[16], int support[3]) |
virtual bool | IsSeparable () |
virtual void | FreePrecomputedWeights (vtkInterpolationWeights *&weights) |
virtual void | SetWindowFunction (int mode) |
void | SetWindowFunctionToLanczos () |
void | SetWindowFunctionToKaiser () |
void | SetWindowFunctionToCosine () |
void | SetWindowFunctionToHann () |
void | SetWindowFunctionToHamming () |
void | SetWindowFunctionToBlackman () |
void | SetWindowFunctionToBlackmanHarris3 () |
void | SetWindowFunctionToBlackmanHarris4 () |
void | SetWindowFunctionToNuttall () |
void | SetWindowFunctionToBlackmanNuttall3 () |
void | SetWindowFunctionToBlackmanNuttall4 () |
int | GetWindowFunction () |
virtual const char * | GetWindowFunctionAsString () |
void | SetWindowHalfWidth (int n) |
int | GetWindowHalfWidth () |
void | SetUseWindowParameter (int val) |
void | UseWindowParameterOn () |
void | UseWindowParameterOff () |
int | GetUseWindowParameter () |
void | SetWindowParameter (double parm) |
double | GetWindowParameter () |
void | SetBlurFactors (double x, double y, double z) |
void | SetBlurFactors (const double f[3]) |
void | GetBlurFactors (double f[3]) |
double * | GetBlurFactors () |
void | SetAntialiasing (int antialiasing) |
void | AntialiasingOn () |
void | AntialiasingOff () |
int | GetAntialiasing () |
void | SetRenormalization (int renormalization) |
void | RenormalizationOn () |
void | RenormalizationOff () |
int | GetRenormalization () |
virtual void | PrecomputeWeightsForExtent (const double matrix[16], const int extent[6], int newExtent[6], vtkInterpolationWeights *&weights) |
virtual void | PrecomputeWeightsForExtent (const float matrix[16], const int extent[6], int newExtent[6], vtkInterpolationWeights *&weights) |
![]() | |
vtkAbstractImageInterpolator * | NewInstance () const |
virtual void | Initialize (vtkDataObject *data) |
virtual void | ReleaseData () |
void | DeepCopy (vtkAbstractImageInterpolator *obj) |
void | Update () |
double | Interpolate (double x, double y, double z, int component) |
bool | Interpolate (const double point[3], double *value) |
int | ComputeNumberOfComponents (int inputComponents) |
int | GetNumberOfComponents () |
void | SetOutValue (double outValue) |
double | GetOutValue () |
void | SetTolerance (double tol) |
double | GetTolerance () |
void | SetComponentOffset (int offset) |
int | GetComponentOffset () |
void | SetComponentCount (int count) |
int | GetComponentCount () |
void | InterpolateIJK (const double point[3], double *value) |
void | InterpolateIJK (const float point[3], float *value) |
bool | CheckBoundsIJK (const double x[3]) |
bool | CheckBoundsIJK (const float x[3]) |
void | SetBorderMode (int mode) |
void | SetBorderModeToClamp () |
void | SetBorderModeToRepeat () |
void | SetBorderModeToMirror () |
int | GetBorderMode () |
const char * | GetBorderModeAsString () |
void | InterpolateRow (vtkInterpolationWeights *&weights, int xIdx, int yIdx, int zIdx, double *value, int n) |
void | InterpolateRow (vtkInterpolationWeights *&weights, int xIdx, int yIdx, int zIdx, float *value, int n) |
virtual double * | GetSpacing () |
virtual void | GetSpacing (double &, double &, double &) |
virtual void | GetSpacing (double[3]) |
virtual double * | GetOrigin () |
virtual void | GetOrigin (double &, double &, double &) |
virtual void | GetOrigin (double[3]) |
virtual int * | GetExtent () |
virtual void | GetExtent (int &, int &, int &, int &, int &, int &) |
virtual void | GetExtent (int[6]) |
virtual int * | GetWholeExtent () |
virtual void | GetWholeExtent (int &, int &, int &, int &, int &, int &) |
virtual void | GetWholeExtent (int[6]) |
![]() | |
vtkObject * | NewInstance () const |
virtual void | DebugOn () |
virtual void | DebugOff () |
bool | GetDebug () |
void | SetDebug (bool debugFlag) |
virtual void | Modified () |
virtual unsigned long | GetMTime () |
unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f) |
unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f) |
vtkCommand * | GetCommand (unsigned long tag) |
void | RemoveObserver (vtkCommand *) |
void | RemoveObservers (unsigned long event, vtkCommand *) |
void | RemoveObservers (const char *event, vtkCommand *) |
int | HasObserver (unsigned long event, vtkCommand *) |
int | HasObserver (const char *event, vtkCommand *) |
void | RemoveObserver (unsigned long tag) |
void | RemoveObservers (unsigned long event) |
void | RemoveObservers (const char *event) |
void | RemoveAllObservers () |
int | HasObserver (unsigned long event) |
int | HasObserver (const char *event) |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f) |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
int | InvokeEvent (unsigned long event, void *callData) |
int | InvokeEvent (const char *event, void *callData) |
int | InvokeEvent (unsigned long event) |
int | InvokeEvent (const char *event) |
![]() | |
const char * | GetClassName () const |
virtual void | Delete () |
virtual void | FastDelete () |
void | Print (ostream &os) |
virtual void | Register (vtkObjectBase *o) |
virtual void | UnRegister (vtkObjectBase *o) |
void | SetReferenceCount (int) |
void | PrintRevisions (ostream &) |
virtual void | PrintHeader (ostream &os, vtkIndent indent) |
virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
int | GetReferenceCount () |
Static Public Member Functions | |
static vtkImageSincInterpolator * | New () |
static int | IsTypeOf (const char *type) |
static vtkImageSincInterpolator * | SafeDownCast (vtkObjectBase *o) |
![]() | |
static int | IsTypeOf (const char *type) |
static vtkAbstractImageInterpolator * | SafeDownCast (vtkObjectBase *o) |
![]() | |
static int | IsTypeOf (const char *type) |
static vtkObject * | SafeDownCast (vtkObjectBase *o) |
static vtkObject * | New () |
static void | BreakOnError () |
static void | SetGlobalWarningDisplay (int val) |
static void | GlobalWarningDisplayOn () |
static void | GlobalWarningDisplayOff () |
static int | GetGlobalWarningDisplay () |
![]() | |
static int | IsTypeOf (const char *name) |
static vtkObjectBase * | New () |
perform sinc interpolation on images
vtkImageSincInterpolator provides various windowed sinc interpolation methods for image data. The default is a five-lobed Lanczos interpolant, with a kernel size of 6. The interpolator can also bandlimit the image, which can be used for antialiasing. The interpolation kernels are evaluated via a lookup table for efficiency.
Definition at line 55 of file vtkImageSincInterpolator.h.
Definition at line 60 of file vtkImageSincInterpolator.h.
|
protected |
|
protected |
|
static |
|
static |
|
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 vtkAbstractImageInterpolator.
|
static |
|
protectedvirtual |
Reimplemented from vtkAbstractImageInterpolator.
vtkImageSincInterpolator* vtkImageSincInterpolator::NewInstance | ( | ) | const |
|
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 vtkAbstractImageInterpolator.
|
virtual |
The window function to use. The default is Lanczos, which is very popular and performs well with a kernel width of 6. The Cosine window is included for historical reasons. All other windows are described in AH Nuttall, "Some windows with very good sidelobe behavior," IEEE Transactions on Acoustics, Speech, and Signal Processing 29:84-91, 1981.
|
inline |
The window function to use. The default is Lanczos, which is very popular and performs well with a kernel width of 6. The Cosine window is included for historical reasons. All other windows are described in AH Nuttall, "Some windows with very good sidelobe behavior," IEEE Transactions on Acoustics, Speech, and Signal Processing 29:84-91, 1981.
Definition at line 71 of file vtkImageSincInterpolator.h.
|
inline |
The window function to use. The default is Lanczos, which is very popular and performs well with a kernel width of 6. The Cosine window is included for historical reasons. All other windows are described in AH Nuttall, "Some windows with very good sidelobe behavior," IEEE Transactions on Acoustics, Speech, and Signal Processing 29:84-91, 1981.
Definition at line 73 of file vtkImageSincInterpolator.h.
|
inline |
The window function to use. The default is Lanczos, which is very popular and performs well with a kernel width of 6. The Cosine window is included for historical reasons. All other windows are described in AH Nuttall, "Some windows with very good sidelobe behavior," IEEE Transactions on Acoustics, Speech, and Signal Processing 29:84-91, 1981.
Definition at line 75 of file vtkImageSincInterpolator.h.
|
inline |
The window function to use. The default is Lanczos, which is very popular and performs well with a kernel width of 6. The Cosine window is included for historical reasons. All other windows are described in AH Nuttall, "Some windows with very good sidelobe behavior," IEEE Transactions on Acoustics, Speech, and Signal Processing 29:84-91, 1981.
Definition at line 77 of file vtkImageSincInterpolator.h.
|
inline |
The window function to use. The default is Lanczos, which is very popular and performs well with a kernel width of 6. The Cosine window is included for historical reasons. All other windows are described in AH Nuttall, "Some windows with very good sidelobe behavior," IEEE Transactions on Acoustics, Speech, and Signal Processing 29:84-91, 1981.
Definition at line 79 of file vtkImageSincInterpolator.h.
|
inline |
The window function to use. The default is Lanczos, which is very popular and performs well with a kernel width of 6. The Cosine window is included for historical reasons. All other windows are described in AH Nuttall, "Some windows with very good sidelobe behavior," IEEE Transactions on Acoustics, Speech, and Signal Processing 29:84-91, 1981.
Definition at line 81 of file vtkImageSincInterpolator.h.
|
inline |
The window function to use. The default is Lanczos, which is very popular and performs well with a kernel width of 6. The Cosine window is included for historical reasons. All other windows are described in AH Nuttall, "Some windows with very good sidelobe behavior," IEEE Transactions on Acoustics, Speech, and Signal Processing 29:84-91, 1981.
Definition at line 83 of file vtkImageSincInterpolator.h.
|
inline |
The window function to use. The default is Lanczos, which is very popular and performs well with a kernel width of 6. The Cosine window is included for historical reasons. All other windows are described in AH Nuttall, "Some windows with very good sidelobe behavior," IEEE Transactions on Acoustics, Speech, and Signal Processing 29:84-91, 1981.
Definition at line 85 of file vtkImageSincInterpolator.h.
|
inline |
The window function to use. The default is Lanczos, which is very popular and performs well with a kernel width of 6. The Cosine window is included for historical reasons. All other windows are described in AH Nuttall, "Some windows with very good sidelobe behavior," IEEE Transactions on Acoustics, Speech, and Signal Processing 29:84-91, 1981.
Definition at line 87 of file vtkImageSincInterpolator.h.
|
inline |
The window function to use. The default is Lanczos, which is very popular and performs well with a kernel width of 6. The Cosine window is included for historical reasons. All other windows are described in AH Nuttall, "Some windows with very good sidelobe behavior," IEEE Transactions on Acoustics, Speech, and Signal Processing 29:84-91, 1981.
Definition at line 89 of file vtkImageSincInterpolator.h.
|
inline |
The window function to use. The default is Lanczos, which is very popular and performs well with a kernel width of 6. The Cosine window is included for historical reasons. All other windows are described in AH Nuttall, "Some windows with very good sidelobe behavior," IEEE Transactions on Acoustics, Speech, and Signal Processing 29:84-91, 1981.
Definition at line 91 of file vtkImageSincInterpolator.h.
|
inline |
The window function to use. The default is Lanczos, which is very popular and performs well with a kernel width of 6. The Cosine window is included for historical reasons. All other windows are described in AH Nuttall, "Some windows with very good sidelobe behavior," IEEE Transactions on Acoustics, Speech, and Signal Processing 29:84-91, 1981.
Definition at line 93 of file vtkImageSincInterpolator.h.
|
virtual |
The window function to use. The default is Lanczos, which is very popular and performs well with a kernel width of 6. The Cosine window is included for historical reasons. All other windows are described in AH Nuttall, "Some windows with very good sidelobe behavior," IEEE Transactions on Acoustics, Speech, and Signal Processing 29:84-91, 1981.
void vtkImageSincInterpolator::SetWindowHalfWidth | ( | int | n | ) |
Set the window half-width, this must be an integer between 1 and 16, with a default value of 3. The kernel size will be twice this value if no blur factors are applied. The total number of sinc lobes will be one less than twice the half-width, so if the half-width is 3 then the kernel size will be 6 and there will be 5 sinc lobes.
|
inline |
Set the window half-width, this must be an integer between 1 and 16, with a default value of 3. The kernel size will be twice this value if no blur factors are applied. The total number of sinc lobes will be one less than twice the half-width, so if the half-width is 3 then the kernel size will be 6 and there will be 5 sinc lobes.
Definition at line 104 of file vtkImageSincInterpolator.h.
void vtkImageSincInterpolator::SetUseWindowParameter | ( | int | val | ) |
Turn this on in order to use SetWindowParameter. If it is off, then the default parameter will be used for the window.
|
inline |
Turn this on in order to use SetWindowParameter. If it is off, then the default parameter will be used for the window.
Definition at line 111 of file vtkImageSincInterpolator.h.
|
inline |
Turn this on in order to use SetWindowParameter. If it is off, then the default parameter will be used for the window.
Definition at line 112 of file vtkImageSincInterpolator.h.
|
inline |
Turn this on in order to use SetWindowParameter. If it is off, then the default parameter will be used for the window.
Definition at line 113 of file vtkImageSincInterpolator.h.
void vtkImageSincInterpolator::SetWindowParameter | ( | double | parm | ) |
Set the alpha parameter for the Kaiser window function. This parameter will be ignored unless UseWindowParameter is On. If UseWindowParameter is Off, then alpha is set to be the same as n where n is the window half-width. Using an alpha less than n increases the sharpness and ringing, while using an alpha greater than n increases the blurring.
|
inline |
Set the alpha parameter for the Kaiser window function. This parameter will be ignored unless UseWindowParameter is On. If UseWindowParameter is Off, then alpha is set to be the same as n where n is the window half-width. Using an alpha less than n increases the sharpness and ringing, while using an alpha greater than n increases the blurring.
Definition at line 124 of file vtkImageSincInterpolator.h.
|
virtual |
Get the support size for use in computing update extents. If the data will be sampled on a regular grid, then pass a matrix describing the structured coordinate transformation between the output and the input. Otherwise, pass NULL as the matrix to retrieve the full kernel size.
Implements vtkAbstractImageInterpolator.
Blur the image by widening the windowed sinc kernel by the specified factors for the x, y, and z directions. This reduces the bandwidth by these same factors. If you turn Antialiasing on, then the blur factors will be computed automatically from the output sampling rate. Blurring increases the computation time because the kernel size increases by the blur factor.
|
inline |
Blur the image by widening the windowed sinc kernel by the specified factors for the x, y, and z directions. This reduces the bandwidth by these same factors. If you turn Antialiasing on, then the blur factors will be computed automatically from the output sampling rate. Blurring increases the computation time because the kernel size increases by the blur factor.
Definition at line 142 of file vtkImageSincInterpolator.h.
|
inline |
Blur the image by widening the windowed sinc kernel by the specified factors for the x, y, and z directions. This reduces the bandwidth by these same factors. If you turn Antialiasing on, then the blur factors will be computed automatically from the output sampling rate. Blurring increases the computation time because the kernel size increases by the blur factor.
Definition at line 144 of file vtkImageSincInterpolator.h.
|
inline |
Blur the image by widening the windowed sinc kernel by the specified factors for the x, y, and z directions. This reduces the bandwidth by these same factors. If you turn Antialiasing on, then the blur factors will be computed automatically from the output sampling rate. Blurring increases the computation time because the kernel size increases by the blur factor.
Definition at line 148 of file vtkImageSincInterpolator.h.
void vtkImageSincInterpolator::SetAntialiasing | ( | int | antialiasing | ) |
Turn on antialiasing. If antialiasing is on, then the BlurFactors will be computed automatically from the output sampling rate such that that the image will be bandlimited to the Nyquist frequency. This is only applicable when the interpolator is being used by a resampling filter like vtkImageReslice. Such a filter will indicate the output sampling by calling the interpolator's ComputeSupportSize() method, which will compute the blur factors at the same time that it computes the support size.
|
inline |
Turn on antialiasing. If antialiasing is on, then the BlurFactors will be computed automatically from the output sampling rate such that that the image will be bandlimited to the Nyquist frequency. This is only applicable when the interpolator is being used by a resampling filter like vtkImageReslice. Such a filter will indicate the output sampling by calling the interpolator's ComputeSupportSize() method, which will compute the blur factors at the same time that it computes the support size.
Definition at line 161 of file vtkImageSincInterpolator.h.
|
inline |
Turn on antialiasing. If antialiasing is on, then the BlurFactors will be computed automatically from the output sampling rate such that that the image will be bandlimited to the Nyquist frequency. This is only applicable when the interpolator is being used by a resampling filter like vtkImageReslice. Such a filter will indicate the output sampling by calling the interpolator's ComputeSupportSize() method, which will compute the blur factors at the same time that it computes the support size.
Definition at line 162 of file vtkImageSincInterpolator.h.
|
inline |
Turn on antialiasing. If antialiasing is on, then the BlurFactors will be computed automatically from the output sampling rate such that that the image will be bandlimited to the Nyquist frequency. This is only applicable when the interpolator is being used by a resampling filter like vtkImageReslice. Such a filter will indicate the output sampling by calling the interpolator's ComputeSupportSize() method, which will compute the blur factors at the same time that it computes the support size.
Definition at line 163 of file vtkImageSincInterpolator.h.
void vtkImageSincInterpolator::SetRenormalization | ( | int | renormalization | ) |
Turn off renormalization. Most of the sinc windows provide kernels for which the weights do not sum to one, and for which the sum depends on the offset. This results in small ripple artifacts in the output. By default, the vtkImageSincInterpolator will renormalize these kernels. This method allows the renormalization to be turned off.
|
inline |
Turn off renormalization. Most of the sinc windows provide kernels for which the weights do not sum to one, and for which the sum depends on the offset. This results in small ripple artifacts in the output. By default, the vtkImageSincInterpolator will renormalize these kernels. This method allows the renormalization to be turned off.
Definition at line 174 of file vtkImageSincInterpolator.h.
|
inline |
Turn off renormalization. Most of the sinc windows provide kernels for which the weights do not sum to one, and for which the sum depends on the offset. This results in small ripple artifacts in the output. By default, the vtkImageSincInterpolator will renormalize these kernels. This method allows the renormalization to be turned off.
Definition at line 175 of file vtkImageSincInterpolator.h.
|
inline |
Turn off renormalization. Most of the sinc windows provide kernels for which the weights do not sum to one, and for which the sum depends on the offset. This results in small ripple artifacts in the output. By default, the vtkImageSincInterpolator will renormalize these kernels. This method allows the renormalization to be turned off.
Definition at line 176 of file vtkImageSincInterpolator.h.
|
virtual |
Returns true if the interpolator supports weight precomputation. This will always return true for this interpolator.
Implements vtkAbstractImageInterpolator.
|
virtual |
If the data is going to be sampled on a regular grid, then the interpolation weights can be precomputed. A matrix must be supplied that provides a transformation between the provided extent and the structured coordinates of the input. This matrix must perform only permutations, scales, and translation, i.e. each of the three columns must have only one non-zero value. A new extent is provided for out-of-bounds checks. THIS METHOD IS THREAD SAFE.
Reimplemented from vtkAbstractImageInterpolator.
|
virtual |
If the data is going to be sampled on a regular grid, then the interpolation weights can be precomputed. A matrix must be supplied that provides a transformation between the provided extent and the structured coordinates of the input. This matrix must perform only permutations, scales, and translation, i.e. each of the three columns must have only one non-zero value. A new extent is provided for out-of-bounds checks. THIS METHOD IS THREAD SAFE.
Reimplemented from vtkAbstractImageInterpolator.
|
virtual |
Free the precomputed weights. THIS METHOD IS THREAD SAFE.
Reimplemented from vtkAbstractImageInterpolator.
|
protectedvirtual |
Update the interpolator.
Implements vtkAbstractImageInterpolator.
|
protectedvirtual |
Copy the interpolator.
Implements vtkAbstractImageInterpolator.
|
protectedvirtual |
Get the interpolation functions.
Reimplemented from vtkAbstractImageInterpolator.
|
protectedvirtual |
Get the interpolation functions.
Reimplemented from vtkAbstractImageInterpolator.
|
protectedvirtual |
Get the row interpolation functions.
Reimplemented from vtkAbstractImageInterpolator.
|
protectedvirtual |
Get the row interpolation functions.
Reimplemented from vtkAbstractImageInterpolator.
|
protectedvirtual |
Build the lookup tables used for the interpolation.
|
protectedvirtual |
Free the kernel lookup tables.
|
protected |
Definition at line 238 of file vtkImageSincInterpolator.h.
|
protected |
Definition at line 239 of file vtkImageSincInterpolator.h.
|
protected |
Definition at line 240 of file vtkImageSincInterpolator.h.
|
protected |
Definition at line 241 of file vtkImageSincInterpolator.h.
|
protected |
Definition at line 242 of file vtkImageSincInterpolator.h.
|
protected |
Definition at line 243 of file vtkImageSincInterpolator.h.
|
protected |
Definition at line 244 of file vtkImageSincInterpolator.h.
|
protected |
Definition at line 245 of file vtkImageSincInterpolator.h.
|
protected |
Definition at line 246 of file vtkImageSincInterpolator.h.
|
protected |
Definition at line 247 of file vtkImageSincInterpolator.h.