 |
VTK
9.0.1
|
Go to the documentation of this file.
37 #ifndef vtkPiecewiseFunction_h
38 #define vtkPiecewiseFunction_h
40 #include "vtkCommonDataModelModule.h"
43 class vtkPiecewiseFunctionInternals;
72 int AddPoint(
double x,
double y,
double midpoint,
double sharpness);
87 void AddSegment(
double x1,
double y1,
double x2,
double y2);
140 double x1,
double x2,
int size,
float* table,
int stride = 1,
int logIncrements = 0);
142 double x1,
double x2,
int size,
double* table,
int stride = 1,
int logIncrements = 0);
172 vtkSetMacro(UseLogScale,
bool);
173 vtkGetMacro(UseLogScale,
bool);
174 vtkBooleanMacro(UseLogScale,
bool);
auto Range(IterablePtr iterable, Options &&... opts) -> typename detail::IterableTraits< typename detail::StripPointers< IterablePtr >::type >::RangeType
Generate an iterable STL proxy object for a VTK container.
void BuildFunctionFromTable(double x1, double x2, int size, double *table, int stride=1)
Constructs a piecewise function from a table.
int RemovePoint(double x)
static vtkPiecewiseFunction * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
int GetNodeValue(int index, double val[4])
For the node specified by index, set/get the location (X), value (Y), midpoint, and sharpness values ...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void Initialize() override
Clears out the current function.
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.
~vtkPiecewiseFunction() override
void GetTable(double x1, double x2, int size, double *table, int stride=1, int logIncrements=0)
void FillFromDataPointer(int, double *)
void SortAndUpdateRange()
int AddPoint(double x, double y, double midpoint, double sharpness)
int EstimateMinNumberOfSamples(double const &x1, double const &x2)
Estimates the minimum size of a table such that it would correctly sample this function.
double * GetDataPointer()
Returns a pointer to the data stored in the table.
vtkPiecewiseFunctionInternals * Internal
const char * GetType()
Return the type of function: Function Types: 0 : Constant (No change in slope between end points) 1 :...
static vtkPiecewiseFunction * New()
void GetTable(double x1, double x2, int size, float *table, int stride=1, int logIncrements=0)
Fills in an array of function values evaluated at regular intervals.
a simple class to control print indentation
double GetFirstNonZeroValue()
Returns the first point location which precedes a non-zero segment of the function.
int SetNodeValue(int index, double val[4])
vtkTypeBool AllowDuplicateScalars
Defines a 1D piecewise function.
static vtkPiecewiseFunction * GetData(vtkInformationVector *v, int i=0)
int GetSize()
Get the number of points used to specify the function.
double FindMinimumXDistance()
Traverses the nodes to find the minimum distance.
int AddPoint(double x, double y)
Add/Remove points to/from the function.
int GetDataObjectType() override
Return what type of dataset this is.
void DeepCopy(vtkDataObject *f) override
double GetValue(double x)
Returns the value of the function at the specified location using the specified interpolation.
general representation of visualization data
void ShallowCopy(vtkDataObject *f) override
Shallow and Deep copy.
void RemoveAllPoints()
Removes all points from the function.
#define VTK_PIECEWISE_FUNCTION
void AddSegment(double x1, double y1, double x2, double y2)
Add a line segment to the function.