X11 uses a color reservation system by which each application reserves a portion of the palette for its own use. Color reservation prevents an application from changing the colors of other applications present on the screen. Typically, SAOimage will be able to reserve as many as 240 color entries in the palette. However, if you (or your window manager) have tailored your X environment by specifying a variety of unusual colors for terminal windows, the clock, and other commonly used applications, there will be fewer unreserved colors in the palette. Conversely, if you are running an SAOimage which has reserved all of the available colors, you may be unable to bring up a new application which expects to be able to grab new colors of its own. A color in the palette is often referred to as a color cell (referring to its reservation) or color level (referring to its index between 0 and 255).
SAOimage uses color cells for more than just rendering the image. The adjustable cursor and the region cursors must also be referenced to colors in the color palette. When the cursor is drawn, pixels in the display are set to the value of the cursor color, overwriting the original image data. If no special care was taken, the image would gradually be erased as the cursor was moved about the display. To avoid this problem, SAOimage uses either of two strategies for tracking the cursor while it is in motion.
With one strategy, while the cursor is moving, or being adjusted, the bits in the displayed image are simply reversed to represent the cursor, and flipped back when the cursor moves away. This doesn't draw the cursor in its correct color, but, in most cases, it produces a visible cursor. When the cursor adjustment ends (the mouse button is released), the entire image is redrawn with the cursor in its new position. This same strategy is used to track the cursor on halftone displays.
The other strategy actually reserves half of the colors just for drawing the cursor. In this alternative strategy, each image color level has a corresponding level in the palette which has the cursor color. The image color levels differ from those of the cursor by one bit, which can be set and unset to represent either the cursor or the image. Drawing the cursor simply involves manipulating the distinguishing bit in display memory. In this mode, cursor can be tracked smoothly in its correct color without erasing the image data. This system is analogous to reserving "planes" of display memory to be treated as overlay planes and image planes (X does not as yet recognize true hardware overlay planes). The advantage of the "plane" reservation strategy is that cursor tracking is visually flawless. The disadvantage is that fewer than half of the color levels are available for rendering the image. Fortunately, it is easy to switch between the two modes (using the "ovlay" button), so one can choose whichever coloring strategy is most appropriate for the current activity.
In true color, each image data value has associated with it an actual color. True color mapping tries to associate colors, as near as possible to the true color, with each pixel in the image display. This is difficult where there are few colors in the palette. There is no support in SAOimage for true-color mapping.
In gray scale, all pixels have the same color, but differ in intensity. Basically, the colors range from black to white, with shades of gray in between. It could also be done with some other color such as shades of red. The lowest data values appear black while the highest appear white (or visa-versa). The image appears as a black-and-white photograph might render it.
In pseudo-color, any color can be assigned to any level, but all pixels with the same value will have the same color. Typically, one might use an analogy with heat, mapping the low values as shades of blue, the middle values in shades of red and the highest values as yellow or white. The idea is to use the colors to highlight differences among the data values. Depending on the levels which best distinguish the detail you wish to study, the shifts from blue to red and red to yellow can be placed at higher or lower image data values and closer together or farther apart. The changes in color can be made gradual or sharp.
Color maps may simply be a list of colors for each level, or may be created by specifying a few colors and levels and interpolating to assign colors for the in-between levels. SAOimage uses the latter. If one were to graph the color map, having intensity of color on one axis and palette level on the other, the graph would have fixed points with ramps or steps between them. The simplest gray scale has no intensity for any color at one end of the palette and full intensity for all colors at the other end of the palette, with a straight line representing the interpolated colors in between. The color graph is in fact physically drawn by SAOimage in a separate window, and can be directly manipulated.
SAOimage has a basic gray scale and several pseudocolor maps available in the "cmap" page of the "Color" submenu. Once you have selected a color map, you may choose to manipulate it, as described below. Reselecting the same color map, or selecting a new color map from "cmap" submenu, sets the selected color map, eliminating any adjustments you may have made.
When a color map is being manipulated, the effective levels of points may be shifted or stretched above 1.0 or below 0.0. These points are preserved in the disk file, and when read in, they may be shifted back into the visible range. The novice user should remember that if one starts with the 'A' colormap, shifts it, and then writes it out, the stored colormap is the shifted map, not the original 'A' map.
|gray||black body||HEA||IMP 8||A||B|
With threshold/saturation, moving the mouse horizontally moves the lower (threshold) end of the graph up or down, while moving the mouse vertically moves the upper (saturation) end of the graph up and down relative to the palette. With contrast/bias, moving the mouse along the axis of the color bar shifts the entire graph up or down (bias) relative to the palette, while moving the mouse perpendicular to the color bar moves the ends of the graph closer together or farther apart about a middle position (contrast). Threshold/saturation is easy to implement in software and common in pseudocolor display systems. Contrast/bias corresponds more closely to the kinds of adjustments familiar to photographers. In both cases, the middle of the display window is the default graph position relative to the palette.
The intensities of the colors are normally given relative to voltage applied to the color guns in the monitor. Half intensity is half of full voltage. Unfortunately, this does not really correspond to the sensitivity of the eye. Double the voltage does not seem like doubling the intensity. Half voltage on a gray scale does not seem like a middle gray. The gray scale seems to favor the darker shades. The relationship between voltage and perception is generally thought to be an exponential one and is represented by the symbol small gamma. Changing the gamma produces a non-linear (exponential) adjustment in contrast. A gamma of between 2 and 2.2 is considered correct for a typical monitor. You can play with the gamma adjustment by selecting the "power" mode in the "Color" submenu. Moving the mouse horizontally in the main display window with a mouse button down adjusts the gamma. The gamma values for each color are printed beside the color graph. Gamma of 1 (linear) is in the middle of the main window. The intensity adjustment is applied directly to the palette colors and does not affect the points used to map the colors. Gamma values below 1 may be useful for sharpening the contrast before making a hard copy. You can drag beyond the main window for gamma values outside the normal range.
Normally, all adjustments are applied equally to each of the three colors. However, the adjustments can be applied to any one or two of the colors by holding down the control key. Then the three mouse buttons control red, green, and blue, respectively, as in the graph window.
The "invert" button in the "Color" submenu inverts the intensities (minimum intensity becomes maximum intensity) without changing the graph points.