QuerySpectralLibrary Task

This task queries a spectral library, returning the names of all spectra in the library.

Example

; Start the application

e = ENVI(/HEADLESS)

 

; Open a spectral library from the distribution

specLibFile = FILEPATH('veg_2grn.sli', ROOT_DIR=e.ROOT_DIR, $

  SUBDIR=['resource', 'speclib', 'veg_lib'])

specLib = ENVISpectralLibrary(specLibFile)

 

; Get the task from the catalog of ENVITasks

Task = ENVITask('QuerySpectralLibrary')

 

; Define inputs

Task.INPUT_SPECTRAL_LIBRARY = specLib

 

; Run the task

Task.Execute

 

; Print the first spectrum name

PRINT, Task.SPECTRA_NAMES[0]

IDL prints:

Arroyo Willow

Syntax

Result = ENVITask('QuerySpectralLibrary')

Input parameters (Set, Get): INPUT_SPECTRAL_LIBRARY

Output parameters (Get only): SPECTRA_NAMES

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

Specify a spectral library from which to retrieve spectra names.

Output Parameters

SPECTRA_NAMES

A string array containing all spectra names for the input spectral library.

Methods

Execute

Parameter

ParameterNames

Properties

DESCRIPTION

DISPLAY_NAME

NAME

REVISION

TAGS

Version History

ENVI 5.3

Introduced

See Also

ENVITask, ENVISpectralLibrary, ResampleSpectrum Task, GetSpectrumFromLibrary Task