ImportAnalyze75Data

Declaration: ImportAnalyze75Data (FName: string; SpecType: TAna75SpecTypes; DefaultDimOrder: TAna75DimOrder; MirrorY, FeedBack: boolean): integer;
Imports a data file stored in the Analyze 7.5 (A75) format. The parameter FName specifies the full file path of the A75 dataset. The parameter SpecType determines the type of expected spectra (the type of spectra in an A75 file is not specified in the A75 header file, thus you have to specify it yourself). It may assume one of the following values:
stUnknown ... undefined/unknown layer type
stIRspec ... IR spectrum
stMSpec ... MS spectrum
stRaman ... Raman spectrum
stUvVis ... uv / visible / nir spectrum
stRGBcolors ... red, green, and blue from a color image (always three layers!)
stTHzSpec ... THz spectrum
stImpulse ... impulse over time
stOESsl ... optical emission spectroscopy (single lines)
stSIMS ... SIMS lines
stIRdiscrete ... discrete infrared lines

Many software implementations for saving data in Analyze 7.5 format do not store the information how the axes are assigned to the indices of the data matrix. Thus you have to specify the default assignment in the parameter DefaultDimOrder. If the assignment of the axes is not specified in the A75 header file the assignment is taken from this parameter.

The parameter Feedback controls whether a visual feedback is provided during the import of the data. Please note that unless the script progress bar is already visible you have to make it visible before calling ImportAnalyze75Data, otherwise the feedback will not be displayed. You can activate the script progress bar by calling the function ScriptBar(0).

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 Analyze 7.5 header file
-3 ... dataset does not contain regular data points
-4 ... number of dimensions in dataset must be 3 or 4
-5 ... not enough memory
-7 ... invalid description