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


  >  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, INPUT_RASTER

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


This task inherits the following properties from ENVITask:

COMMUTE_ON_DOWNSAMPLE

COMMUTE_ON_SUBSET

DESCRIPTION

DISPLAY_NAME

NAME

REVISION

This task also contains the following 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.

EIGENVALUES

This is an array of eigenvalues from the data.

EIGENVECTORS

This is an array of eigenvectors from the data.

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.

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

See Also


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



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