This task performs a union or intersection of multiple ROI geometries into a single output ROI, Note that this task only works with geometry and will ignore ROIs that contain pixels or thresholds in their definitions.

Example


; Start the application
e = ENVI()
 
; Open an input file
File = Filepath('qb_boulder_roi.xml', Subdir=['data'], $
  Root_Dir=e.Root_Dir)
Regions = e.OpenROI(File)
 
; Get the task from the catalog of ENVITasks
Task = ENVITask('MergeROI')
 
; Define inputs
Task.INPUT_ROIS = Regions
Task.OPERATION = 'Union'
Task.ROI_COLOR = [200,0,0]
Task.ROI_NAME = 'Union Example'
 
; Run the task
Task.Execute
 
; Add the output to the Data Manager
e.Data.Add, Task.OUTPUT_ROI
 
; Display the result
RasterFile = Filepath('qb_boulder_msi', Subdir=['data'], $
  Root_Dir=e.Root_Dir)
View = e.GetView()
BaseRaster = e.OpenRaster(RasterFile)
Layer = View.CreateLayer(BaseRaster)
roiLayer = Layer.AddRoi(Task.OUTPUT_ROI)

Syntax


Result = ENVITask('MergeROI')

Input parameters (Set, Get): INPUT_ROIS, OPERATION, OUTPUT_ROI_URI, ROI_COLOR, ROI_NAME

Output parameters (Get only): OUTPUT_ROI

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

Input Parameters


INPUT_ROIS (required)

Specify the ROIs to merge.

OPERATION (required)

Specify which method used to merge the ROIs:

  • Union
  • Intersection

The default value is Union.

OUTPUT_ROI_URI (optional)

Specify a string with the fully qualified path and filename for OUTPUT_ROI.

ROI_COLOR (optional)

Specify the RGB triplet values for the output ROI color.

ROI_NAME (optional)

Specify the name of the output ROI.

Output Parameters


OUTPUT_ROI

This is a reference to the output ROI.

Methods


Execute

Parameter

ParameterNames

Properties


DESCRIPTION

DISPLAY_NAME

NAME

REVISION

TAGS

Version History


ENVI 5.6.2

Introduced

See Also


ENVITask, ENVITask::Parameter