FeatureCountToROI Task
This task creates point regions of interest (ROIs) from a saved feature count file (.efc).
Example
Sample data files are available on our ENVI Tutorials web page. Click the Deep Learning link to download the .zip file to your machine, then unzip the files. containing the feature counting data. The files you will use in this example are located in the shipping_containers folder of the download. Update the file references in the example with the correct locations.
; Start the application
e = ENVI()
; Open a feature count file
; Update the following line with the correct path
; to the tutorial data files
File = 'C:\MyTutorialFiles\FeatureCountContainers.efc'
; Open an orthophoto of seaport
OrthoFile = 'C:\MyTutorialFiles\OaklandPortOrthophoto1.dat'
Raster = e.OpenRaster(OrthoFile)
; Get the task from the catalog of ENVITasks
Task = ENVITask('FeatureCountToROI')
; Define inputs
Task.INPUT_FEATURE_COUNT_URI = File
; Run the task
Task.Execute
; Display the resulting ROI over the orthophoto
View = e.GetView()
Layer = View.CreateLayer(Raster)
roiLayer = Layer.AddROI(Task.OUTPUT_ROI)
View.Zoom, 3.0
Syntax
Result = ENVITask('FeatureCountToROI')
Input parameters (Set, Get): INPUT_FEATURE_COUNT_URI, 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_FEATURE_COUNT_URI (required)
Specify the fully qualified path and filename for an ENVI feature count file (.efc).
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 |