8 #include <pybind11/pybind11.h>
9 #include <pybind11/stl.h>
10 #include <pybind11/stl_bind.h>
14 #include "../../cccorelib/src/wrappers.h"
17 using namespace pybind11::literals;
21 py::class_<ccScalarField, cloudViewer::ScalarField, CCShareableHolder<ccScalarField>>
22 pyScalarField(m,
"ccScalarField");
24 py::class_<ccScalarField::Range>(pyScalarField,
"Range")
36 "resetStartStop"_a =
true)
53 py::return_value_policy::reference_internal)
57 py::return_value_policy::reference_internal)
87 const std::vector<unsigned> bins = hist;
void define_ccScalarField(py::module &m)
void setStop(ScalarType value)
bool isInbound(ScalarType val) const
Returns whether a value is inbound or not.
ScalarType maxRange() const
ScalarType inbound(ScalarType val) const
Returns the nearest inbound value.
bool isInRange(ScalarType val) const
Returns whether a value is inside range or not.
void setBounds(ScalarType minVal, ScalarType maxVal, bool resetStartStop=true)
void setStart(ScalarType value)
A scalar field associated to display-related parameters.
const ccColorScale::Shared & getColorScale() const
Returns associated color scale.
void setSaturationStop(ScalarType val)
Sets the value at which to stop color gradient.
void setColorRampSteps(unsigned steps)
Sets number of color ramp steps used for display.
bool getModificationFlag() const
Returns modification flag state.
void setMinDisplayed(ScalarType val)
Sets the minimum displayed value.
bool logScale() const
Returns whether scalar field is logarithmic or not.
void alwaysShowZero(bool state)
Sets whether 0 should always appear in associated color ramp or not.
void setGlobalShift(double shift)
Sets the global shift.
unsigned getColorRampSteps() const
Returns number of color ramp steps.
void setLogScale(bool state)
Sets whether scale is logarithmic or not.
void setColorScale(ccColorScale::Shared scale)
Sets associated color scale.
double getGlobalShift() const
Returns the global shift (if any)
void setSymmetricalScale(bool state)
Sets whether the color scale should be symmetrical or not.
const Range & saturationRange() const
Access to the range of saturation values.
const Histogram & getHistogram() const
Returns associated histogram values (for display)
void showNaNValuesInGrey(bool state)
const Range & displayRange() const
Access to the range of displayed values.
const ecvColor::Rgb * getColor(ScalarType value) const
void setModificationFlag(bool state)
Sets modification flag state.
bool symmetricalScale() const
Returns whether the color scale s symmetrical or not.
const Range & logSaturationRange() const
Access to the range of log scale saturation values.
void importParametersFrom(const ccScalarField *sf)
Imports the parameters from another scalar field.
bool mayHaveHiddenValues() const
const ecvColor::Rgb * getValueColor(unsigned index) const
Shortcut to getColor.
void setSaturationStart(ScalarType val)
Sets the value at which to start color gradient.
void setMaxDisplayed(ScalarType val)
Sets the maximum displayed value.
bool areNaNValuesShownInGrey() const
Returns whether NaN values are displayed in gray or hidden.
bool isZeroAlwaysShown() const
Returns whether 0 should always appear in associated color ramp or not.
Simple histogram structure.