Spectral Collection Data Format

A spectral collection is a collection of spectra associated with a particular HSI data cube. The spectral collection is stored as a text file, its filename is derived from the data cube by replacing the '.ilab' file extension by '.scll'. The general structure of the data file is as follows: the first few keywords describe the collection. Afterwards each spectrum and its associated parameters are stored.

The following list defines all the keywords which are used to store the spectral collection.

Keyword Parameter Explanation
#iscPosX xcoord The x-coordinate of the spectrum (in pixels)
#iscPosY ycoord The y-coordinate of the spectrum (in pixels)
#iscPosT tslot The time-coordinate of the spectrum. The parameter tslot specified the index of the time slot.
#iscCItemType param The type of the spectral data. This parameter param may assume one of the following values:
ciPixel the spectrum represents a single pixel
ciCircArea the spectrum is the mean spectrum of a circular area, the center of the circle is given by #iscPosX and #iscPosY, its center by #iscRadius
ciPolygon the spectrum is the mean spectrum of a polygonal area. The first vertex of the polygon is given by #iscPosX and #iscPosY, the remaining vertices are stored as difference coordinates in the keyword #iscBoundary.
ciReference the spectrum has been imported as a reference spectrum.
#iscBoundary cnt The specification of a closed boundary line which is given by cnt+1 vertices. The polygonal boundary line is defined by the starting point given by #iscPosX and #iscPosY and cnt edge vectors which are stored line by line after this keyword. The edge vectors are defined by relative coordinates (dx, dy) which are calculated by subtracting the starting position of an edge from its endpoint. The dx and dy values are separated by a blank.
#iscClassNr cl The class number of the spectrum. The parameter cl may take values between 0 and 255.
#iscCalib NCalLines The wavelength calibration of the spectra. If this keyword is undefined or the parameter NCalLines is zero, the calibration is taken from the metadata of the associated data file. The calibration is valid for all spectra of the spectral collection. The parameter NCalLines defines the number of calibration sets following the keyword. As spectral data may consist of several different types of spectra, the calibration parameters may consist of several calibration sets. Each set is stored in a single line and consists of the following parameters (separated by blanks):
  • range of the calibration set (first and last index)
  • spectral group number
  • type of the spectrum(1)
  • the order of the derivative (normally zero, non-zero only if a derived spectrum is stored)
  • reverse flag
  • calibration coefficients a0 to a6 of the centered calibration polynomial
  • scaling factor(2)
  • shift parameter of the centered polynomial
  • coefficients a0 to a6 of the centered inverse calibration polynomial
  • inverse scaling factor(2)
  • shift parameter of the centered inverse polynomial
#iscCaption text The caption of the spectrum
#iscCategs text The user-defined categories assigned to the spectrum. Categories are defined using the syntax '<catix=value>'. The number of specified categories per spectrum can be from zero to the maximum of 20. The category index catix can assume any number between 1 and 20, the value parameter is a string defining the value of the particular category. Categories for spectral collections can be defined individually for each spectral collection. The default categories are defined in the system-wide settings.
#iscColor color The color of the spectrum as a hexadecimal RGB value. Please note that the color of a spectrum may be replaced by the corresponding class color (depending on the window which displays the spectrum)
#iscRadius radius Defines the radius of the circular area in the case of #iscCItemType is ciCircArea.
#iscSpectrum nlayers The spectral data of the collection item. The keyword is followed by the number of layers. The following nlayer lines contain the spectral intensities and their standard deviation (if iscVersion is > 1). If the spectrum is not a mean spectrum the standard deviation is indicated by zero values.
#iscNItems nitems The number of spectra in the collection
#iscItemIx idx The index of the spectrum. Please note that the index of the spectrum may vary when the spectral collection is edited. A permanent and unique identifier is provided by the item ID (keyword iscItemID).
#iscItemId id A unique item identifier (integer number between 1 and 231-1)
#iscEndOfItem 0 Signals the end of the data of a collection item.
#iscVersion versnum The version number of the data format.
#iscIlabFName fname The filename (full path) of the associated data cube. Unlesss the calibration is specified by the keyword iscCalib the filename of the dataset is used to extract the wavelength calibration from the corresponding metadata definition.
#iscCatDefs numcats The definition of the categories. This keyword is followed by numcats lines, each defining a particular category. The individual categories are specified using the format cat=identifier|type|comment|preset|sorted, with cat being the category number (1..20). The various specifications are separated by pipe symbols and are defined as follows:
identifier The name of the category. This identifier is displayed in the header of the spectral collection table and can be used to search for specific categories.
type The type of the category. Supported types are: integer, double, string, hexint, boolean. Please note that categories are always stored as strings disregarding the particular type. However, the type specifier controls the user interface when editing a category.
comment The comment is displayed as a hint when editing the categories of a spectral entry.
preset Defines often used values. The preset values have to be separated by semicolons.
sorted Determines whether preset values are displayed in sorted order.
#iscClassIds numclasses The definition of the class names. This keyword is followed by numclasses lines, each defining the name of a particular class. The individual class names are specified using the format cls=caption, with cls being the class number (0..255) and caption being the class name.
#iscFlagNames numflags The definition of the status flag names. This keyword is followed by numflags lines, each defining a particular flag. The individual flags are specified using the format flg=caption, with flg being the flag number (0..15) and caption being the flag name.
#iscFlags status The 16 status flags encoded as a 16bit hexadecimal integer (0000...FFFF)
#iscTimeStamp time The date and time when the spectrum has been added to the collection (format yyyy-MM-dd HH:mm:ss)


