get/set/copy the min and max data values in a Cell_Data cell_set Data_Array component
int FLDget_cell_data_minmax (
OMobj_id cell_set,
int comp,
char *min,
char *max);
int FLDset_cell_data_minmax (
OMobj_id cell_set,
int comp,
char *min,
char *max,
int dtype);
int FLDcopy_cell_minmax (
OMobj_id in_cell_set,
OMobj_id out_cell_set,
int in_comp,
int out_comp);
These routines set, get, and copy the minimum and maximum data values within one component of a Cell_Data cell_set Data_Array.
By default, the min and max data values are defined as functions:
prim min = cache (min_array (magnitude(values), null_flag, null_value));
prim max = cache (max_array (magnitude(values), null_flag, null_value));
Normally, there is no need to ever actively set or copy these values.
FLDget_cell_data_minmax returns the values of these functions. If the data in the values array changes, the value of the function automatically changes.
FLDset_cell_data_minmax replaces the values produced by the function with the values you want to appear. To continue the effect, the downstream modules must use FLDcopy_cell_minmax.
FLDcopy_node_minmax is the routine most frequently used in this set. It copies the input field's cell_data component min and max to the output field.
Note: At present, there is no FLDreset_cell_minmax routine to "undo" the effect of a FLDset_cell_data_minmax or FLDcopy_cell_minmax, returning control of the min and max values to the function.
Why would you not want min and max to default to the function? There are times when you do not want the min and max data values to change even though the data in the values array has changed. Here are some examples; both relate to the fact that colormap coloring of data in the renderer uses the min and max to scale the colormap to the data range:
Suppose you have time series data, with one invariant set of coordinate data but with new Cell_Data for each time slice. If you let the min/max default to the function value, the colormap coloring will not be constant across an animated series of the time slices. A given red could be.5 in one slice, and -500 in the next.
FLDset_cell_data_minmax can replace the function definition for min/max with specific values that will remain the constant across the slices.
A Cell_Data version of the clamp module, if it existed, could use FLDcopy_node_minmax. Clamp alters the values in the input data by setting all values above and below a specified min and max value to the specified min and max values. Rather than letting the output field's min/max default to the function, it could use FLDcopy_cell_minmax to copy the input field's range to the output field.
OMobj_id in_cell_set
OMobj_id out_cell_set