VTK  9.2.6
vtkImageInterpolator.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkImageInterpolator.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
33
34#ifndef vtkImageInterpolator_h
35#define vtkImageInterpolator_h
36
38#include "vtkImagingCoreModule.h" // For export macro
39
40class VTKIMAGINGCORE_EXPORT vtkImageInterpolator : public vtkAbstractImageInterpolator
41{
42public:
45 void PrintSelf(ostream& os, vtkIndent indent) override;
46
48
52 virtual void SetInterpolationMode(int mode);
57 virtual const char* GetInterpolationModeAsString();
59
66 void ComputeSupportSize(const double matrix[16], int size[3]) override;
67
72 bool IsSeparable() override;
73
75
84 void PrecomputeWeightsForExtent(const double matrix[16], const int extent[6], int newExtent[6],
85 vtkInterpolationWeights*& weights) override;
86 void PrecomputeWeightsForExtent(const float matrix[16], const int extent[6], int newExtent[6],
87 vtkInterpolationWeights*& weights) override;
89
94
95protected:
98
102 void InternalUpdate() override;
103
108
110
114 void (**doublefunc)(vtkInterpolationInfo*, const double[3], double*)) override;
116 void (**floatfunc)(vtkInterpolationInfo*, const float[3], float*)) override;
118
120
124 void (**doublefunc)(vtkInterpolationWeights*, int, int, int, double*, int)) override;
126 void (**floatfunc)(vtkInterpolationWeights*, int, int, int, float*, int)) override;
128
130
131private:
133 void operator=(const vtkImageInterpolator&) = delete;
134};
135
136#endif
void GetRowInterpolationFunc(void(**doublefunc)(vtkInterpolationWeights *, int, int, int, double *, int)) override
Get the row interpolation functions.
void SetInterpolationModeToCubic()
The interpolation mode for point scalars (default: linear).
virtual const char * GetInterpolationModeAsString()
The interpolation mode for point scalars (default: linear).
void InternalDeepCopy(vtkAbstractImageInterpolator *obj) override
Copy all members.
void GetInterpolationFunc(void(**doublefunc)(vtkInterpolationInfo *, const double[3], double *)) override
Get the interpolation functions.
void SetInterpolationModeToLinear()
The interpolation mode for point scalars (default: linear).
void PrecomputeWeightsForExtent(const float matrix[16], const int extent[6], int newExtent[6], vtkInterpolationWeights *&weights) override
If the data is going to be sampled on a regular grid, then the interpolation weights can be precomput...
bool IsSeparable() override
Returns true if the interpolator supports weight precomputation.
void InternalUpdate() override
Update the interpolator.
int GetInterpolationMode()
The interpolation mode for point scalars (default: linear).
static vtkImageInterpolator * New()
virtual void SetInterpolationMode(int mode)
The interpolation mode for point scalars (default: linear).
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void FreePrecomputedWeights(vtkInterpolationWeights *&weights) override
Free the precomputed weights.
~vtkImageInterpolator() override
void PrecomputeWeightsForExtent(const double matrix[16], const int extent[6], int newExtent[6], vtkInterpolationWeights *&weights) override
If the data is going to be sampled on a regular grid, then the interpolation weights can be precomput...
void GetRowInterpolationFunc(void(**floatfunc)(vtkInterpolationWeights *, int, int, int, float *, int)) override
Get the row interpolation functions.
void SetInterpolationModeToNearest()
The interpolation mode for point scalars (default: linear).
void GetInterpolationFunc(void(**floatfunc)(vtkInterpolationInfo *, const float[3], float *)) override
Get the interpolation functions.
void ComputeSupportSize(const double matrix[16], int size[3]) override
Get the support size for use in computing update extents.
a simple class to control print indentation
Definition vtkIndent.h:40
#define VTK_CUBIC_INTERPOLATION
#define VTK_NEAREST_INTERPOLATION
#define VTK_LINEAR_INTERPOLATION