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 in the ENVI Tutorial Data section to download a .zip file containing the feature counting data. Extract the contents to a local directory.

; 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 properties (Set, Get): INPUT_FEATURE_COUNT_URI, 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_FEATURE_COUNT_URI (required)

Specify the fully qualified path and filename for an ENVI feature count file (.efc).

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.2

See Also

ENVITask, ENVIFeatureCount