VTK
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=========================================================================*/
31#ifndef vtkImageInterpolator_h
32#define vtkImageInterpolator_h
33
34#include "vtkImagingCoreModule.h" // For export macro
36
37class VTKIMAGINGCORE_EXPORT vtkImageInterpolator :
39{
40public:
43 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
44
46
50 virtual void SetInterpolationMode(int mode);
52 this->SetInterpolationMode(VTK_NEAREST_INTERPOLATION); }
54 this->SetInterpolationMode(VTK_LINEAR_INTERPOLATION); }
56 this->SetInterpolationMode(VTK_CUBIC_INTERPOLATION); }
57 int GetInterpolationMode() { return this->InterpolationMode; }
58 virtual const char *GetInterpolationModeAsString();
60
67 virtual void ComputeSupportSize(const double matrix[16], int support[3]) VTK_OVERRIDE;
68
73 virtual bool IsSeparable() VTK_OVERRIDE;
74
76
85 virtual void PrecomputeWeightsForExtent(
86 const double matrix[16], const int extent[6], int newExtent[6],
87 vtkInterpolationWeights *&weights) VTK_OVERRIDE;
88 virtual void PrecomputeWeightsForExtent(
89 const float matrix[16], const int extent[6], int newExtent[6],
90 vtkInterpolationWeights *&weights) VTK_OVERRIDE;
92
96 virtual void FreePrecomputedWeights(vtkInterpolationWeights *&weights) VTK_OVERRIDE;
97
98protected:
101
105 virtual void InternalUpdate() VTK_OVERRIDE;
106
110 virtual void InternalDeepCopy(vtkAbstractImageInterpolator *obj) VTK_OVERRIDE;
111
113
116 virtual void GetInterpolationFunc(
117 void (**doublefunc)(
118 vtkInterpolationInfo *, const double [3], double *)) VTK_OVERRIDE;
119 virtual void GetInterpolationFunc(
120 void (**floatfunc)(
121 vtkInterpolationInfo *, const float [3], float *)) VTK_OVERRIDE;
123
125
128 virtual void GetRowInterpolationFunc(
129 void (**doublefunc)(
130 vtkInterpolationWeights *, int, int, int, double *, int)) VTK_OVERRIDE;
131 virtual void GetRowInterpolationFunc(
132 void (**floatfunc)(
133 vtkInterpolationWeights *, int, int, int, float *, int)) VTK_OVERRIDE;
135
136 int InterpolationMode;
137
138private:
139 vtkImageInterpolator(const vtkImageInterpolator&) VTK_DELETE_FUNCTION;
140 void operator=(const vtkImageInterpolator&) VTK_DELETE_FUNCTION;
141};
142
143#endif
interpolate data values from images
interpolate data values from images
virtual const char * GetInterpolationModeAsString()
virtual bool IsSeparable() override
Returns true if the interpolator supports weight precomputation.
virtual void ComputeSupportSize(const double matrix[16], int support[3]) override
Get the support size for use in computing update extents.
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.
a simple class to control print indentation
Definition: vtkIndent.h:40
@ mode
Definition: vtkX3D.h:247
@ extent
Definition: vtkX3D.h:345
#define VTK_CUBIC_INTERPOLATION
#define VTK_NEAREST_INTERPOLATION
#define VTK_LINEAR_INTERPOLATION