Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.


  >  Docs Center  >  ENVI API  >  ENVIROIStatisticsTask

ENVI

ENVIROIStatisticsTask

ENVIROIStatisticsTask

This task computes statistics from one or more ENVIROIs and their associated raster. The ROI statistics can be used as input to supervised classification methods.

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)
 
RoiFile = Filepath('qb_boulder_roi.xml', $
  ROOT_DIR=e.Root_Dir, $
  SUBDIRECTORY=['data'])
Rois = e.OpenRoi(RoiFile)
 
; Get the task from the catalog of ENVITasks
StatTask = ENVITask('ROIStatistics')
 
; Get training statistics
StatTask.INPUT_RASTER = Raster
StatTask.INPUT_ROI = Rois
StatTask.Execute
 
; Run SAM classification
ClassTask = ENVITask('SpectralAngleMapperClassification')
ClassTask.INPUT_RASTER = Raster
ClassTask.MEAN = StatTask.Mean
ClassTask.CLASS_NAMES = StatTask.ROI_NAMES
ClassTask.CLASS_COLORS = StatTask.ROI_COLORS
ClassTask.OUTPUT_RASTER_URI = e.GetTemporaryFilename()
ClassTask.Execute
 
; Get the collection of data objects currently 
; available in the Data Manager
DataColl = e.Data
 
; Add the output to the Data Manager
DataColl.Add, ClassTask.OUTPUT_RASTER
 
; Display the result
View = e.GetView()
Layer = View.CreateLayer(ClassTask.OUTPUT_RASTER)

Syntax


Result = ENVITask('ROIStatistics')

Input properties (Set, Get): INPUT_RASTER, INPUT_ROI

Output properties (Get only): COVARIANCE, MAX, MEAN, MIN, ROI_COLORS, ROI_NAMES, ROI_PIXEL_COUNT, STDDEV

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:

COVARIANCE

This is the covariance matrix, returned as an array: [number of bands, number of bands, number of ROIs].

INPUT_RASTER (required)

Specify a raster from which to generate ROI statistics.

INPUT_ROI (required)

Specify an array of one or more ENVIROIs.

MAX

This is the maximum data value, returned as an array: [number of bands, number of ROIs].

MEAN

This is the mean data value, returned as an array: [number of bands, number of ROIs].

MIN

This is the minimum data value, returned as an array: [number of bands, number of ROIs].

ROI_COLORS

This is an array of RGB triplets representing the ROI colors as defined by the ENVIROIs.

ROI_NAMES

This is an array of ROI names as defined by the input ENVIROIs.

ROI_PIXEL_COUNT

This is the number of pixels for each ROI, returned as an array: [number of ROIs].

STDDEV

This is the standard deviation, returned as an array: [number of bands, number of ROIs].

Version History


ENVI 5.4, Service Pack 1

Introduced

API Version


3.2

See Also


ENVITask, ENVITask::Parameter, ENVITrainingClassificationStatisticsTask, ENVIRaster, ENVIROI



© 2018 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us