TVSCL
The
TVSCL procedure scales the intensity values of
Image
into the range of the image
display and outputs the data to the image display at the specified location. The array is scaled so the minimum data value becomes 0 and the maximum value becomes the maximum number of available colors (held in the system variable
!D.TABLE_SIZE) as follows:
where the maximum and minimum are found by scanning the array. The parameters and keywords of the TVSCL procedure are identical to those accepted by the TV procedure. For additional information about each parameter, consult the description of TV.
Calling Sequence
TVSCL,
Image [, Position]
or
TVSCL,
Image [, X, Y [, Channel]]
Arguments
Image
A two-dimensional array to be displayed as an image. If this argument is not already of byte type, it is converted prior to use.
X, Y
If
X
and
Y
are present, they specify the lower left coordinate of the displayed image.
Position
Image position. See the discussion of the TV procedure for a full description.
Channel
The memory channel to be written. This argument is assumed to be zero if not specified. This parameter is ignored on display systems that have only one memory channel.
Keywords
TVSCL accepts all of the keywords accepted by the TV routine. See
TV
. In addition, there are two unique keywords:
NAN
Set this keyword to cause TVSCL to treat elements of
Image
that are not numbers (that is, elements that have the special floating-point values
Infinity
or
NaN
) as missing data, and display them using color index 0 (zero). Note that color index 0 is also used to display elements that have the minimum value in the
Image
array.
TOP
The maximum value of the scaled result. If TOP is not specified, 255 is used. Note that the minimum value of the scaled result is always 0.
Example
Display a floating-point array as an image using the TV command. Enter:
TV, DIST(200)
Note that the image is not easily visible because the values in the array have not been scaled into the full range of display values. Now display the image with the TVSCL command by entering:
TVSCL, DIST(200)
Notice how much brighter the image appears.