4.3.6 Interactive Color Tool

This function is currently available only in $LASLOCAL/xid_sarnoff.

The general functionality of the Color Tool is to provide a mechanism for specifying a piece-wise linear contrast stretch to be applied to the color map for either individual Red, Green or Blue color bands or to all three bands. A dynamic histogram is displayed to aid in the selection of the contrast stretch by showing the mapped values as the contrast stretch is modified.

A separate Stretch List Tool provides the ability to save multiple contrast stretches to a file and allows different contrast stretches to be toggled readily.

An additional Colormap Tracking Tool provides the capability to analyze the effects of a contrast stretch modification on the X color map.

A new Histogram Normalization Tool provides a mechanism for approximating a piece-wise linear contrast stretch to normalize the histogram for the image. This is an alpha version of the tool.

A stand-alone X Gamut Map Tool provides an interface for previewing the gamut mapping from the display device to a printer model.

The red, green, blue, and all radio buttons allow the user to select which of the mapping components to adjust. Each displayed image has three separate mapping components, one for the red, one for the green, and one for the blue portion of the mapping.

Red:
This option allows only the red component of the mapping to be adjusted. The green and blue components will not be changed.

Green:
This option allows only the green component of the mapping to be adjusted. The red and blue components will not be changed.

Blue:
This option allows only the blue component of of the mapping to be adjusted. The red and green components will not be changed.

All:
This option allows all components of the mapping to be adjusted equally. The histogram displayed shows the sum of the Red, Green and Blue components.

Sat:
This is an alpha release for modifying the color saturation in HLS color space. This mechanism currently only works with PseudoColor visuals. No histogram is displayed with this option.

Contrast Stretch:
The MB1 (left mouse button) is used to set breakpoints on the stretch line and move the point to adjust the piece-wise linear color mapping. MB2 (middle mouse button) is used to delete previously set breakpoints. The horizontal value represents the from value and the vertical value is the to value for the mapping function.

Two additional input mechanisms are provided to add easier entry of specific breakpoints. The horizontal slider allows entry of the from value or this value can be entered through the "From" textfield. Similarly, the vertical slider adjusts the to value for the corresponding from setting and this data can also be entered through the "To" textfield.

Histogram:
The histogram displayed for the selected color represents the modified color values after applying the contrast stretch. The range of the histogram automatically scales to the maximum count for the color plane. The data point for the cumulative count percentage is selected by either tracking the cursor in the histogram drawing area or by setting the horizontal slider value.
Distributional and Cumulative:
The Distributional and Cumulative radio buttons allow the user to select the type of histogram to be displayed.
Distributional:
In a distributional histogram, the x-axis represents gray level values 0 to 255; the y-axis represents the total number of pixels that have the corresponding gray level value.

Cumulative:
In a cumulative histogram, the x-axis represents gray level values 0 to 255; the y-axis represents the total number of pixels that have the corresponding gray level as well as all previous gray levels.

Bar, Stacked Bar, Line Graph Icons:
These icons change the style in which the histogram is displayed. The bar style displays information for the current color selected or the sum of red, green and blue when All is selected. The stacked bar shows red, green and blue on the same histogram with the green bar stacked on top of red, and the blue bar on top of green. This allows the individual color histograms to be compared as well as visualize the overall histogram of the image. The line graph shows all colors as overlayed line graphs and allows for easier comparison of the histograms.

Scale Arrow Buttons:
The scale arrow buttons and text field provide a mechanism for changing the vertical scale of the histogram. Each arrow button press increases/decreases the scale by 10 %. A specific scale value can be entered directly in the scale textfield. The maximum scale value of 1 sets the scale maximum value to the maximum histogram data point. By decreasing the scale value, the maximum value displayed will be reduced by the scale factor. Histogram data points larger than this value will be clipped at the new scale maximum.
Show Stretch, Hide Stretch:
The Show Stretch button pops up the stretch tool window for saving and retrieving stretches. The button toggles to Hide Stretch to provide a convenient mechanism for hiding the stretch tool.
Show Map, Hide Map:
The Show Map button pops up the map tool window for viewing the current X color map. The button toggles to Hide Map to provide a convenient mechanism for hiding the map tool.
TrueColor/PseudoColor:
The TrueColor or PseudoColor option is available depending on the default X color map. For the SGI with a default PseudoColor color map, the TrueColor button provides a mechanism to display a separate image viewing window in 24-bit mode. On DG workstations with a DirectColor default, the PseudoColor button provides an 8-bit image viewing window which is useful for HLS colorspace manipulations.
Undo/Redo:
The Undo button deletes the last modification made to the contrast stretch. After Undo is selected, the button toggles to Redo which reverses the effect of the Undo and returns the contrast stretch to the state prior to the Undo.
Restore:
Selecting the Restore button reloads the mapping that was applied to the image when the Color Tool function was initiated.
Linear:
Selecting the Linear button loads a linear or identity mapping. The linear mapping is only applied to the color band selected or to all bands if the ALL button is set.
Cancel:
Selecting the Cancel button closes the Color Tool panel without saving the current mapping. Note that the current X color map retains the results of the current contrast stretch. To restore the color map to the state prior to initiating the Color Tool, use the Restore button.
Dismiss:
Selecting the Dismiss button closes the Color Tool panel, saves the current adjusted mapping, and closes the other tools shown.