FLDFget_node_data_minmax
FLDFset_node_data_minmax
FLDFcopy_node_minmax
FLDFreset_node_minmax


Synopsis

get/set/copy the min and max data values of a specified cell data component


INTEGER FLDFget_node_data_minmax (field, comp, min, max)
INTEGER field(OIDSIZ)
INTEGER comp
INTEGER min
INTEGER max

INTEGER FLDFset_node_data_minmax (field, comp, min, max)
INTEGER field(OIDSIZ)
INTEGER comp
INTEGER min
INTEGER max
INTEGER dtype

INTEGER FLDFcopy_node_minmax (in_field, out_field, in_comp, out_comp)
INTEGER in_field(OIDSIZ)
INTEGER out_field(OIDSIZ)
INTEGER in_comp
INTEGER out_comp

INTEGER FLDFreset_node_minmax (field, comp)
INTEGER field(OIDSIZ)
INTEGER comp

Description

These routines set, get, and copy the minimum and maximum data values for a specified component of the node 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_node_data_minmax returns the values of these functions. If the data in the values array changes, the value of the function automatically changes.

FLDFset_node_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_nodel_minmax.

FLDFcopy_node_minmax is the routine most frequently used in this set. It copies the input field's node_data component min and max to the output field.

Note: At present, there is no FLDFreset_node_minmax routine to "undo" the effect of a FLDFset_node_data_minmax or FLDFcopy_node_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 node datafor 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_node_data_minmax can replace the function definition for min/max with specific values that will remain the constant across the slices.

•      A node 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_node_minmax to copy the input field's range to the output field.

Parameters

field

The integer id of a field.

comp

An integer that specifies which component's [0-n] min and max to manipulate.

min
max

In FLDFset_node_data_minmax, an integer representing a pointers to an input variable of unknown type from which the min/max is copied.

In FLDFget_node_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_node_data_minmax cannot change a previously-set data type.

in_field
out_field

In FLDFcopy_data_minmax only. Each is the integer id of an input and output fields.

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_node_minmax_vec to "undo" the effect of a FLDFcopy_node_minmax_vec, returning control of the min and max values to the function.