![]() |
![]() |
![]() |
![]() |
DVthreshold_cell
Synopsis
module DVthreshold_cell { /* sets NULL data for all values below and/or
above min/max threshold level(s) */
Mesh+Cell_Data+Iparam &in { /* input field */
nnodes+req;
xform+nonotify;
};
int+Iparam check_vector; /* which component
will be compared against min_value and max_value */
int+Iparam check_comp; /* which subcomponent
of check_vector will be compared */
int+Iparam thresh_vector; /* which component of
the input field to threshold */
int+Iparam below; /* toggle to turn on lower thresholding */
int+Iparam above; /* toggle to turn on upper thresholding */
float+Iparam min_value; /* lower threshold value */
float+Iparam max_value; /* upper threshold value */
float+Iparam null_value; /* value to set when data
is out of range */
int dim => in.ncell_sets;
group+nonotify out_data[dim] {
int ncells => in.cell_set[index_of(out_data)].ncells;
/* Output always has a single cell data component */
int ncell_data = 1;
Data_Array cell_data[ncell_data] {
nvals => ncells;
};
};
group+nonotify out_sets[dim] {
group &out_set => merge(out_data[index_of(out_sets)],
in.cell_set[index_of(out_sets)]);
};
Cells+Cell_Data+nonotify+write out_cd {
*cell_set[];
ncell_sets => array_size(cell_set);
};
Mesh+OPort2+nonotify &out =>merge(out_cd, in);
method+notify_val+notify_inst upd_threshold<status=1>
= "DVthreshold_cell_update";
};Description
DVthreshold_cell sets the values of a given component of a cell-based data set to the null value if the value of another component (usually the same one) is above or below a given threshold.
Input
int. Selects which component to check. If this component exceeds the threshold(s) at some node, the value of the threshold_component at that node is set to the null data value.
int. If the selected component is a vector, this selects which element of that vector to threshold. If the selected component is scalar, this value is ignored.
float. The value to use in the output as the null value. Select a value for this which does not occur in the input data set
Output
Example
Libraries.Main.Mappers.threshold_cell
File
See also
![]() |
![]() |
![]() |
![]() |