VTK
|
perform sinc interpolation on images More...
#include <vtkImageSincInterpolator.h>
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.
Reimplemented from vtkAbstractImageInterpolator.
Definition at line 60 of file vtkImageSincInterpolator.h.
vtkImageSincInterpolator::vtkImageSincInterpolator | ( | ) | [protected] |
vtkImageSincInterpolator::~vtkImageSincInterpolator | ( | ) | [protected] |
static vtkImageSincInterpolator* vtkImageSincInterpolator::New | ( | ) | [static] |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
Reimplemented from vtkObject.
static int vtkImageSincInterpolator::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 vtkAbstractImageInterpolator.
virtual int vtkImageSincInterpolator::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 vtkAbstractImageInterpolator.
static vtkImageSincInterpolator* vtkImageSincInterpolator::SafeDownCast | ( | vtkObjectBase * | o | ) | [static] |
Reimplemented from vtkAbstractImageInterpolator.
virtual vtkObjectBase* vtkImageSincInterpolator::NewInstanceInternal | ( | ) | const [protected, virtual] |
Reimplemented from vtkAbstractImageInterpolator.
Reimplemented from vtkAbstractImageInterpolator.
virtual void vtkImageSincInterpolator::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 vtkAbstractImageInterpolator.
virtual void vtkImageSincInterpolator::SetWindowFunction | ( | int | mode | ) | [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::SetWindowFunctionToLanczos | ( | ) | [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.
void vtkImageSincInterpolator::SetWindowFunctionToKaiser | ( | ) | [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.
void vtkImageSincInterpolator::SetWindowFunctionToCosine | ( | ) | [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.
void vtkImageSincInterpolator::SetWindowFunctionToHann | ( | ) | [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.
void vtkImageSincInterpolator::SetWindowFunctionToHamming | ( | ) | [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.
void vtkImageSincInterpolator::SetWindowFunctionToBlackman | ( | ) | [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.
void vtkImageSincInterpolator::SetWindowFunctionToBlackmanHarris3 | ( | ) | [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.
void vtkImageSincInterpolator::SetWindowFunctionToBlackmanHarris4 | ( | ) | [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.
void vtkImageSincInterpolator::SetWindowFunctionToNuttall | ( | ) | [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.
void vtkImageSincInterpolator::SetWindowFunctionToBlackmanNuttall3 | ( | ) | [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.
void vtkImageSincInterpolator::SetWindowFunctionToBlackmanNuttall4 | ( | ) | [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.
int vtkImageSincInterpolator::GetWindowFunction | ( | ) | [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 const char* vtkImageSincInterpolator::GetWindowFunctionAsString | ( | ) | [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.
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.
int vtkImageSincInterpolator::GetWindowHalfWidth | ( | ) | [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.
void vtkImageSincInterpolator::UseWindowParameterOn | ( | ) | [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.
void vtkImageSincInterpolator::UseWindowParameterOff | ( | ) | [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.
int vtkImageSincInterpolator::GetUseWindowParameter | ( | ) | [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 a window function parameter. The way this parameter is used will depend on the window function, for now it is only used by the Kaiser window (which by default uses the value 3*n where n is the window half-width). This parameter will be ignored unless UseWindowParameter is On.
double vtkImageSincInterpolator::GetWindowParameter | ( | ) | [inline] |
Set a window function parameter. The way this parameter is used will depend on the window function, for now it is only used by the Kaiser window (which by default uses the value 3*n where n is the window half-width). This parameter will be ignored unless UseWindowParameter is On.
Definition at line 123 of file vtkImageSincInterpolator.h.
virtual void vtkImageSincInterpolator::ComputeSupportSize | ( | const double | matrix[16], |
int | support[3] | ||
) | [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.
void vtkImageSincInterpolator::SetBlurFactors | ( | double | x, |
double | y, | ||
double | z | ||
) |
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.
void vtkImageSincInterpolator::SetBlurFactors | ( | const double | f[3] | ) | [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 141 of file vtkImageSincInterpolator.h.
void vtkImageSincInterpolator::GetBlurFactors | ( | double | f[3] | ) | [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 143 of file vtkImageSincInterpolator.h.
double* vtkImageSincInterpolator::GetBlurFactors | ( | ) | [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 147 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.
void vtkImageSincInterpolator::AntialiasingOn | ( | ) | [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 160 of file vtkImageSincInterpolator.h.
void vtkImageSincInterpolator::AntialiasingOff | ( | ) | [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.
int vtkImageSincInterpolator::GetAntialiasing | ( | ) | [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.
void vtkImageSincInterpolator::SetRenormalization | ( | int | antialiasing | ) |
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.
void vtkImageSincInterpolator::RenormalizationOn | ( | ) | [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 173 of file vtkImageSincInterpolator.h.
void vtkImageSincInterpolator::RenormalizationOff | ( | ) | [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.
int vtkImageSincInterpolator::GetRenormalization | ( | ) | [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.
virtual bool vtkImageSincInterpolator::IsSeparable | ( | ) | [virtual] |
Returns true if the interpolator supports weight precomputation. This will always return true for this interpolator.
Implements vtkAbstractImageInterpolator.
virtual void vtkImageSincInterpolator::PrecomputeWeightsForExtent | ( | const double | matrix[16], |
const int | extent[6], | ||
int | newExtent[6], | ||
vtkInterpolationWeights *& | weights | ||
) | [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 void vtkImageSincInterpolator::PrecomputeWeightsForExtent | ( | const float | matrix[16], |
const int | extent[6], | ||
int | newExtent[6], | ||
vtkInterpolationWeights *& | weights | ||
) | [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 void vtkImageSincInterpolator::FreePrecomputedWeights | ( | vtkInterpolationWeights *& | weights | ) | [virtual] |
Free the precomputed weights. THIS METHOD IS THREAD SAFE.
Reimplemented from vtkAbstractImageInterpolator.
virtual void vtkImageSincInterpolator::InternalUpdate | ( | ) | [protected, virtual] |
Update the interpolator.
Implements vtkAbstractImageInterpolator.
virtual void vtkImageSincInterpolator::InternalDeepCopy | ( | vtkAbstractImageInterpolator * | obj | ) | [protected, virtual] |
Copy the interpolator.
Implements vtkAbstractImageInterpolator.
virtual void vtkImageSincInterpolator::GetInterpolationFunc | ( | void(**)(vtkInterpolationInfo *, const double[3], double *) | doublefunc | ) | [protected, virtual] |
Get the interpolation functions.
Reimplemented from vtkAbstractImageInterpolator.
virtual void vtkImageSincInterpolator::GetInterpolationFunc | ( | void(**)(vtkInterpolationInfo *, const float[3], float *) | floatfunc | ) | [protected, virtual] |
Get the interpolation functions.
Reimplemented from vtkAbstractImageInterpolator.
virtual void vtkImageSincInterpolator::GetRowInterpolationFunc | ( | void(**)(vtkInterpolationWeights *, int, int, int, double *, int) | doublefunc | ) | [protected, virtual] |
Get the row interpolation functions.
Reimplemented from vtkAbstractImageInterpolator.
virtual void vtkImageSincInterpolator::GetRowInterpolationFunc | ( | void(**)(vtkInterpolationWeights *, int, int, int, float *, int) | floatfunc | ) | [protected, virtual] |
Get the row interpolation functions.
Reimplemented from vtkAbstractImageInterpolator.
virtual void vtkImageSincInterpolator::BuildKernelLookupTable | ( | ) | [protected, virtual] |
Build the lookup tables used for the interpolation.
virtual void vtkImageSincInterpolator::FreeKernelLookupTable | ( | ) | [protected, virtual] |
Free the kernel lookup tables.
int vtkImageSincInterpolator::WindowFunction [protected] |
Definition at line 237 of file vtkImageSincInterpolator.h.
int vtkImageSincInterpolator::WindowHalfWidth [protected] |
Definition at line 238 of file vtkImageSincInterpolator.h.
float* vtkImageSincInterpolator::KernelLookupTable[3] [protected] |
Definition at line 239 of file vtkImageSincInterpolator.h.
int vtkImageSincInterpolator::KernelSize[3] [protected] |
Definition at line 240 of file vtkImageSincInterpolator.h.
int vtkImageSincInterpolator::Antialiasing [protected] |
Definition at line 241 of file vtkImageSincInterpolator.h.
int vtkImageSincInterpolator::Renormalization [protected] |
Definition at line 242 of file vtkImageSincInterpolator.h.
double vtkImageSincInterpolator::BlurFactors[3] [protected] |
Definition at line 243 of file vtkImageSincInterpolator.h.
double vtkImageSincInterpolator::LastBlurFactors[3] [protected] |
Definition at line 244 of file vtkImageSincInterpolator.h.
double vtkImageSincInterpolator::WindowParameter [protected] |
Definition at line 245 of file vtkImageSincInterpolator.h.
int vtkImageSincInterpolator::UseWindowParameter [protected] |
Definition at line 246 of file vtkImageSincInterpolator.h.