This task creates individual ROIs from each geometry record 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('VectorRecordsToSeparateROI')
 
; Define inputs
Task.INPUT_VECTOR = Vector
 
; Run the task
Task.Execute
 
; Open a raster
File = Filepath('qb_boulder_msi', ROOT_DIR=e.Root_Dir, $
  SUBDIRECTORY=['data'])
Raster = e.OpenRaster(File)
 
; Display the raster
View = e.GetView()
Layer = View.CreateLayer(Raster)
 
; Open and display the ROIs
File = Task.OUTPUT_ROI_URI
rois = e.OpenRoi(File)
roiLayers = !NULL
FOREACH roi, rois DO $
  roiLayers = [roiLayers, Layer.AddRoi(roi)]

Syntax


Result = ENVITask('VectorRecordsToSeparateROI')

Input parameters (Set, Get): INPUT_VECTOR, OUTPUT_ROI_URI

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 an input ENVIVector that contains the geometry records.

OUTPUT_ROI_URI (optional)

Specify a string with the fully qualified path and filename for 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.3

Introduced

See Also


ENVITask, ENVIVector, VectorRecordsToROI Task, VectorAttributeToROIsTask