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 =========================================================================*/
27 #ifndef vtkImageInterpolator_h
28 #define vtkImageInterpolator_h
29 
30 #include "vtkImagingCoreModule.h" // For export macro
32 
35 {
36 public:
37  static vtkImageInterpolator *New();
39  virtual void PrintSelf(ostream& os, vtkIndent indent);
40 
42 
45  virtual void SetInterpolationMode(int mode);
47  this->SetInterpolationMode(VTK_NEAREST_INTERPOLATION); }
49  this->SetInterpolationMode(VTK_LINEAR_INTERPOLATION); }
51  this->SetInterpolationMode(VTK_CUBIC_INTERPOLATION); }
52  int GetInterpolationMode() { return this->InterpolationMode; }
53  virtual const char *GetInterpolationModeAsString();
55 
61  virtual void ComputeSupportSize(const double matrix[16], int support[3]);
62 
65  virtual bool IsSeparable();
66 
68 
75  virtual void PrecomputeWeightsForExtent(
76  const double matrix[16], const int extent[6], int newExtent[6],
77  vtkInterpolationWeights *&weights);
78  virtual void PrecomputeWeightsForExtent(
79  const float matrix[16], const int extent[6], int newExtent[6],
80  vtkInterpolationWeights *&weights);
82 
84  virtual void FreePrecomputedWeights(vtkInterpolationWeights *&weights);
85 
86 protected:
89 
91  virtual void InternalUpdate();
92 
95 
97 
98  virtual void GetInterpolationFunc(
99  void (**doublefunc)(
100  vtkInterpolationInfo *, const double [3], double *));
101  virtual void GetInterpolationFunc(
102  void (**floatfunc)(
103  vtkInterpolationInfo *, const float [3], float *));
105 
107 
108  virtual void GetRowInterpolationFunc(
109  void (**doublefunc)(
110  vtkInterpolationWeights *, int, int, int, double *, int));
111  virtual void GetRowInterpolationFunc(
112  void (**floatfunc)(
113  vtkInterpolationWeights *, int, int, int, float *, int));
115 
117 
118 private:
119  vtkImageInterpolator(const vtkImageInterpolator&); // Not implemented.
120  void operator=(const vtkImageInterpolator&); // Not implemented.
121 };
122 
123 #endif
interpolate data values from images
#define VTK_LINEAR_INTERPOLATION
virtual void InternalDeepCopy(vtkAbstractImageInterpolator *obj)=0
virtual void InternalUpdate()=0
#define VTK_CUBIC_INTERPOLATION
a simple class to control print indentation
Definition: vtkIndent.h:38
virtual void PrecomputeWeightsForExtent(const double matrix[16], const int extent[6], int checkExtent[6], vtkInterpolationWeights *&weights)
virtual void GetRowInterpolationFunc(void(**doublefunc)(vtkInterpolationWeights *, int, int, int, double *, int))
virtual void GetInterpolationFunc(void(**doublefunc)(vtkInterpolationInfo *, const double[3], double *))
#define VTKIMAGINGCORE_EXPORT
virtual bool IsSeparable()=0
virtual void FreePrecomputedWeights(vtkInterpolationWeights *&weights)
interpolate data values from images
virtual void PrintSelf(ostream &os, vtkIndent indent)
static vtkObject * New()
#define VTK_NEAREST_INTERPOLATION
virtual void ComputeSupportSize(const double matrix[16], int support[3])=0