43 #ifndef vtkPiecewiseFunction_h
44 #define vtkPiecewiseFunction_h
46 #include "vtkCommonDataModelModule.h"
49 class vtkPiecewiseFunctionInternals;
78 int AddPoint(
double x,
double y);
79 int AddPoint(
double x,
double y,
double midpoint,
double sharpness);
86 bool RemovePointByIndex(
size_t id);
92 int RemovePoint(
double x);
98 int RemovePoint(
double x,
double y);
103 void RemoveAllPoints();
110 void AddSegment(
double x1,
double y1,
double x2,
double y2);
116 double GetValue(
double x);
125 int GetNodeValue(
int index,
double val[4]);
126 int SetNodeValue(
int index,
double val[4]);
137 double* GetDataPointer();
138 void FillFromDataPointer(
int,
double*);
145 vtkGetVector2Macro(
Range,
double);
153 int AdjustRange(
double range[2]);
163 double x1,
double x2,
int size,
float* table,
int stride = 1,
int logIncrements = 0);
165 double x1,
double x2,
int size,
double* table,
int stride = 1,
int logIncrements = 0);
174 void BuildFunctionFromTable(
double x1,
double x2,
int size,
double* table,
int stride = 1);
195 vtkSetMacro(UseLogScale,
bool);
196 vtkGetMacro(UseLogScale,
bool);
197 vtkBooleanMacro(UseLogScale,
bool);
208 const char* GetType();
214 double GetFirstNonZeroValue();
238 vtkBooleanMacro(AllowDuplicateScalars,
vtkTypeBool);
245 int EstimateMinNumberOfSamples(
double const& x1,
double const& x2);
256 void SortAndUpdateRange();
266 double FindMinimumXDistance();
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.
void UpdateRange(A &min0, A &max0, const A &value, typename std::enable_if<!std::is_floating_point< A >::value >::type *=0)
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
general representation of visualization data
vtkPiecewiseFunctionInternals * Internal
virtual void DeepCopy(vtkDataObject *src)
Shallow and Deep copy.
virtual void ShallowCopy(vtkDataObject *src)
Shallow and Deep copy.