VTK  9.0.1
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 =========================================================================*/
44 #ifndef vtkTupleInterpolator_h
45 #define vtkTupleInterpolator_h
46 
47 #include "vtkObject.h"
48 #include "vtkRenderingCoreModule.h" // For export macro
49 
50 class vtkSpline;
52 
53 class VTKRENDERINGCORE_EXPORT vtkTupleInterpolator : public vtkObject
54 {
55 public:
57  void PrintSelf(ostream& os, vtkIndent indent) override;
58 
63 
65 
69  void SetNumberOfComponents(int numComp);
70  vtkGetMacro(NumberOfComponents, int);
72 
78 
80 
86  double GetMinimumT();
87  double GetMaximumT();
89 
93  void Initialize();
94 
101  void AddTuple(double t, double tuple[]);
102 
107  void RemoveTuple(double t);
108 
115  void InterpolateTuple(double t, double tuple[]);
116 
120  enum
121  {
122  INTERPOLATION_TYPE_LINEAR = 0,
123  INTERPOLATION_TYPE_SPLINE
124  };
125 
127 
138  vtkGetMacro(InterpolationType, int);
139  void SetInterpolationTypeToLinear() { this->SetInterpolationType(INTERPOLATION_TYPE_LINEAR); }
140  void SetInterpolationTypeToSpline() { this->SetInterpolationType(INTERPOLATION_TYPE_SPLINE); }
142 
144 
153  vtkGetObjectMacro(InterpolatingSpline, vtkSpline);
155 
156 protected:
159 
160  // The number of components being interpolated
162 
163  // Specify the type of interpolation to use
165 
166  // This is the default 1D spline to use
168 
169  // Internal variables for interpolation functions
173 
174 private:
176  void operator=(const vtkTupleInterpolator&) = delete;
177 };
178 
179 #endif
a simple class to control print indentation
Definition: vtkIndent.h:34
abstract base class for most VTK objects
Definition: vtkObject.h:54
Defines a 1D piecewise function.
spline abstract class for interpolating splines
Definition: vtkSpline.h:63
interpolate a tuple of arbitrary size
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void InterpolateTuple(double t, double tuple[])
Interpolate the list of tuples and determine a new tuple (i.e., fill in the tuple provided).
static vtkTupleInterpolator * New()
Instantiate the class.
vtkPiecewiseFunction ** Linear
void SetNumberOfComponents(int numComp)
Specify the number of tuple components to interpolate.
void RemoveTuple(double t)
Delete the tuple at a particular parameter t.
void Initialize()
Reset the class so that it contains no (t,tuple) information.
void AddTuple(double t, double tuple[])
Add another tuple to the list of tuples to be interpolated.
double GetMinimumT()
Obtain some information about the interpolation range.
~vtkTupleInterpolator() override
void InitializeInterpolation()
void SetInterpolatingSpline(vtkSpline *)
If the InterpolationType is set to spline, then this method applies.
void SetInterpolationType(int type)
Specify which type of function to use for interpolation.
int GetNumberOfTuples()
Return the number of tuples in the list of tuples to be interpolated.
@ type
Definition: vtkX3D.h:522