This routine only works with ENVI Classic display groups and cannot be used with the ENVI display or in code that starts the application with the ENVI function.

This function returns the display data for the associated display group. ENVI_GET_IMAGE returns either one band (num_samples, num_lines) or three bands (num_samples, num_lines, 3).

Note: An interactive ENVI Classic session is required to run this function.

Syntax


Result = ENVI_GET_IMAGE(BAND_POS=value, DIMS=array, DN=integer)

Keywords


BAND_POS

Use this keyword to specify the band position of an RGB image to return. If left undefined, then all three RGB bands are returned. For gray scale images, set BAND_POS=0.

DIMS

The “dimensions” keyword is a five-element array of long integers that defines the spatial subset (of a file or array) to use for processing.

  • DIMS[0]: Unused for this routine; set to -1L.
  • DIMS[1]: The starting sample number. The first x pixel is 0.
  • DIMS[2]: The ending sample number
  • DIMS[3]: The starting line number. The first y pixel is 0.
  • DIMS[4]: The ending line number

To process an entire file (with no spatial subsetting), define DIMS as shown in the following code example. This example assumes you have already opened a file using ENVI_SELECT or ENVI_PICKFILE:

envi_file_query, fid, dims=dims

DN

This keyword cannot be used to reference the ENVI display. It is only for use with ENVI Classic display groups.

Use this keyword to specify the display number for the data request. Display numbers can be retrieved in the event handler of user-managed display events. Retrieve the uvalue for ev.top:

widget_control, ev.top, get_uvalue=dn

For user-managed display routines, just add a menu item to the display.men file.

API Version


4.2