MSImagingGeometry#
- class pyopenms.MSImagingGeometry#
Bases:
objectPixel grid metadata and (x, y) -> spectrum_index lookup for MSI data.
Coordinates are zero-based. Use pixels_struct() for a zero-copy structured numpy view of all pixels at once.
- __init__() None#
- __init__(arg: pyopenms.MSImagingGeometry, /) None
Methods
__init__()addPixel(x, y, spectrum_index)Adds a pixel at (x, y) bound to spectrum_index.
addRegion(region)clear()getRegion(id)getRegionPixels(id)getSpectrumIndex(x, y)getWidth()hasPixel(x, y)Zero-copy structured numpy array with fields 'x' (uint32), 'y' (uint32), 'spectrum_index' (uint64).
regionOf(x, y)removeRegion(id)setDimensions(width, height)setPixelSize(x, y, unit)Attributes
- NO_REGION = 18446744073709551615#
- addPixel(x: int, y: int, spectrum_index: int) None#
Adds a pixel at (x, y) bound to spectrum_index.
- addRegion(region: pyopenms.MSImagingRegion) None#
- clear() None#
- clearRegions() None#
- getHeight() int#
- getNumberOfPixels() int#
- getNumberOfRegions() int#
- getPixelSizeUnit() str#
- getPixelSizeX() float#
- getPixelSizeY() float#
- getRegion(id: int) pyopenms.MSImagingRegion#
- getRegionPixels(id: int) list[int]#
- getRegionSpectrumIndices(id: int) list[int]#
- getRegions() list[pyopenms.MSImagingRegion]#
- getSpectrumIndex(x: int, y: int) int#
- getWidth() int#
- hasPixel(x: int, y: int) bool#
- pixels_struct() object#
Zero-copy structured numpy array with fields ‘x’ (uint32), ‘y’ (uint32), ‘spectrum_index’ (uint64).
- regionOf(x: int, y: int) int#
- removeRegion(id: int) None#
- setDimensions(width: int, height: int) None#
- setPixelSize(x: float, y: float, unit: str) None#