This task queries a spectral library, returning the names of all spectra in the library.
Example
e = ENVI(/HEADLESS)
specLibFile = FILEPATH('veg_2grn.sli', ROOT_DIR=e.ROOT_DIR, $
SUBDIR=['resource', 'speclib', 'veg_lib'])
specLib = ENVISpectralLibrary(specLibFile)
Task = ENVITask('QuerySpectralLibrary')
Task.INPUT_SPECTRAL_LIBRARY = specLib
Task.Execute
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:
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
TAGS
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
API Version
4.3
See Also
ENVITask, ENVISpectralLibrary, ResampleSpectrum Task, GetSpectrumFromLibrary Task