This task creates a single region of interest (ROI) from all geometry records in a vector.

Example


; Start the application
e = ENVI()
 
; Open an input file
File = Filepath('qb_boulder_msi_vectors.shp', Subdir=['data'], $
  Root_Dir=e.Root_Dir)
Vector = e.OpenVector(File)
 
; Get the task from the catalog of ENVITasks
Task = ENVITask('VectorRecordsToROI')
 
; Define inputs
Task.INPUT_VECTOR = Vector
 
; Run the task
Task.Execute
 
; Display the result
DisplayFile = Filepath('qb_boulder_msi', Subdir=['data'], $
  Root_Dir=e.Root_Dir)
Raster = e.OpenRaster(DisplayFile)
View = e.GetView()
Layer = View.CreateLayer(Raster)
VisRoi = Layer.AddRoi(Task.OUTPUT_ROI)

Syntax


Result = ENVITask('VectorRecordsToROI')

Input parameters (Set, Get): INPUT_VECTOR, 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_VECTOR (required)

Specify the input vector that contains the geometry records.

OUTPUT_ROI_URI (optional)

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

ROI_COLOR (optional)

Specify the color of the output ROI.

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.2

Introduced

ENVI 6.2

Added the ROI_NAME and ROI_COLOR parameters

See Also


ENVITask, ENVIVector, ENVIROI