31 #ifndef vtkPiecewiseFunction_h
32 #define vtkPiecewiseFunction_h
34 #include "vtkCommonDataModelModule.h"
38 VTK_ABI_NAMESPACE_BEGIN
39 class vtkPiecewiseFunctionInternals;
54 INTERPOLATION_SEARCH = 1,
75 int AddPoint(
double x,
double y);
76 int AddPoint(
double x,
double y,
double midpoint,
double sharpness);
83 bool RemovePointByIndex(
size_t id);
89 int RemovePoint(
double x);
95 int RemovePoint(
double x,
double y);
100 void RemoveAllPoints();
107 void AddSegment(
double x1,
double y1,
double x2,
double y2);
113 double GetValue(
double x);
122 int GetNodeValue(
int index,
double val[4]);
123 int SetNodeValue(
int index,
double val[4]);
134 double* GetDataPointer();
135 void FillFromDataPointer(
int,
double*);
142 vtkGetVector2Macro(
Range,
double);
150 int AdjustRange(
double range[2]);
161 void GetTable(
double x1,
double x2,
int size,
float* table,
int stride = 1,
int logIncrements = 0,
162 double epsilon = 1e-5);
163 void GetTable(
double x1,
double x2,
int size,
double* table,
int stride = 1,
164 int logIncrements = 0,
double epsilon = 1e-5);
173 void BuildFunctionFromTable(
double x1,
double x2,
int size,
double* table,
int stride = 1);
194 vtkSetMacro(UseLogScale,
bool);
195 vtkGetMacro(UseLogScale,
bool);
196 vtkBooleanMacro(UseLogScale,
bool);
207 const char* GetType();
213 double GetFirstNonZeroValue();
237 vtkBooleanMacro(AllowDuplicateScalars,
vtkTypeBool);
244 int EstimateMinNumberOfSamples(
double const& x1,
double const& x2);
251 void UpdateSearchMethod(
double epsilon = 1e-12,
double thresh = 1e-4);
260 int GetAutomaticSearchMethod();
261 void SetUseCustomSearchMethod(
bool use);
262 void SetCustomSearchMethod(
int type);
263 int GetCustomSearchMethod();
277 void SortAndUpdateRange(
bool updateSearchMethod =
true);
287 double FindMinimumXDistance();
313 VTK_ABI_NAMESPACE_END
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkDataObject * GetData(vtkInformation *info)
Retrieve an instance of this class from an information object.
static vtkDataObject * New()
Defines a 1D piecewise function.
int GetDataObjectType() VTK_FUTURE_CONST override
Return what type of dataset this is.
virtual void Initialize()
Restore data object to initial state,.
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.
#define VTK_MARSHALMANUAL
a simple class to control print indentation
void UpdateRange(A &min, A &max, const A &value)
Update an existing min - max range with a new prospective value.
vtkTypeBool AllowDuplicateScalars
general representation of visualization data
vtkPiecewiseFunctionInternals * Internal
virtual void DeepCopy(vtkDataObject *src)
The goal of the method is to copy the complete data from src into this object.
virtual void ShallowCopy(vtkDataObject *src)
The goal of the method is to copy the data up to the array pointers only.