SaveEnviSpecLib

Declaration: SaveEnviSpecLib (FName: string; Description: string; Endian: TEndian; SpecNames: TStrArray; SpecType: TLayerType; SpecData: TDouble2DArray; WaveLengths: TDoubleArray; FeedBack: boolean): integer;
Saves the spectra in the two-dimensional array SpecData as an ENVI spectral library (the spectra are stored rowwise in the array). The parameter FName specifies the full file path of dataset. The parameter Description contains the description of the library, the parameter Endian controls the endianess of the binary data. The array parameter SpecNames contains the names of the spectra and the WaveLengths array holds the list of wavelength values.

The parameter SpecType determines the spectral type of the library (the type of spectra in an ENVI file is not fully specified in the standard ENVI header file, ImageLab uses the proprietory keyword "sensor type" to store the spectral type. SpecType may assume one of the following values:

ctEDX .......... energy dispersive xray
ctImpulse ...... time domain impulse
ctImpulse ...... impulse over time
ctIRdiscrete ... discrete infrared lines
ctIRspec ....... IR spectrum
ctLibsRaw ...... LIBS raw data (continuous spectrum)
ctLibssl ....... LIBS single line data
ctMagSpec ...... magnitude spectrum
ctMSNeg ........ MS negative spectrum (lines)
ctMSNegRaw ..... MS negative spectrum (continuous)
ctMSPos ........ MS positive spectrum (lines)
ctMSPosRaw ..... MS positive spectrum (continuous)
ctMSsim ........ MS single ion monitoring (lines)
ctOESRaw ....... optical emission spectroscopy (single lines)
ctOESsl ........ optical emission spectroscopy (single lines)
ctPhaseSpec .... phase spectrum
ctPowerSpec .... power spectrum
ctRaman ........ Raman spectrum
ctRGBcolors .... RGB color photo
ctSIMS ......... SIMS lines
ctTHzSpec ...... THz spectrum
ctUndefined .... undefined spectral type
ctUvVis ........ UV/VIS/NIR spectrum

The parameter Feedback controls whether a visual feedback is provided during the import of the data. The function returns the following error codes:

 0 ... everything is OK
-1 ... the sizes of SpecNames and SpecData do not match
-2 ... the spectral type not supported
-3 ... the number of wavelengths does not match the length of the spectra


Last Update: 2018-Mai-02