This task creates regions of interest (ROIs) from 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('VectorAttributeToROIs')
 
; Define inputs
Task.ATTRIBUTE_NAME = 'CLASS_NAME'
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)
VisRois = !NULL
Foreach Roi, Task.OUTPUT_ROI do $
  VisRois = [VisRois, Layer.AddRoi(Roi)]

Syntax


Result = ENVITask('VectorAttributeToROIs')

Input parameters (Set, Get): ATTRIBUTE_NAME, ATTRIBUTE_VALUE, IGNORE_CASE, INPUT_VECTOR, OUTPUT_ROI_URI

Output parameters (Get only): OUTPUT_ROI

Properties marked as (Init) can be set during the initial creation of the object. Properties marked as (Get) can be retrieved. Properties marked as (Set) can be set after initial creation.

Input Parameters


ATTRIBUTE_NAME (required)

Specify the attribute name used to search for records in the vector. If you search a particular attribute without providing an ATTRIBUTE_VALUE, an ROI will be created for each unique record with that attribute. If you search an attribute and provide an ATTRIBUTE_VALUE, an ROI will be created for records that contain that value.

ATTRIBUTE_VALUE (optional)

Specify the attribute value used to search for records in the vector.

IGNORE_CASE (optional)

Set this parameter to true to ignore case when searching attribute values. The default is false.

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.

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

See Also


ENVITask, ENVIVector, ENVIROI, VectorRecordsToSeparateROI Task, VectorRecordsToROI Task