set_grey ( : : GreyValues : )

Definition of greyvalues for region output.

set_grey defines the greyvalues for region output. Greyvalues are defined as the range of the color lookup table that is used for greyvalue output with disp_image in conjunction with set_paint(::'grey':). These entries can be modified by set_lut. So a 'greyvalue' is the color in which a pixel with the same value is displayed (not necessarily really gray). In general, when changing the color lookup table with set_lut, the colors of the displayed image will change too.

If a greyvalue is needed as a color for image output (i.e. no color changes with set_lut are possible), it can be set with set_color(::'grey':).

If only a single greyvalue is passed, all output will take place in that greyvalue. If a tuple of greycalues is passed, all output will take place in greyvalues modulo the number of tuple elements. In the example below, the first circle is displayed with greyvalue 100, the second with 200 and the third with 100 again. Every output procedure starts with the first greyvalue. Note, that the number of output greyvalues depends on the number of objects that are displayed in one procedure call. If only single objects are displayed, they always appear in the first greyvalue, even if the consist of more than one connected components.

When the procedures set_grey, set_color, set_rgb, set_hsi are called, the overwrite the existing values. If not all greyvalues are displayable on the output device, the number range of GreyValues (0..255) is dithered to the range of displayable greyvalues. In any case 0 is displayed as black and 255 as white. The displayable greyvalues can be queried with the procedure query_grey. Furthermore, the number of actually displayed greyvalues can be changed with set_system(::'num_grey_*',...:). This must be done before opening the first window. With set_check(::'~color':) error messages can be suppressed if a greyvalue can't be displayed on the screen. In that case, a similar greyvalue is displayed.


Parameters

GreyValues (input_control)
integer(-array) -> integer
greyvalues for region output.
Default value: 255
Suggested values: 0, 1, 2, 10, 16, 32, 64, 100, 120, 128, 250, 251, 252, 253, 254, 255
Range of values: 0 <= GreyValues <= 255


Example
set_grey(::[100,200]:) >
disp_circle(::[100,200,300],[200,300,100],[100,100,100]:).

Result

set_grey returns TRUE, if GreyValues is displayable and a window is active. Otherwise an exception is raised.


Possible Successors

disp_region


See also

get_pixel, set_color



Copyright © 1996-1997 MVTec Software GmbH