Categories | Alphabetical | Classes | All Contents | [ < ] | [ > ]

TVSCL


Syntax | Arguments | Keywords | Examples | Version History | See Also

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.

Syntax

TVSCL, Image [, Position]

or

TVSCL, Image [, X, Y [, Channel]]

Keywords: [, /CENTIMETERS | , /INCHES] [, /NAN] [, /ORDER] [, TOP=value] [, TRUE={1 | 2 | 3}] [, /WORDS] [, XSIZE=value] [, YSIZE=value]

Graphics Keywords: [, CHANNEL=value] [, /DATA | , /DEVICE | , /NORMAL] [, /T3D | Z=value]

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, !D.TABLE_SIZE-1 is used. Note that the minimum value of the scaled result is always 0.

Graphics Keywords Accepted

See Graphics Keywords for the description of graphics and plotting keywords not listed above. CHANNEL, DATA, DEVICE, NORMAL, T3D, Z.

Thread Pool Keywords

This routine is written to make use of IDL's thread pool, which can increase execution speed on systems with multiple CPUs. The values stored in the !CPU system variable control whether IDL uses the thread pool for a given computation. In addition, you can use the thread pool keywords TPOOL_MAX_ELTS, TPOOL_MIN_ELTS, and TPOOL_NOTHREAD to override the defaults established by !CPU for a single invocation of this routine. See Thread Pool Keywords for details.

Examples

Display a floating-point array as an image using the TV command:

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.

Version History

Introduced: Original

See Also

ERASE, SLIDE_IMAGE, TV, WIDGET_DRAW, WINDOW


Categories | Alphabetical | Classes | All Contents | [ < ] | [ > ]