A spatial region within an MSI dataset, in global pixel coordinates.
Definition MSImagingRegion.h:30
Shape getShape() const
Region shape (Rectangle or Mask).
const std::string & getName() const
Region name.
UInt getBBoxWidth() const
Bounding box width in pixels (max_x - min_x + 1).
std::string name_
Definition MSImagingRegion.h:132
Shape
Discriminates how a region's footprint is represented.
Definition MSImagingRegion.h:34
bool intersects(const MSImagingRegion &other) const
Tests whether this region's footprint geometrically overlaps other.
UInt getMinX() const
Leftmost column of the global bounding box (inclusive).
std::vector< bool > mask_
Definition MSImagingRegion.h:133
UInt getBBoxHeight() const
Bounding box height in pixels (max_y - min_y + 1).
const std::vector< bool > & getMask() const
Bbox-local row-major bitmask; empty for a Rectangle.
Size area() const
Number of pixels inside the region.
Size getId() const
Region identifier.
static MSImagingRegion fromMask(Size id, const std::string &name, UInt origin_x, UInt origin_y, UInt width, UInt height, std::vector< bool > mask)
Creates a masked region from a row-major bitmask over a bounding box.
static MSImagingRegion rectangle(Size id, const std::string &name, UInt min_x, UInt min_y, UInt max_x, UInt max_y)
Creates a rectangular region spanning the inclusive bounding box.
UInt getMinY() const
Top row of the global bounding box (inclusive).
UInt getMaxY() const
Bottom row of the global bounding box (inclusive).
UInt getMaxX() const
Rightmost column of the global bounding box (inclusive).
bool contains(UInt x, UInt y) const
Tests whether the global coordinate (x, y) is inside the region.
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