31 #ifndef vtkPiecewiseFunction_h
32 #define vtkPiecewiseFunction_h
34 #include "vtkCommonDataModelModule.h"
37 VTK_ABI_NAMESPACE_BEGIN
38 class vtkPiecewiseFunctionInternals;
53 INTERPOLATION_SEARCH = 1,
74 int AddPoint(
double x,
double y);
75 int AddPoint(
double x,
double y,
double midpoint,
double sharpness);
82 bool RemovePointByIndex(
size_t id);
88 int RemovePoint(
double x);
94 int RemovePoint(
double x,
double y);
99 void RemoveAllPoints();
106 void AddSegment(
double x1,
double y1,
double x2,
double y2);
112 double GetValue(
double x);
121 int GetNodeValue(
int index,
double val[4]);
122 int SetNodeValue(
int index,
double val[4]);
133 double* GetDataPointer();
134 void FillFromDataPointer(
int,
double*);
141 vtkGetVector2Macro(
Range,
double);
149 int AdjustRange(
double range[2]);
160 void GetTable(
double x1,
double x2,
int size,
float* table,
int stride = 1,
int logIncrements = 0,
161 double epsilon = 1e-5);
162 void GetTable(
double x1,
double x2,
int size,
double* table,
int stride = 1,
163 int logIncrements = 0,
double epsilon = 1e-5);
172 void BuildFunctionFromTable(
double x1,
double x2,
int size,
double* table,
int stride = 1);
193 vtkSetMacro(UseLogScale,
bool);
194 vtkGetMacro(UseLogScale,
bool);
195 vtkBooleanMacro(UseLogScale,
bool);
206 const char* GetType();
212 double GetFirstNonZeroValue();
236 vtkBooleanMacro(AllowDuplicateScalars,
vtkTypeBool);
243 int EstimateMinNumberOfSamples(
double const& x1,
double const& x2);
250 void UpdateSearchMethod(
double epsilon = 1e-12,
double thresh = 1e-4);
259 int GetAutomaticSearchMethod();
260 void SetUseCustomSearchMethod(
bool use);
261 void SetCustomSearchMethod(
int type);
262 int GetCustomSearchMethod();
276 void SortAndUpdateRange(
bool updateSearchMethod =
true);
286 double FindMinimumXDistance();
312 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()
#define VTK_PIECEWISE_FUNCTION
Defines a 1D piecewise function.
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.
int GetDataObjectType() override
Return what type of dataset this is.
a simple class to control print indentation
vtkTypeBool AllowDuplicateScalars
void UpdateRange(A &min0, A &max0, const A &value, typename std::enable_if<!std::is_floating_point< A >::value >::type *=nullptr)
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.