![]() |
![]() |
![]() |
![]() |
clamp_cell
Synopsis
clamp minimum and maximum values of cell_data
Input Port
Parameters
Output Port
Description
clamp transforms the cell_data 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
The input field must contain a Cell_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.
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
UIradioBoxLabel. Selects which of the input field's components to clamp. The default is the first (0th) component. If cellcell data labels are present, they are displayed.
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.
UIslider. Double precision floating point sliders that set the min and max values. The default is set to the input field component's cell data minimum and maximum. The range shown is from the component's cell 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 Port
The output field contains a new Cell_Data object that is the clamped component. If a Mesh was present, the output field contains a reference to that mesh.
If a Mesh was present, this is a renderable version of the output field. Otherwise, rendering objects generate an error.
Example
File
See also related modules
![]() |
![]() |
![]() |
![]() |