Editcmap is an application for interactively changing the colormaps of data objects. Currently, two methods for changing the colormaps are offered: pseudocoloring and thresholding. Depending on the type of colormap editing selected, the editcmap interface and the procedure for modifying the colormap will differ (see explanations below).
After the colormap has been modified as desired, click on the "Save" button to write out the modified colormap. If the [-cmap_only] argument is specified, only the colormap will be written to the output file; if the [-cmap_only] argument is not specified, all attributes and data from the input object will be written to the output file along with the modified colormap.
On creation, the main editcmap window may be placed manually (the default method), or placed automatically. For automatic placement of the main editcmap window, specify the desired location in device (screen) coordinates, using the [-x] and [-y] arguments.
While the main editcmap window should be created with a default size that is appropriate to the type of colormap modification (pseudocoloring or thresholding) being used, a width and height for the main editcmap window can be specified explicitly using the [-width] and [-height] arguments. Alternatively, you may allow the main editcmap window to size itself initially, and then use the window manager to interactively modify its size as desired.
If desired, editcmap may be forced to use a private colormap with the [-priv] argument.
By default, the update time is 1, or every second; this implies that editcmap will check the input file for modification every second. Suppose that while you are displaying a colormap with editcmap, the data object containing colormap is over-written. After no more than one second had passed, editcmap will automatically register the fact that the data object has changed, and update the displayed colormap accordingly. Setting the update time to 0.25 would cause editcmap to check the input file for potential modifications every 0.25 seconds, or 4 times a second. Setting the update time to 0 would tell editcmap not to check the input file for modifications at all. The update time is specified in seconds or fractions of a second, and must be greater than or equal to zero.
---- Using the Pseudocolor Method of Colormap Modification ----
About the Pseudocolor Display The pseudocolor display includes (1) a palette of the colors in which image pixels appear, (2) a set of Red, Green, and Blue scrollbars with text parameter boxes to the right of each, and (3) a "Reset" button at the upper right of the display. The palette is used to display the current colors of the pixels in the image, and allows you to select pixels for color change. The Red, Green, and Blue scrollbars allow you to specify colors for pixels. 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. The "Reset" button causes all selected pixels in the palette to be un-selected, so that the pseudocoloring process may be repeated.
Performing a Pseudocolor Operation A pseudocoloring operation includes three steps:
1: Select the desired pixels from the color palette
2: Specify the desired color by typing in Red, Green, and Blue values or by moving the Red, Green, and Blue scrollbars
3: Click on the By default, the color palette appears in the form of a grid of color cells. Each color cell represents a pixel in the input image, and appears in the same color as the pixel does in the image. The color cells are arranged in the order that the pixels appear in the image's colormap; ie, the upper leftmost colorcell is the first color in the colormap and lower rightmost pixel box is the last color in the colormap.
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 bar 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.
Selecting a single pixel 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.
Selecting a range of pixels 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.
Options of the PseudoColor Object Click on the "Options" button to display the internal menuform which is associated with the pseudocolor object. Using the menuform of the pseudocolor object, you may change the palette type used by the psuedocolor object from Color Cell to Color Bar or Color Wheel. For more details on the features offered by the psuedocolor object, click on the "Help" button of the pseudocolor object menuform.
---- Using the Thresholding Method of Colormap Modification ----
The thresholding method of colormap modification allows you to perform pixel thresholding, pixel clipping, or window contrast enhancement operations on the currently displayed image. Click on the "Options" button to display the internal menuform which is associated with the threshold object. Using the menuform of the threshold object, you may set the policy of the threshold object to Pixel Clipping, Pixel Thresholding, or Window Contrast Enhancement. You may also invert the thresholded region, or undo the thresholding.
Pixel Clipping Pixel clipping is used to mask out certain parts of the image so that only a desired range of pixels is observed. Pixel clipping works by allowing a windowed region of the original pixel values to be displayed. The user selects the pixel value of the masked region; all values outside the windowed region will be set to this masked region pixel value. If the masked region pixel value does not exist in the colormap, the corresponding grey level value will be used.
When the "Invert Region?" logical is set to "False", the original pixel values of the image will be displayed inside the region defined by the lower and upper scroll bars; this can be thought of as a bandpass filter. When the "Invert Region?" logical is set to "True", the original pixel values will be displayed outside the region defined by the lower and upper scroll bars; this can be thought of as a bandreject filter.
Pixel Thresholding Pixel thresholding is used to perform real-time image thresholding. It generates a binary (or 2 pixel value) image. Pixel thresholding works by assigning a non-zero pixel value to the selected region; the rest of the image will be turned black.
When the "Invert Region?" logical is set to "False", the pixels in the image inside the region defined by the lower and upper scroll bars will be displayed as white, and those outside the region will be displayed as black. When the "Invert Region?" logical is set to "True", the opposite display is used, ie, those values outside the region defined by the lower and upper scroll bars will be displayed as white, and those inside the region will be displayed as black.
Window Contrast Enhancement Windowed thresholding is used to increase the contrast of the image in a particular pixel range, while masking out the other pixels in the image. Use the "Lower", "Upper" and "Range" scrollbars to interactively specify the region of pixel values that will have their contrast enhanced; all pixels outside the range will appear in black. The pixel values inside the specified range will have their pixel values normalized to cover the entire range of pixels in the image; thus, this operation can be thought of as a histogram stretch.
When the "Invert Region?" logical is set to "False", the pixels in the image inside the region defined by the lower and upper scroll bars will have their contrast enhanced. When the "Invert Region?" logical is set to "True", the opposite display is used, ie, those values outside the region defined by the lower and upper scroll bars will have their contrast enhanced.
Reset (undo thresholding) This button resets the lower and upper values of the threshold range to the minimum and maximum values of the image being displayed. This has the effect of undoing any prior thresholding operations, and setting the image back to its "un-thresholded" state.
Mutually Exclusive Group; you must specify ONE of:
OR
Example 1
% editcmap -i image:moon -cmap_only -o cmap.viff -thresh
% putimage -i image:moon -cmap cmap.viff
Example 2
% editcmap -i image:ball -o newball.viff -pseudo
% putimage -i newball.viff