ENVISION commands


PROGRAM NAME

edithresh - Interactively Edit Colormap Using Threshold Method

DESCRIPTION

Edithresh is an application for interactively changing the colormaps of data objects using the thresholding method. It is actually a front end (pane object) for editcmap.

After the colormap has been modified as desired (see explanation below), 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 edithresh window may be placed manually (the default method), or placed automatically. For automatic placement of the main edithresh window, specify the desired location in device (screen) coordinates, using the [-x] and [-y] arguments.

While the main edithresh 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 edithresh window can be specified explicitly using the [-width] and [-height] arguments. Alternatively, you may allow the main edithresh window to size itself initially, and then use the window manager to interactively modify its size as desired.

If desired, edithresh 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 edithresh will check the input file for modification every second. Suppose that while you are displaying a colormap with edithresh, the data object containing colormap is over-written. After no more than one second had passed, edithresh 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 edithresh 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 edithresh 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 Thresholding Method of Colormap Modification ----

Edithresh provides a mechanism with which you may 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.

REQUIRED ARGUMENTS

-i
type: infile
desc: File containing colormap

OPTIONAL ARGUMENTS

-cmap_only
type: flag
desc: Output edited colormap only (not value data, etc)
-priv
type: boolean
desc: Use private colormap?
default: false
-x
type: integer
desc: X location for GUI autoplacement
default: -1
bounds: -1 < [-x] < 1000
-width
type: integer
desc: Window width
default: 512
bounds: -1 < [-width] < 1000
-y
type: integer
desc: Y location for GUI autoplacement
default: -1
bounds: -1 < [-y] < 1000
-height
type: integer
desc: Window height
default: 512
bounds: -1 < [-height] < 1000
-update
type: float
desc: How often to check input file for modification
default: 1
bounds: value >= 0.0
-o
type: outfile
desc: Output file
default: {none}

EXAMPLES

Example 1 % edithresh -i image:mandril -cmap_only -o cmap.viff
% putimage -i image:mandril -cmap cmap.viff

Example 2 % edithresh -i image:gull -o new_gull.viff
% putimage -i new_gull.viff

SEE ALSO

editcmap(1), editpseudo(1), editimage(1)

RESTRICTIONS

REFERENCES

COPYRIGHT

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