VTK  9.1.0
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=========================================================================*/
53#ifndef vtkTupleInterpolator_h
54#define vtkTupleInterpolator_h
55
56#include "vtkObject.h"
57#include "vtkRenderingCoreModule.h" // For export macro
58
59class vtkSpline;
61
62class VTKRENDERINGCORE_EXPORT vtkTupleInterpolator : public vtkObject
63{
64public:
66 void PrintSelf(ostream& os, vtkIndent indent) override;
67
72
74
78 void SetNumberOfComponents(int numComp);
79 vtkGetMacro(NumberOfComponents, int);
81
87
89
95 double GetMinimumT();
96 double GetMaximumT();
98
103
110 void AddTuple(double t, double tuple[]);
111
116 void RemoveTuple(double t);
117
124 void InterpolateTuple(double t, double tuple[]);
125
129 enum
130 {
131 INTERPOLATION_TYPE_LINEAR = 0,
132 INTERPOLATION_TYPE_SPLINE
133 };
134
136
147 vtkGetMacro(InterpolationType, int);
148 void SetInterpolationTypeToLinear() { this->SetInterpolationType(INTERPOLATION_TYPE_LINEAR); }
149 void SetInterpolationTypeToSpline() { this->SetInterpolationType(INTERPOLATION_TYPE_SPLINE); }
151
153
162 vtkGetObjectMacro(InterpolatingSpline, vtkSpline);
164
165protected:
168
169 // The number of components being interpolated
171
172 // Specify the type of interpolation to use
174
175 // This is the default 1D spline to use
177
178 // Internal variables for interpolation functions
182
183private:
185 void operator=(const vtkTupleInterpolator&) = delete;
186};
187
188#endif
a simple class to control print indentation
Definition: vtkIndent.h:43
abstract base class for most VTK objects
Definition: vtkObject.h:63
Defines a 1D piecewise function.
spline abstract class for interpolating splines
Definition: vtkSpline.h:63
interpolate a tuple of arbitrary size
static vtkTupleInterpolator * New()
Instantiate the class.
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).
double GetMaximumT()
Obtain some information about the interpolation range.
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 SetInterpolationTypeToSpline()
Specify which type of function to use for interpolation.
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.
void SetInterpolationTypeToLinear()
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