LoadEnviDataToMemory

Declaration: LoadEnviDataToMemory (FName: string; SpecType: TLayerType; var Data: TDouble3DArray; MetaData: TMetaData; var PixMask: TInt2DArray; MirrorY: boolean; FeedBack: boolean): integer;
The function LoadEnviDataToMemory loads a dataset stored in the ENVI format into memory. The parameter FName specifies the full file path of the ENVI dataset. The parameter SpecType determines the type of expected spectra (the type of spectra in an ENVI file is not fully specified in the ENVI header file, thus you have to specify it yourself). It may assume one of the following values:
ctUndefined .... undefined/unknown property type
ctIRspec ....... IR spectrum
ctMSPos ........ MS positive spectrum (lines)
ctMSPosRaw ..... MS positive spectrum (continuous)
ctMSNeg ........ MS negative spectrum (lines)
ctMSNegRaw ..... MS negative spectrum (continuous)
ctMSsim ........ MS single ion monitoring (lines)
ctRaman ........ Raman spectrum
ctUvVis ........ UV/VIS/NIR spectrum
ctColor ........ individual color
ctRGBcolors .... red green and blue from a color image (always three layers!)
ctBwImg ........ black and white image (gray scale 0..255 per pixel)
ctPixMask ...... pixel mask (deprecated!! masks are managed in an extra structure from version 1.0 upwards)
ctPhysProp ..... physical properties
ctTHzSpec ...... THz spectrum
ctImpulse ...... impulse over time
ctOESRaw ....... optical emission spectroscopy (single lines)
ctOESsl ........ optical emission spectroscopy (single lines)
ctEDX .......... energy dispersive xray
ctSIMS ......... SIMS lines
ctAFM .......... AFM layers
ctIRdiscrete ... discrete infrared lines
ctClassMap ..... classification results
ctChemMap ...... chemical map
ctSpecDesc ..... spectral descriptor
ctPhaseSpec .... phase spectrum
ctMagSpec ...... magnitude spectrum
ctPowerSpec .... power spectrum
ctLibsRaw ...... LIBS raw data (continuous spectrum)
ctLibssl ....... LIBS single line data
ctInvalid ...... indicates an invalid layer type

The variable parameter Data is the array which contains the binary data after importing it, the parameter MetaData contains the meta data and the variable parameter PixMask contains the pixelmask of the data. The parameter Feedback controls whether a visual feedback is provided during the import of the data. The parameter MirrorY allows to mirror the image in y direction. The function returns the following error codes:

 0 ... everything is OK, variable parameters are filled accordingly
-1 ... the file does not exist
-2 ... the file is not an ENVI header file
-3 ... the time stamp specification does not conform to the expected format
-4 ... unrecognized file type
-5 ... the size of the binary file does not match the header specifications
-6 ... the binary file contains an invalid number (NaN)
-7 ... the binary file contains an infinite number
-8 ... the binary file contains complex numbers


Last Update: 2018-Mai-02