ClassificationToPolygonROI Task
This task creates polygon 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 polygon ROIs
Task = ENVITask('ClassificationToPolygonROI')
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('ClassificationToPolygonROI')
Input parameters (Set, Get): INPUT_RASTER, 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_RASTER (optional)
Specify a classification raster.
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
Properties
Version History
|
ENVI 5.6 |
Introduced |
See Also
ENVITask, ClassificationToPixelROI Task, ClassificationToShapefile Task, ROIToClassification Task