ENVIUI::SelectROI
The SelectROI function method displays a dialog for selecting regions of interest (ROIs).
Example
; Launch the application
e = ENVI()
; Restore ENVIROI objects
file = FILEPATH('qb_boulder_roi.xml', ROOT_DIR=e.ROOT_DIR, $
SUBDIRECTORY=['data'])
rois = e.OpenROI(file)
; Get the UI object
UI = e.UI
; Choose an ROI from the dialog
roi = UI.SelectROI()
; Display the ROI information
Print, 'ROI name: ',roi.name
Print, 'ROI color: ',roi.color
Syntax
Result = ENVIUI.SelectROI([, Keywords=value])
Return Value
This method normally returns one or more ENVIROI objects. If you close the dialog before selecting a file, or if you click Cancel, the method returns !NULL.
Arguments
None
Keywords
Keywords are applied only during the initial creation of the object.
ALLOW_MULTIPLE (optional)
Set this keyword to allow multiple selection in the dialog. The SelectROI method will return an array of ENVIROI objects.
DIALOG_PARENT (optional)
Set this keyword to the widget ID of a widget that will be used as the parent of the ROI selection dialog. If you close the parent dialog, the ROI selection dialog will also close.
ERROR (optional)
Set this keyword to a named variable that will contain any error message issued during execution of this routine. If no error occurs, the ERROR variable will be set to a null string (''
). If an error occurs and the routine is a function, then the function result will be undefined.
When this keyword is not set and an error occurs, ENVI returns to the caller and execution halts. In this case, the error message is contained within !ERROR_STATE and can be caught using IDL's CATCH routine. See IDL Help for more information on !ERROR_STATE and CATCH.
See Manage Errors for more information on error handling in ENVI programming.
TITLE (optional)
Set this keyword to a string with a custom title bar for the dialog.
Version History
ENVI 5.4 |
Introduced |
API Version
4.2
See Also
ENVIUI, ENVIUI::SelectInputData