Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.


  >  Docs Center  >  ENVI API  >  ENVI Classic Data Control  >  ENVI_GET_ROI_IDS

ENVI_GET_ROI_IDS

ENVI_GET_ROI_IDS

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 an array of ROI IDs associated with a display group, a file, or a spatial size [ns, nl].

Syntax


Result = ENVI_GET_ROI_IDS([, DN=integer] [, FID=file ID] [, /LONG_NAME] [, NL=integer] [, NS=integer] [, ROI_COLORS=variable] [, ROI_NAMES=variable] [, /SHORT_NAME])

Keywords


DN (optional)

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.

FID (optional)

The file ID (FID) is a long-integer scalar with a value greater than 0. An invalid FID has a value of -1. The FID is provided as a named variable by any routine used to open or select a file. Often, the FID is returned from the keyword R_FID in the ENVIRasterToFID routine. Files are processed by referring to their FIDs. If you work directly with the file in IDL, the FID is not equivalent to a logical unit number (LUN).

LONG_NAME (optional)

Set this keyword to return the ROI name, ROI color, number of points, and associated image size in the variable specified by ROI_NAMES. You cannot set this keyword if you set SHORT_NAME.

NL (optional)

Use this keyword to specify the number of lines associated with the desired ROIs. If you specify NL, then you must also specify NS.

NS (optional)

Use this keyword to specify the number of samples associated with the desired ROIs. If you specify NS, then you must also specify NL.

ROI_COLORS (optional)

Use this keyword to specify a named variable that contains the RGB color value for each ROI ID. ROI_COLORS is a byte array of size [3, #ROI IDs].

ROI_NAMES (optional)

Use this keyword to specify a named variable that contains a string array of ROI names for each ROI ID. The default name includes the ROI name, ROI color, and number of points. Set the keyword SHORT_NAME or LONG_NAME to modify the default ROI_NAMES.

SHORT_NAME (optional)

Set this keyword to return only the ROI name in the variable specified by ROI_NAMES. You cannot set this keyword if you set LONG_NAME.

API Version


3.2



© 2018 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us