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 =========================================================================*/
44 #ifndef vtkTupleInterpolator_h
45 #define vtkTupleInterpolator_h
46 
47 #include "vtkRenderingCoreModule.h" // For export macro
48 #include "vtkObject.h"
49 
50 class vtkSpline;
52 
53 
54 class VTKRENDERINGCORE_EXPORT vtkTupleInterpolator : public vtkObject
55 {
56 public:
58  void PrintSelf(ostream& os, vtkIndent indent) override;
59 
63  static vtkTupleInterpolator* New();
64 
66 
70  void SetNumberOfComponents(int numComp);
71  vtkGetMacro(NumberOfComponents,int);
73 
78  int GetNumberOfTuples();
79 
81 
87  double GetMinimumT();
88  double GetMaximumT();
90 
94  void Initialize();
95 
102  void AddTuple(double t, double tuple[]);
103 
108  void RemoveTuple(double t);
109 
116  void InterpolateTuple(double t, double tuple[]);
117 
121  enum {INTERPOLATION_TYPE_LINEAR=0,
122  INTERPOLATION_TYPE_SPLINE
123  };
124 
126 
136  void SetInterpolationType(int type);
137  vtkGetMacro(InterpolationType,int);
139  {this->SetInterpolationType(INTERPOLATION_TYPE_LINEAR);}
141  {this->SetInterpolationType(INTERPOLATION_TYPE_SPLINE);}
143 
145 
153  void SetInterpolatingSpline(vtkSpline*);
154  vtkGetObjectMacro(InterpolatingSpline,vtkSpline);
156 
157 protected:
159  ~vtkTupleInterpolator() override;
160 
161  // The number of components being interpolated
163 
164  // Specify the type of interpolation to use
166 
167  // This is the default 1D spline to use
169 
170  // Internal variables for interpolation functions
171  void InitializeInterpolation();
174 
175 
176 private:
178  void operator=(const vtkTupleInterpolator&) = delete;
179 
180 };
181 
182 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:59
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Defines a 1D piecewise function.
interpolate a tuple of arbitrary size
void SetInterpolationTypeToSpline()
Specify which type of function to use for interpolation.
a simple class to control print indentation
Definition: vtkIndent.h:39
void SetInterpolationTypeToLinear()
Specify which type of function to use for interpolation.
spline abstract class for interpolating splines
Definition: vtkSpline.h:62
vtkPiecewiseFunction ** Linear
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...