FLDFget_cell_data_minmax
FLDFget_cell_data_minmax_total
FLDFset_cell_data_minmax
FLDFcopy_cell_minmax
Synopsis
get/set/copy the min and max data values of a specified cell data component
INTEGER FLDFget_cell_data_minmax (cell_set, comp, min, max)
INTEGER cell_set(OIDSIZ)
INTEGER comp
INTEGER min
INTEGER max
INTEGER FLDFget_cell_data_minmax_total (cell_set, comp,min, max)
INTEGER cell_set(OIDSIZ)
INTEGER comp
INTEGER min
INTEGER max
INTEGER FLDFset_cell_data_minmax (cell_set, comp, min, max)
INTEGER cell_set(OIDSIZ)
INTEGER comp
INTEGER min
INTEGER max
INTEGER dtype
INTEGER FLDFcopy_cell_minmax (in_cell_set, out_cell_set, in_comp, out_comp)
INTEGER in_cell_set(OIDSIZ)
INTEGER out_cell_set(OIDSIZ)
INTEGER in_comp
INTEGER out_comp
Description
These routines set, get, and copy the minimum and maximum data values for a specified component of the cell data.
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.
FLDFget_cell_data_minmax returns the values of these functions. If the data in the values array changes, the value of the function automatically changes.
FLDFset_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 FLDFcopy_cell_minmax.
FLDFcopy_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 FLDFreset_cell_minmax routine to "undo" the effect of a FLDFset_cell_data_minmax or FLDFcopy_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.
FLDFset_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 FLDFcopy_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 FLDFcopy_cell_minmax to copy the input field's range to the output field.
Parameters
cell_set
The integer id of a cell_set, such as that produced by the FLDFget_cell_set routine.
comp
An integer that specifies which component's [0-n] min and max to manipulate.
min
max
In FLDFset_cell_data_minmax, an integer representing a pointers to an input variable of unknown type from which the min/max is copied.
In FLDFget_cell_data_minmax, an integer representing a pointers to a variable of unknown type in which the min/max values will be returned. You are responsible for managing this memory.
Note that the an integer representing a pointers are declared "INTEGER ". This is so that any data type that matches the primitive type of the values array can be passed.
dtype
FLDFset_cell_data_minmax only. This sets the data type of the min/max objects. Allowed values are:
Constant
|
Value
|
DTYPE_CHAR |
0 |
DTYPE_BYTE |
1 |
DTYPE_SHORT |
2 |
DTYPE_INTEGER |
3 |
DTYPE_FLOAT |
4 |
DTYPE_DOUBLE |
5 |
DTYPE_UNSET |
DNTYPES+1 |
You should make sure that dtype matches the data type of the values array in this component's Data_Array. FLDFset_cell_data_minmax cannot change a previously set data type.
in_cell_set
out_cell_set
In FLDFcopy_cell_minmax only. Each is the integer of a Cell_Data cell_set array element that contains a cell_data Data_Array.
in_comp
out_comp
FLDFcopy_cell_minmax only. These are INTEGERs that define which Data_Array cell_data component min/max to copy from (in_comp) and to (out_comp).
Note: At present there is no FLDFreset_cell_minmax_vec to "undo" the effect of a FLDFcopy_cell_minmax_vec, returning control of the min and max values to the function.