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 
31 
34 {
35 public:
36  static vtkImageInterpolator *New();
38  virtual void PrintSelf(ostream& os, vtkIndent indent);
39 
41 
44  virtual void SetInterpolationMode(int mode);
46  this->SetInterpolationMode(VTK_NEAREST_INTERPOLATION); }
48  this->SetInterpolationMode(VTK_LINEAR_INTERPOLATION); }
50  this->SetInterpolationMode(VTK_CUBIC_INTERPOLATION); }
51  int GetInterpolationMode() { return this->InterpolationMode; }
52  virtual const char *GetInterpolationModeAsString();
54 
60  virtual void ComputeSupportSize(const double matrix[16], int support[3]);
61 
64  virtual bool IsSeparable();
65 
67 
74  virtual void PrecomputeWeightsForExtent(
75  const double matrix[16], const int extent[6], int newExtent[6],
76  vtkInterpolationWeights *&weights);
77  virtual void PrecomputeWeightsForExtent(
78  const float matrix[16], const int extent[6], int newExtent[6],
79  vtkInterpolationWeights *&weights);
81 
83  virtual void FreePrecomputedWeights(vtkInterpolationWeights *&weights);
84 
85 protected:
88 
90  virtual void InternalUpdate();
91 
94 
96 
97  virtual void GetInterpolationFunc(
98  void (**doublefunc)(
99  vtkInterpolationInfo *, const double [3], double *));
100  virtual void GetInterpolationFunc(
101  void (**floatfunc)(
102  vtkInterpolationInfo *, const float [3], float *));
104 
106 
107  virtual void GetRowInterpolationFunc(
108  void (**doublefunc)(
109  vtkInterpolationWeights *, int, int, int, double *, int));
110  virtual void GetRowInterpolationFunc(
111  void (**floatfunc)(
112  vtkInterpolationWeights *, int, int, int, float *, int));
114 
116 
117 private:
118  vtkImageInterpolator(const vtkImageInterpolator&); // Not implemented.
119  void operator=(const vtkImageInterpolator&); // Not implemented.
120 };
121 
122 #endif