QuerySpectralIndices Task

This task returns a string array of the spectral indices that can be computed for a given input raster, based on its wavelength metadata. Issue the PRINT command on the AVAILABLE_INDICES parameter (see code example) or open the Data Manager in the user interface to see the list of available indices.

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)

 

; Get the task from the catalog of ENVITasks

Task = ENVITask('QuerySpectralIndices')

 

; Define inputs

Task.INPUT_RASTER = Raster

 

; Run the task

Task.Execute

 

; Get the task from the catalog of ENVITasks

Task2 = ENVITask('SpectralIndices')

 

; Define inputs

Task2.INPUT_RASTER = Raster

Task2.INDEX = Task.AVAILABLE_INDICES

 

; Run the task

Task2.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, Task2.OUTPUT_RASTER

 

; Display the result

View = e.GetView()

Layer = View.CreateLayer(Task2.OUTPUT_RASTER)

 

; Print the available indices to the

; ENVI command line

Print, Task.AVAILABLE_INDICES

Syntax

Result = ENVITask('QuerySpectralIndices')

Input parameters (Set, Get): INPUT_RASTER

Output parameters (Get only): AVAILABLE_INDICES

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_RASTER (required)

Specify a raster to query for available spectral indices.

Output Parameters

AVAILABLE_INDICES

A string array with the spectral indices that can be computed for the input raster.

Methods

Execute

Parameter

ParameterNames

Properties

DESCRIPTION

DISPLAY_NAME

NAME

REVISION

TAGS

Version History

ENVI 5.2

Introduced

See Also

ENVITask, ENVISpectralIndexRaster, SpectralIndex Task, SpectralIndices Task, ENVISubsetRaster