43 #ifndef vtkPiecewiseFunction_h
44 #define vtkPiecewiseFunction_h
46 #include "vtkCommonDataModelModule.h"
49 class vtkPiecewiseFunctionInternals;
78 int AddPoint(
double x,
double y,
double midpoint,
double sharpness );
93 void AddSegment(
double x1,
double y1,
double x2,
double y2 );
128 vtkGetVector2Macro( Range,
double );
143 void GetTable(
double x1,
double x2,
int size,
float *table,
int stride=1 );
144 void GetTable(
double x1,
double x2,
int size,
double *table,
int stride=1 );
154 double *table,
int stride=1 );
166 vtkGetMacro( Clamping,
int );
207 vtkGetMacro(AllowDuplicateScalars,
int);
215 int EstimateMinNumberOfSamples(
double const & x1,
double const & x2);
224 void SortAndUpdateRange();
231 double FindMinimumXDistance();
234 vtkPiecewiseFunctionInternals *Internal;
248 int AllowDuplicateScalars;
general representation of visualization data
a simple class to control print indentation
Defines a 1D piecewise function.
int SetNodeValue(int index, double val[4])
int AdjustRange(double range[2])
Remove all points out of the new range, and make sure there is a point at each end of that range.
double GetValue(double x)
Returns the value of the function at the specified location using the specified interpolation.
int AddPoint(double x, double y, double midpoint, double sharpness)
int RemovePoint(double x)
double * GetDataPointer()
Returns a pointer to the data stored in the table.
int AddPoint(double x, double y)
Add/Remove points to/from the function.
double GetFirstNonZeroValue()
Returns the first point location which precedes a non-zero segment of the function.
void FillFromDataPointer(int, double *)
void BuildFunctionFromTable(double x1, double x2, int size, double *table, int stride=1)
Constructs a piecewise function from a table.
int GetSize()
Get the number of points used to specify the function.
void Initialize() override
Clears out the current function.
void RemoveAllPoints()
Removes all points from the function.
void DeepCopy(vtkDataObject *f) override
static vtkPiecewiseFunction * New()
void GetTable(double x1, double x2, int size, float *table, int stride=1)
Fills in an array of function values evaluated at regular intervals.
const char * GetType()
Return the type of function: Function Types: 0 : Constant (No change in slope between end points) 1 :...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void AddSegment(double x1, double y1, double x2, double y2)
Add a line segment to the function.
void GetTable(double x1, double x2, int size, double *table, int stride=1)
int GetNodeValue(int index, double val[4])
For the node specified by index, set/get the location (X), value (Y), midpoint, and sharpness values ...
int GetDataObjectType() override
Return what type of dataset this is.
void ShallowCopy(vtkDataObject *f) override
Shallow and Deep copy.
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
#define VTK_PIECEWISE_FUNCTION