This task creates pixel regions of interest (ROIs) from a classification raster.

Example


; Start the application
e = ENVI()
 
; Open an input file
File = Filepath('qb_boulder_msi', Subdir=['data'], $
  Root_Dir=e.Root_Dir)
Raster = e.OpenRaster(File)
 
; Create a classification ENVIRaster
ClassTask = ENVITask('ISODATAClassification')
ClassTask.INPUT_RASTER = Raster
ClassTask.Execute
 
; Convert the classification pixels to pixel ROIs
Task = ENVITask('ClassificationToPixelROI')
Task.INPUT_RASTER = ClassTask.OUTPUT_RASTER
Task.Execute
 
; Display the ROIs
View = e.GetView()
Layer = view.CreateLayer(Raster)
rois = Task.OUTPUT_ROI
roiLayers = OBJARR(N_ELEMENTS(rois))
FOR i=0, N_ELEMENTS(rois)-1 DO roiLayers[i] = layer.AddROI(rois[i])

Syntax


Result = ENVITask('ClassificationToPixelROI')

Input properties (Set, Get): INPUT_RASTER, OUTPUT_ROI_URI

Output properties (Get only): OUTPUT_ROI

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_RASTER (optional)

Specify a classification raster.

OUTPUT_ROI

This is a reference to the output ROI.

OUTPUT_ROI_URI (optional)

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

Version History


ENVI 5.6

Introduced

API Version


4.3

See Also


ENVITask, ClassificationToPolygonROI Task, ClassificationToShapefile Task, ROIToClassification Task