OpenMS
Loading...
Searching...
No Matches
MSImagingExperiment.h
Go to the documentation of this file.
1// Copyright (c) 2002-present, OpenMS Inc. -- EKU Tuebingen, ETH Zurich, and FU Berlin
2// SPDX-License-Identifier: BSD-3-Clause
3//
4// --------------------------------------------------------------------------
5// $Maintainer: Timo Sachsenberg $
6// $Authors: Timo Sachsenberg $
7// --------------------------------------------------------------------------
8
9#pragma once
10
16
17namespace OpenMS
18{
29 class OPENMS_DLLAPI MSImagingExperiment final
30 {
31 public:
33
39
52
56
60
66
70
74
80
84
88
95 bool hasPixel(UInt x, UInt y) const;
96
107
117 const MSSpectrum& getSpectrum(UInt x, UInt y) const;
118
141 IonImage extractIonImage(double mz, double tolerance_ppm) const;
142
147 void validate() const;
148
149 private:
152 };
153
154} // namespace OpenMS
Dense W x H grid of ion intensities with a per-pixel mask.
Definition IonImage.h:31
In-Memory representation of a mass spectrometry run.
Definition MSExperiment.h:49
In-memory model for a 2D imaging mass spectrometry dataset.
Definition MSImagingExperiment.h:30
Size getNumberOfPixels() const
Number of pixels in the geometry.
MSExperiment experiment_
Definition MSImagingExperiment.h:150
MSImagingGeometry geometry_
Definition MSImagingExperiment.h:151
MSExperiment & getMSExperiment()
Mutable access to the owned MSExperiment.
bool hasPixel(UInt x, UInt y) const
Tests pixel presence at (x, y).
void setGeometry(MSImagingGeometry geom)
Replaces the owned geometry.
const MSSpectrum & getSpectrum(UInt x, UInt y) const
Read access to the spectrum bound to the pixel at (x, y).
MSImagingExperiment(MSExperiment exp)
Constructs an MSImagingExperiment wrapping exp with an empty geometry.
MSImagingGeometry & getGeometry()
Mutable access to the owned geometry.
MSSpectrum & getSpectrum(UInt x, UInt y)
Mutable access to the spectrum bound to the pixel at (x, y).
Size getNumberOfSpectra() const
Number of spectra in the underlying experiment.
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...
const MSImagingGeometry & getGeometry() const
Read access to the owned geometry.
MSImagingExperiment & operator=(MSExperiment exp)
Replaces the owned MSExperiment and resets the geometry.
void setMSExperiment(MSExperiment exp)
Replaces the owned MSExperiment.
void validate() const
Validates that every pixel references an in-range spectrum_index.
const MSExperiment & getMSExperiment() const
Read access to the owned MSExperiment.
Pixel grid metadata and (x, y) -> spectrum_index lookup for MSI data.
Definition MSImagingGeometry.h:31
The representation of a 1D spectrum.
Definition MSSpectrum.h:44
unsigned int UInt
Unsigned integer type.
Definition Types.h:64
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition Types.h:97
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19