DESIGN (xvisual) functions


LIBRARY ROUTINE

xvw_create_pseudo - create a pseudo xvobject

LIBRARY CALL

xvobject xvw_create_pseudo(
   xvobject parent,
   char     *name)

INPUT

OUTPUT

none

RETURN VALUE

The pseudocolor object on success, NULL otherwise

DESCRIPTION

The psuedocolor visual object provides a method of changing the colormap of another visual object. It displays the colors associated with the pixel values of the displayed object (as a color palette, colorcell grid, or color wheel). Under the color display is a set of three scrollbars, representing Red, Green, and Blue.

Select pixels for color change from the color palette, colorcell grid, or color wheel. Next, move the thumbs of the three scrollbars underneath to change the red, green, and blue values defining the color in which the selected pixels appear. If desired, specific values for red, green, and blue may be typed directly into the text parameter boxes that appear to the right of the scrollbars. A "Reset" button at the top of the pseudocolor object provides a convenient way to un-select previously selected pixels.

The pixels to be changed are selected from the colorcell grid (or color palette, or color wheel). Pixels may be selected for color change using the following methods. These descriptions assume use of the colorcell grid, but pixel selection for the color palette and color wheel work similarly. Pixels may be selected individually, or in ranges. Note that all selected pixels on the colorcell grid will have their color changed when you set the red, green, and blue values. The "Reset" button un-selects all selected pixels in the colorcell grid.

1) To select a single pixel for color change, click on the color cell representing the desired pixel. The color cell will appear intented and stippled when it is selected. To unselect the pixel, click the mouse button on it again, or use the "Reset" button.

2) To select a range of pixels for color change, click on a pixel at the end of the range to be changed. Holding the button down, move the mouse to the desired end point; the range may be moved back and forth as long as the mouse button is held down. Releasing the mouse button sets the range. Multiple ranges may be selected by repeating this process on previously unselected pixels. Portions of a selected range may be unselected by repeating on previously selected pixels. To unselect the range, repeat the selection process, or use the "Reset" button.

The XVW_COLOR_COLOROBJ attribute is used to specify the data object whose colormap the psuedocolor object will be used to modify.

Note that pseudocolor should not be done on RGB images when the calling application is displayed on an 8-bit screen. This is because a mapping transformation is used in order to convert the RGB image into an 8-bit representation for visual display on an 8-bit screen.

Because of this transformation, pseudocoloring an RGB image on an 8-bit screen will not make sense; any changes to the colormap made via thresholding would alter the 24-bit to 8-bit transformation (a 3-3-2 RGB map is used), rather than the RGB values themselves, producing an unexpected result.

ADDITIONAL INFORMATION

none

EXAMPLES

none

SIDE EFFECTS

none

RESTRICTIONS

none

MODIFICATION

none

FILES

$DESIGN/objects/library/xvisual/src/Pseudo.c

SEE ALSO

xvisual(3)

COPYRIGHT

Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.