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


Harris Geospatial / Docs Center / ENVI API / Processing / ENVIRasterStatisticsTask

ENVIRasterStatisticsTask

ENVIRasterStatisticsTask

This task computes statistics on a raster.

See ENVIRasterHistogramTask to compute a histogram for a 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)
 
; Process a spatial subset
Subset = ENVISubsetRaster(Raster, Sub_Rect=[600,200,799,399])
 
; Get the task from the catalog of ENVITasks
Task=ENVITask('RasterStatistics')
 
; Define inputs
Task.INPUT_RASTER = Subset
 
; Run the task
Task.Execute
 
; Print Statistics
Print, Task.MAX
Print, Task.MEAN
Print, Task.MIN
Print, Task.NPIXELS
Print, Task.STDDEV

Syntax


Result = ENVITask('RasterStatistics')

Input properties (Set, Get): COMPUTE_COVARIANCE, IGNORE_VALIDATE, INPUT_RASTER

Output properties (Get only): CORRELATION, COVARIANCE, DESCRIPTION, EIGENVALUES, EIGENVECTORS, MAX, MEAN, MIN, NAME, NPIXELS, 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


COMPUTE_COVARIANCE (optional)

Set this property to true to compute covariance matrix, eigenvectors, eigenvalues, and correlation on the raster. The options are true or false (default).

CORRELATION

This is the correlation matrix of the data.

COVARIANCE

This is the covariance matrix of the data.

DESCRIPTION

This property describes the task.

EIGENVALUES

This is an array of eigenvalues from the data.

EIGENVECTORS

This is an array of eigenvectors from the data.

IGNORE_VALIDATE (optional)

This property is now deprecated and has no effect on task behavior. All task property values are validated when they are set, and they throw an error with bad input.

INPUT_RASTER (required)

Specify a raster from which to generate statistics.

MAX

This is the maximum data value of each band.

MEAN

This is the mean data value of each band.

MIN

This is the minimum data value of each band.

NAME

This property contains the name of the task.

NPIXELS

This is the number of pixels in the raster.

STDDEV

This is the standard deviation data value of each band.

Version History


ENVI 5.2

Introduced

API Version


3.1.0

See Also


ENVITask, ENVITask::Parameter, ENVIRasterStatistics, ENVISubsetRaster, ENVIRasterHistogramTask



© 2017 Exelis Visual Information Solutions, Inc. |  Legal
My Account    |    Buy    |    Contact Us