|
| | MSImagingExperiment ()=default |
| |
| | MSImagingExperiment (MSExperiment exp) |
| | Constructs an MSImagingExperiment wrapping exp with an empty geometry.
|
| |
| MSImagingExperiment & | operator= (MSExperiment exp) |
| | Replaces the owned MSExperiment and resets the geometry.
|
| |
| MSExperiment & | getMSExperiment () |
| | Mutable access to the owned MSExperiment.
|
| |
| const MSExperiment & | getMSExperiment () const |
| | Read access to the owned MSExperiment.
|
| |
| void | setMSExperiment (MSExperiment exp) |
| | Replaces the owned MSExperiment.
|
| |
| MSImagingGeometry & | getGeometry () |
| | Mutable access to the owned geometry.
|
| |
| const MSImagingGeometry & | getGeometry () const |
| | Read access to the owned geometry.
|
| |
| void | setGeometry (MSImagingGeometry geom) |
| | Replaces the owned geometry.
|
| |
| Size | getNumberOfPixels () const |
| | Number of pixels in the geometry.
|
| |
| Size | getNumberOfSpectra () const |
| | Number of spectra in the underlying experiment.
|
| |
| bool | hasPixel (UInt x, UInt y) const |
| | Tests pixel presence at (x, y).
|
| |
| MSSpectrum & | getSpectrum (UInt x, UInt y) |
| | Mutable access to the spectrum bound to the pixel at (x, y).
|
| |
| const MSSpectrum & | getSpectrum (UInt x, UInt y) const |
| | Read access to the spectrum bound to the pixel at (x, y).
|
| |
| IonImage | extractIonImage (double mz, double tolerance_ppm) const |
| | Extracts an ion image by summing peak intensities inside [mz - dm, mz + dm], with dm = mz * tolerance_ppm * 1e-6.
|
| |
| IonImage | extractIonImage (double mz, double tolerance_ppm, Size region_id) const |
| | Extracts an ion image by summing peak intensities inside [mz - dm, mz + dm], with dm = mz * tolerance_ppm * 1e-6. Overloaded with region id to extract a specific region only.
|
| |
| void | validate () const |
| | Validates that every pixel references an in-range spectrum_index.
|
| |
| std::vector< Size > | getRegionSpectrumIndices (Size region_id) const |
| | Spectrum indices of the acquired pixels belonging to a region.
|
| |
In-memory model for a 2D imaging mass spectrometry dataset.
Owns an MSExperiment (spectra) and an MSImagingGeometry (pixel grid + pixel -> spectrum index mapping). Provides pixel-based spectrum access and a simple sum-based ion image extraction.
A 3D / serial-section experiment is modeled as a collection of MSImagingExperiment objects, one per section.
| IonImage extractIonImage |
( |
double |
mz, |
|
|
double |
tolerance_ppm |
|
) |
| const |
Extracts an ion image by summing peak intensities inside [mz - dm, mz + dm], with dm = mz * tolerance_ppm * 1e-6.
Preconditions: each referenced spectrum must be sorted by m/z. Phase 2's ImzMLFile loader will guarantee this; Phase 1 callers must ensure it manually.
Pixels not present in the geometry remain invalid in the returned image. Pixels with a spectrum but no peaks in the window are marked valid with intensity 0. The returned image's m/z range is set to [mz - dm, mz + dm].
- Parameters
-
| [in] | mz | m/z center of the extraction window (>= 0). |
| [in] | tolerance_ppm | Half-window width in ppm (>= 0). |
- Returns
- Image of the same dimensions as the geometry.
- Exceptions
-
| IonImage extractIonImage |
( |
double |
mz, |
|
|
double |
tolerance_ppm, |
|
|
Size |
region_id |
|
) |
| const |
Extracts an ion image by summing peak intensities inside [mz - dm, mz + dm], with dm = mz * tolerance_ppm * 1e-6. Overloaded with region id to extract a specific region only.
Preconditions: each referenced spectrum must be sorted by m/z. Phase 2's ImzMLFile loader will guarantee this; Phase 1 callers must ensure it manually.
Pixels not present in the geometry remain invalid in the returned image. Pixels with a spectrum but no peaks in the window are marked valid with intensity 0. The returned image's m/z range is set to [mz - dm, mz + dm].
- Parameters
-
| [in] | mz | m/z center of the extraction window (>= 0). |
| [in] | tolerance_ppm | Half-window width in ppm (>= 0). |
| [in] | region_id | region of pixels to be extracted |
- Returns
- Image of the same dimensions as the geometry.
- Exceptions
-