The STRETCH procedure stretches the image display color tables so the full range runs from one color index to another. The modified colortable is loaded, but the COLORS common block is not changed. The original colortable can be restored by calling STRETCH with no arguments. A colortable must be loaded before STRETCH can be called.
This routine is written in the IDL language. Its source code can be found in the file
stretch.pro
in the
lib
subdirectory of the IDL distribution.
The lowest pixel value to use. If this parameter is omitted, 0 is assumed. Appropriate values range from 0 to the number of available colors-1. If no parameters are supplied, the original color tables are restored.
Load the STD GAMMA-II color table by entering:
Create and display and image by entering:
Now adjust the color table with STRETCH. Make the entire color table fit in the range 0 to 70 by entering:
Notice that pixel values above 70 are now colored white. Restore the original color table by entering: