clamp


Synopsis

clamp minimum and maximum values of data

Input Ports

in_field

Node_Data

ui_parent

user interface parent object

 

Parameters

data component

UIradioBoxLabel

selects component to clamp

vector component

UIslider

which subcomponent to clamp

Above max value

UItoggle

clamp above max value

Below min value

UItoggle

clamp below min value

Reset min-max

UItoggle

reset data min/max

min value

UIslider

minimum value

max value

UIslider

maximum value

 

Output Ports

out_fld

Node_Data

out_obj

output renderable object

 

Description

clamp transforms the values of the selected field component subcomponent as follows:

If Above max_value is set, any value above max value is set to max value.

If Below min_value is set, any value below min value is set to min value.

Otherwise, the values are not changed.

If Above max_value and Below min_value are on, the output field's selected component values are all in the range of min value <= value <= max value . Null data values are not affected.

Note the difference between clamp and the threshold macro:

threshold sets values outside the range to a specified null value.

clamp sets values outside the range to min value and/or max value.

Input Ports

in_field

The input field must contain a Node_Data object. If a Mesh is present, it is passed along untouched as a reference in the output field. The field's data components can be scalar or vector.

ui_parent

A port to connect to a user interface object that contains the macro's widgets. By default, it is connected to the default user interface object in the application in which the macro is instanced. (This default connection is not drawn.)

Parameters

data component

UIradioBoxLabel. Selects which of the input field's components to clamp. The default is the first (0th) component. If node data labels are present, they are displayed.

vector component

UIslider. If the selected data component is non-scalar, you can pick which subcomponent to clamp. The range is 0 (first subcomponent) to the number of subcomponents. The default is 0.

Above max value

UItoggle. When on, clamps data above the max value. The default is off.

Below min value

UItoggle. When on, clamps data below the min value. The default is on.

Reset min-max

UItoggle. When on, clamp recalculates the data's minimum and maximum values. The default is off.

min value
max value

UIslider. Double precision floating point sliders that set the min and max values. The default is set to the input field component's node data minimum and maximum. The range shown is from the component's node data minimum to its maximum. The double precision value is converted to the data type of the input field before use. Two decimal points of precision are given.

Output Ports

out_fld

The output field contains a new Node_Data object that is the clamped component. If a Mesh was present, the output field contains a reference to that mesh.

out_obj

If a Mesh was present, this is a renderable version of the output field. Otherwise, rendering objects generate an error.

Example

Libraries.Examples.Vizualization.Clamp
examples/clamp.v

File

v/modules.v

See also

Related modules