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
e = ENVI()
File = Filepath('qb_boulder_msi', Subdir=['data'], $
Root_Dir=e.Root_Dir)
Raster = e.OpenRaster(File)
Task = ENVITask('QuerySpectralIndices')
Task.INPUT_RASTER = Raster
Task.Execute
Task2 = ENVITask('SpectralIndices')
Task2.INPUT_RASTER = Raster
Task2.INDEX = Task.AVAILABLE_INDICES
Task2.Execute
DataColl = e.Data
DataColl.Add, Task2.OUTPUT_RASTER
View = e.GetView()
Layer = View.CreateLayer(Task2.OUTPUT_RASTER)
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
See Also
ENVITask, ENVISpectralIndexRaster, SpectralIndex Task, SpectralIndices Task, ENVISubsetRaster