NAME

color_code -- assign colors to scalar values

PROTOTYPE

unitptr color_code( int iDim, unitptr uHost)

ARGUMENTS

int iDim
dimension of input vector
unitptr uHost
host unit

RETURN VALUE:

A pointer to the created unit or NULL in the case of an error.

INTERFACE OF CREATED UNIT:

X_in[iDim]:
(packed input field 0)
Y_in[iNum]:
25 thresholds. Color i is used, when scaled input x >= Yin[i]. If several colors qualify, the color with the largest index wins.
Z_in[2]:
(packed input field 2) scaling interval
in_3[1]:
(packed input field 3) index of background color. -1 = use nearest, 0 = let pass
CTL_in[1]:
(control field)
X_out[iDim]:
(packed output field 0)
Y_out[]:
(packed output field 1)
Z_out[]:
(packed output field 2)
out_3[]:
(packed output field 3)

EXECUTION OF CREATED UNIT:

Computes for each element of input vector a color index according to the color thresholds and the scaling interval at input fields 1 and 2. Values that are outside the scaling interval given at Z_in[2] are replaced by the color (or gray) value given at in_3. If in_3[0]=0, the originial value will remain unchanged, if in_3[0]=-1, they will be replaced by the color of the nearer end of the scaling interval. The computed color values can be displayed with a write_pix unit, which must be in ColorMap mode.

SEE ALSO:

write_pix

FILE

/homes/jontrup/nst5/man/../o.sol2//../foldersrc/nst_pixel.c