VTK
vtkTupleInterpolator.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkTupleInterpolator.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 =========================================================================*/
43 #ifndef __vtkTupleInterpolator_h
44 #define __vtkTupleInterpolator_h
45 
46 #include "vtkObject.h"
47 
48 class vtkSpline;
50 
51 
53 {
54 public:
56  void PrintSelf(ostream& os, vtkIndent indent);
57 
59  static vtkTupleInterpolator* New();
60 
62 
64  void SetNumberOfComponents(int numComp);
65  vtkGetMacro(NumberOfComponents,int);
67 
69  int GetNumberOfTuples();
70 
72 
76  double GetMinimumT();
77  double GetMaximumT();
79 
81  void Initialize();
82 
87  void AddTuple(double t, double tuple[]);
88 
91  void RemoveTuple(double t);
92 
97  void InterpolateTuple(double t, double tuple[]);
98 
99 //BTX
101 
102  enum {INTERPOLATION_TYPE_LINEAR=0,
103  INTERPOLATION_TYPE_SPLINE
104  };
105 //ETX
107 
109 
117  void SetInterpolationType(int type);
118  vtkGetMacro(InterpolationType,int);
120  {this->SetInterpolationType(INTERPOLATION_TYPE_LINEAR);}
122  {this->SetInterpolationType(INTERPOLATION_TYPE_SPLINE);}
124 
126 
132  void SetInterpolatingSpline(vtkSpline*);
133  vtkGetObjectMacro(InterpolatingSpline,vtkSpline);
135 
136 protected:
138  virtual ~vtkTupleInterpolator();
139 
140  // The number of components being interpolated
142 
143  // Specify the type of interpolation to use
145 
146  // This is the default 1D spline to use
148 
149  // Internal variables for interpolation functions
150  void InitializeInterpolation();
153 
154 
155 private:
156  vtkTupleInterpolator(const vtkTupleInterpolator&); // Not implemented.
157  void operator=(const vtkTupleInterpolator&); // Not implemented.
158 
159 };
160 
161 #endif