The following example shows the data file of a collection which contains three spectra. The first spectrum is the spectrum of an individual pixel, the second spectrum is the mean spectrum of a circular area and the third spectrum is the mean spectrum of a polygonal area. The lists of spectral intensities have been shortened for brevity.

#iscVersion 1
#iscIlabFName H:\imagelab_data\fungi\fungi_gewaschen.ilab
#iscNItems 3
#iscClassIds 0
#iscFlagNames 15

#iscItemIx 0
#iscPosX 24
#iscPosY 36
#iscPosT 1
#iscClassNr 1
#iscCaption background
#iscColor 00000000
#iscFlags 00000002
#iscTimeStamp 2016-04-28 10:09:07
#iscCItemType ciPixel
#iscSpectrum 1024
... (removed for brevity)
#iscEndOfItem 0

#iscItemIx 1
#iscPosX 12
#iscPosY 24
#iscPosT 1
#iscClassNr 2
#iscCaption suspicious spot
#iscCategs <1=problematic><4=N. Smith>
#iscColor 00000000
#iscFlags 00000004
#iscTimeStamp 2016-05-02 01:29:33
#iscCItemType ciCircArea
#iscRadius 10
#iscSpectrum 1024
... (removed for brevity)
#iscEndOfItem 0

#iscItemIx 2
#iscPosX 21
#iscPosY 3
#iscPosT 1
#iscClassNr 2
#iscCaption empty hyphen
#iscColor 00000000
#iscFlags 00000002
#iscTimeStamp 2016-05-03 11:19:51
#iscCItemType ciPolygon
#iscBoundary 21
-1 0
-1 -1
-1 0
0 -1
-1 0
0 -1
-1 0
0 -1
-1 0
0 -4
2 0
0 -1
2 0
0 -1
4 0
2 3
1 1
0 4
-1 0
-1 1
0 1
#iscSpectrum 1024
... (removed for brevity)
#iscEndOfItem 0

(1) Currently, the following identifiers for the spectral type are available:
afm          atomic force microscope
bwimg        black & white image (gray scale image)
classmap     classification results
color        individual color
edx          energy dispersive xray spectrum (single lines)
impulse      signal over time
irdiscrete   IR spectrum at discrete wavelengths
                (irregular spacing of wave numbers)
irspec       IR spectrum
magspec      magnitude spectrum
mspec        MS spectrum (typically organic mass spectrometry,
                or GC/MS, or HPLC/MS)
mssim        individual MS intensities (typically selected ion
                monitoring, or inorganic MS, e.g. ICP/MS)
oessl        optical emission spectroscopy (single lines)
phasespec    phase spectrum
physprop     physical properties
pixmask      pixel masks (deprecated)
powerspec    power spectrum
raman        Raman spectrum
rgbcolors    red, green, and blue from a color image
                (always three layers!)
sims         secondary ion mass spectrometry
specdesc     spectral descriptor
thzspec      THz spectrum
undefined    undefined/unknown property type
uvvis        uv / visible / near infrared spectrum
(2) The scaling factor f is required to handle higher order polynomials without numerical problems in the case of large numeric values of the spectral axis.