SAOimage display of M-51

SAOimage Color Mapping

SAO/TDC Home Page
In order to maximize the use of the available colors, SAOimage offers several facilities for assigning and altering colors in the palette. The The association of a palette level with an image data value is handled by scaling and is explained in a separate section. There are basically three ways of assigning colors in the palette: true-color, gray-scale, and pseudocolor. SAOimage supports the latter two. SAOimage also supports half-toning on non-color workstations and by selecting the "mono" button in the color submenu (see the halftone section).

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.

gray gray color map
black body black body color map
imp8 IMP 8 color map
hea HEA color map
a A color map
b B color map

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.

Saving color map entries and reading them back color only)

The current colormap can be written to a disk file, and a previously saved colormap can be read from a disk file. The format of the disk file is ASCII and can be edited if the format is followed. The file can have comments on any line, starting with a '#' symbol. The first non-comment word in the file must be PSEUDOCOLOR. Each color's table is defined separately. Each color's table must begin with the color name RED, GREEN, or BLUE. The color name may optionally be followed by the word GAMMA, then followed by a gamma value for that color. The vertex points in the table are defined by pairs: '(level, intensity)'. The intensities range from 0 (minimum) to 1.0 (maximum). The levels range from 0 (lowest level) to 1.0 (highest level). The points must be in ascending order by level. All three colors must be described, and each color must have at least 2 points.

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.


[Color Palettes] [Color Table Manipulation] [16- and 24-bit Displays]