STRETCH Procedure
Standard Library procedure that linearly expands the range of the color table currently loaded to cover an arbitrary range of pixel values.
Usage
STRETCH, low, high
Input Parameters
low—The lowest pixel value in the selected range; in other words, this is the pixel value that will be displayed with color index 0. (Default: 0)
high—Highest pixel value in selected range; in other words, this is the pixel value that will be the highest color index available on a device (normally 255 on an eight-bit plane device). (Default: !D.N_Colors – 1)
Keywords
None.
Discussion
STRETCH linearly interpolates new Red, Green, and Blue color vectors between low and high, and then loads them into the image display with LOADCT. The color vectors in the COLORS common block are unchanged.
To revert to a normal color table, call STRETCH with no parameters.
Example 1
This example shows how to expand the color table so that the pixels in the range of 100 to 150 fill the entire color-intensity range.
LOADCT, 4
COLOR_PALETTE
STRETCH, 100, 150
COLOR_PALETTE
See Also
System Variables:
!D.N_ColorsFor more information about how to access the three color variables in the color table common block, see the PV‑WAVE User’s Guide.
For more information about stretching color tables, see the PV‑WAVE User’s Guide.