14#include <unordered_map>
62 void setPixelSize(
double x,
double y,
const std::string& unit =
"micrometer");
118 double pixel_size_x_ = 1.0;
119 double pixel_size_y_ = 1.0;
120 std::string pixel_size_unit_ =
"micrometer";
Pixel grid metadata and (x, y) -> spectrum_index lookup for MSI data.
Definition MSImagingGeometry.h:31
Size getNumberOfPixels() const
Total number of pixels with a bound spectrum.
double getPixelSizeY() const
Physical pixel size along y.
static UInt64 packKey_(UInt x, UInt y)
bool hasPixel(UInt x, UInt y) const
Tests pixel presence at (x, y).
const std::vector< Pixel > & getPixels() const
Pixels in insertion order.
UInt getWidth() const
Image width.
void addPixel(UInt x, UInt y, Size spectrum_index)
Adds a pixel at (x, y) bound to spectrum_index.
Size getSpectrumIndex(UInt x, UInt y) const
Looks up the spectrum index at (x, y).
std::vector< Pixel > pixels_
Definition MSImagingGeometry.h:121
void setPixelSize(double x, double y, const std::string &unit="micrometer")
Records the physical pixel size and its unit.
void setDimensions(UInt width, UInt height)
Sets the image dimensions.
std::unordered_map< UInt64, Size > lookup_
Definition MSImagingGeometry.h:122
UInt getHeight() const
Image height.
void clear()
Resets all state (dimensions, pixel size, pixels, lookup).
const std::string & getPixelSizeUnit() const
Unit for the pixel size.
double getPixelSizeX() const
Physical pixel size along x.
A pixel in the imaging grid, linked to one spectrum in the experiment.
Definition MSImagingGeometry.h:35
uint64_t UInt64
Unsigned integer type (64bit)
Definition Types.h:47
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