This task opens one or more ROIs given an input URI.

Example


; Start the application
e = ENVI(/HEADLESS)
 
; Open an ROI file
File = Filepath('qb_boulder_roi.xml', Subdir=['data'], $
  Root_Dir=e.Root_Dir)
 
; Get the task from the catalog of ENVITasks
Task = ENVITask('ExtractROIsFromFile')
 
; Define task inputs
Task.INPUT_URI = File
Task.ROI_NAMES = ['Water', 'Disturbed Earth']
 
; Run the task
Task.Execute
 
; Print the output ROI names
FOREACH roi, Task.OUTPUT_ROIS DO Print, roi.Name

Syntax


Result = ENVITask('ExtractROIsFromFile')

Input properties (Set, Get): INPUT_URI, ROI_NAMES

Output properties (Get only): OUTPUT_ROIS

Properties marked as "Set" are those that you can set to specific values. You can also retrieve their current values any time. Properties marked as "Get" are those whose values you can retrieve but not set.

Methods


This task inherits the following methods from ENVITask:

AddParameter

Execute

Parameter

ParameterNames

RemoveParameter

Properties


This task inherits the following properties from ENVITask:

COMMUTE_ON_DOWNSAMPLE

COMMUTE_ON_SUBSET

DESCRIPTION

DISPLAY_NAME

NAME

REVISION

TAGS

This task also contains the following properties:

INPUT_URI (required)

Specify the input URI.

OUTPUT_ROIS

This is an array of ROIs extracted from the URI.

ROI_NAMES (optional)

Specify a string array with the names of the ROIs to open. If not set, all of the ROIs in the URI will be returned. The order of the output ROIs will be determined by this parameter.

Version History


ENVI 5.5. 2

Introduced

API Version


4.3

See Also


ENVITask, ENVIROI