cloudViewer.utility.ccScalarField#

class cloudViewer.utility.ccScalarField#

A scalar field associated to display-related parameters.

static Is_Valid_Value(value: SupportsFloat) bool#

Returns whether a scalar value is valid or not.

static Nan() float#

Returns the specific NaN value

__init__(self: cloudViewer.utility.ccScalarField, name: str = 'ScalarField') None#

Simplified constructor

add_element(self, value)#

Adds element.

Parameters:

value (SupportsFloat) –

Returns:

None

always_show_zero(self, arg0)#

Sets whether 0 should always appear in associated color ramp or not.

Parameters:

arg0 (bool) –

Returns:

None

are_nan_shown_in_grey(self)#

Returns whether NaN values are displayed in gray or hidden.

Returns:

bool

compute_mean_variance(self)#

Computes the mean value (and optionally the variance value) of the scalar field.

Returns:

tuple[float, float]

compute_min_max(self)#

Determines the min and max values

Returns:

None

current_size(self)#

Returns current size.

Returns:

int

display_range(self)#

Access to the range of displayed values.

Returns:

cloudViewer.utility.Range

fill(self, fill_value=0)#

Returns the maximum value.

Parameters:

fill_value (SupportsFloat, optional, default=0) –

Returns:

None

from_file(self, filename, data_version, flags)#

Loads data from binary stream

Parameters:
Returns:

bool

get_color(self, value)#

Returns the color corresponding to a given value (wrt to the current display parameters).

Parameters:

value (SupportsFloat) –

Returns:

typing.Annotated[numpy.typing.NDArray[numpy.float64], “[3, 1]”]

get_color_by_index(self, index)#

Shortcut to getColor.

Parameters:

index (SupportsInt) –

Returns:

typing.Annotated[numpy.typing.NDArray[numpy.float64], “[3, 1]”]

get_color_ramp_steps(self)#

Returns number of color ramp steps.

Returns:

int

get_global_shift(self)#

Returns the global shift (if any).

Returns:

float

Returns the current link count.

Returns:

int

get_max(self)#

Returns the maximum value.

Returns:

float

get_min(self)#

Returns the minimum value.

Returns:

float

get_modification_flag(self)#

Returns modification flag state.

Returns:

bool

get_name(self)#

Returns scalar field name.

Returns:

str

get_value(*args, **kwargs)#

Overloaded function.

  1. get_value(self, index)

    Gets value.

Parameters:

index (SupportsInt) –

Returns:

float

  1. get_value(self, index)

    Gets value(const version).

Parameters:

index (SupportsInt) –

Returns:

float

import_parameters_from(self, source)#

Imports the parameters from another scalar field

Parameters:

source (cloudViewer.utility.ccScalarField) –

Returns:

None

invalid_value(self, index)#

Sets the value as ‘invalid’ (i.e. NAN_VALUE).

Parameters:

index (SupportsInt) –

Returns:

None

is_serializable(self)#

Returns whether object is serializable of not.

Returns:

bool

is_zero_always_shown(self)#

Returns whether 0 should always appear in associated color ramp or not.

Returns:

bool

Increase counter.

Returns:

None

log_saturation_range(self)#

Access to the range of log scale saturation values.

Returns:

cloudViewer.utility.Range

log_scale(self)#

Returns whether scalar field is logarithmic or not.

Returns:

bool

may_have_hidden_values(self)#

Returns whether the scalar field in its current configuration MAY have ‘hidden’ values or not.

Returns:

bool

minimum_file_version(self: cloudViewer.utility.ccScalarField) int#

Returns the minimum file version required to save this object

release(self)#

Decrease counter and deletes object when 0.

Returns:

None

reserve(self, count)#

Reserves memory (no exception thrown).

Parameters:

count (SupportsInt) –

Returns:

bool

resize(self, count, is_fill=False, value=0)#

Resizes memory (no exception thrown).

Parameters:
Returns:

bool

saturation_range(self)#

Access to the range of saturation values.

Returns:

cloudViewer.utility.Range

set_color_ramp_steps(self, arg0)#

Sets number of color ramp steps used for display.

Parameters:

arg0 (SupportsInt) –

Returns:

None

set_global_shift(self, arg0)#

Sets the global shift.

Parameters:

arg0 (SupportsFloat) –

Returns:

None

set_log_scale(self, arg0)#

Sets whether scale is logarithmic or not.

Parameters:

arg0 (bool) –

Returns:

None

set_max_displayed(self, value)#

Sets the maximum displayed value.

Parameters:

value (SupportsFloat) –

Returns:

None

set_min_displayed(self, value)#

Sets the minimum displayed value.

Parameters:

value (SupportsFloat) –

Returns:

None

set_modification_flag(self, state)#

Sets modification flag state.

Parameters:

state (bool) –

Returns:

None

set_name(self, name)#

Sets scalar field name.

Parameters:

name (str) –

Returns:

None

set_saturation_start(self, value)#

Sets the value at which to start color gradient.

Parameters:

value (SupportsFloat) –

Returns:

None

set_saturation_stop(self, value)#

Sets the value at which to stop color gradient.

Parameters:

value (SupportsFloat) –

Returns:

None

set_symmetrical_scale(self, arg0)#

Sets whether the color scale should be symmetrical or not.

Parameters:

arg0 (bool) –

Returns:

None

set_value(self, index, value)#

Sets value.

Parameters:
Returns:

None

show_nan_in_grey(self, arg0)#

Sets whether NaN/out of displayed range values should be displayed in gray or hidden.

Parameters:

arg0 (bool) –

Returns:

None

swap(self, i1, i2)#

Swaps scalar value.

Parameters:
Returns:

None

symmetrical_scale(self)#

Returns whether the color scale s symmetrical or not.

Returns:

bool

to_file(self, filename, data_version)#

Saves data to binary stream

Parameters:
Returns:

bool