NAG C++ classes for Hyperspectral Imaging
0.1
|
This class contains a function which reads in a configuration file and creates a new nag::SIMSpecImage of nag::MALDISpecImage object accordingly. More...
#include <SpecImageFactory.hpp>
Static Public Member Functions | |
static SpecImage< FPType > * | NewSpecImage (const std::string &config) |
Static factory function to return an object of the type decided by the contents of a configuration file. More... | |
This class contains a function which reads in a configuration file and creates a new nag::SIMSpecImage of nag::MALDISpecImage object accordingly.
|
static |
Static factory function to return an object of the type decided by the contents of a configuration file.
Returns either a nag::SIMSpecImage or a nag::MALDISpecImage object, depending on the contents of the input configuration file named by the string config.
The config file has the following syntax for nag::SIMSpecImage types. Items in brackets are optional:
tofs = <path to time-of-flight data file> [coords = <path to coordinates data file>] [scans = <path to scans data file>] [props = <path to properties text file>] [limits = <path to limits text file>] [mem = <integer number of bytes to use as memory limit. Default = 0 (i.e. no memory limit).>] [xbin = <integer bin size in x dimension>] [ybin = <integer bin size in y dimension>] [zbin = <integer bin size in z dimension>] [tofbin = <integer bin size for channels (ToF values)>] [K0 = <integer K0 calibration constant>] [SF = <integer SF calibration constant>] [NPP = <integer total number of primary pulses over whole image>]
Note that values given in the properties file take precedence over those defined directly in the config file.
The config file has the following syntax for nag::MALDISpecImage types:
imzml = <path to ImzML input file> [limits = <path to limits text file>] [mem = <integer number of bytes to use as memory limit. Default = 0 (i.e. no memory limit).>] [xbin = <integer bin size in x dimension>] [ybin = <integer bin size in y dimension>] [zbin = <integer bin size in z dimension>] [mzbin = <real bin size for channels (m/z values)>]
Any line in the configuration file starting with # is commented. File paths may be delimited within single quotes.
Limits files have the following format: the first line is ignored (treated as a header), the following lines are read as 2-column space-separated intervals such that, on line n, the first value is the lower limit, and the second value is the upper limit of the (n-1)th peak selection interval. If the values contain a decimal point they are taken to be limits expressed as m/z values; if they do not they are taken to be expressed as ToF values (the latter is valid only for SIMS input).
Below is an example of a ToF limits file defining 4 peaks:
lower limit upper limit 121520 121572 126413 126439 126441 126484 131160 131206
Below is an example of a m/z limits file defining 4 peaks:
lower limit upper limit 3.219190 3.221899 3.479011 3.480419 3.480527 3.482856 3.740715 3.743297
A more detailed discussion of these options can be found in the respective class constructors, and a discussion of the limited memory option (mem) can be found in the class introductions.