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 properties (Set, Get): INPUT_SPECTRAL_LIBRARY
Output properties (Get only): SPECTRA_NAMES
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:
Properties
This task inherits the following properties from ENVITask:
This task also contains the following properties:
INPUT_SPECTRAL_LIBRARY (required)
Specify a spectral library from which to retrieve spectra names.
SPECTRA_NAMES
A string array containing all spectra names for the input spectral library.
Version History
ENVI 5.3 |
Introduced |
API Version
4.2
See Also
ENVITask, ENVISpectralLibrary, ResampleSpectrum Task, GetSpectrumFromLibrary Task