OpenMS
Loading...
Searching...
No Matches
ImzMLSpectrumIndex Struct Reference

Per-spectrum binary index entry for an imzML dataset. More...

#include <OpenMS/FORMAT/HANDLERS/ImzMLHandlerHelper.h>

Classes

struct  AuxArray
 Index entry for one auxiliary (non-m/z, non-intensity) external array. More...
 

Public Types

enum class  DataType : uint8_t {
  FLOAT32 , FLOAT64 , INT32 , INT64 ,
  UNKNOWN
}
 Scalar type identifier for binary array elements. More...
 

Public Attributes

int32_t index {0}
 0-based document order
 
uint32_t x {0}
 Pixel column (1-based, IMS:1000050)
 
uint32_t y {0}
 Pixel row (1-based, IMS:1000051)
 
uint32_t z {1}
 Depth slice (1-based, IMS:1000052)
 
uint64_t mz_offset {0}
 Byte offset of m/z array (IMS:1000102)
 
uint64_t mz_length {0}
 Element count (IMS:1000103)
 
DataType mz_type {DataType::UNKNOWN}
 
bool mz_compressed {false}
 Compressed (not MS:1000576) on m/z array.
 
uint64_t int_offset {0}
 Byte offset of intensity array.
 
uint64_t int_length {0}
 Element count.
 
DataType int_type {DataType::UNKNOWN}
 
bool int_compressed {false}
 Compressed (not MS:1000576) on intensity array.
 
std::vector< AuxArray > aux
 Extra external arrays (IM, …) in document order.
 

Detailed Description

Per-spectrum binary index entry for an imzML dataset.

Records the byte offset and element count for the m/z and intensity arrays in the companion .ibd file, together with the pixel (x,y,z) coordinates and zlib-compression flags (MS:1000574). Built during ImzMLHandler parsing and stored inside OnDiscImzMLExperiment so that random-access spectrum decoding requires only a single fseek + fread per call. Compressed m/z, intensity, and auxiliary arrays (any child of MS:1000572 other than uncompressed MS:1000576) are rejected at decode time (inflate / numpress of external arrays is not supported).

Optional aux entries describe additional external arrays (ion mobility and other FloatDataArray values). Both in-memory ImzMLFile::load and OnDiscImzMLExperiment::getSpectrum() attach those as FloatDataArray on the returned spectrum when present.


Class Documentation

◆ OpenMS::ImzMLSpectrumIndex::AuxArray

struct OpenMS::ImzMLSpectrumIndex::AuxArray

Index entry for one auxiliary (non-m/z, non-intensity) external array.

Used for ion mobility and other per-peak FloatDataArrays so on-disc and in-memory loaders expose the same viewer contract (containsIMData(), equal length to peaks).

Class Members
string accession MS accession (e.g. MS:1003006), may be empty.
bool compressed {false} Child of MS:1000572 other than MS:1000576 (unsupported)
uint64_t encoded_bytes {0} IMS:1000104 byte length on disk.
uint64_t length {0} IMS:1000103 element count.
string name Ontology / free-text array name (FloatDataArray::getName)
uint64_t offset {0} IMS:1000102.
DataType type {DataType::UNKNOWN}
string unit_accession unitAccession on the array-identity cvParam (may be empty)

Member Enumeration Documentation

◆ DataType

enum class DataType : uint8_t
strong

Scalar type identifier for binary array elements.

Enumerator
FLOAT32 
FLOAT64 
INT32 
INT64 
UNKNOWN 

Member Data Documentation

◆ aux

std::vector<AuxArray> aux

Extra external arrays (IM, …) in document order.

◆ index

int32_t index {0}

0-based document order

◆ int_compressed

bool int_compressed {false}

Compressed (not MS:1000576) on intensity array.

◆ int_length

uint64_t int_length {0}

Element count.

◆ int_offset

uint64_t int_offset {0}

Byte offset of intensity array.

◆ int_type

◆ mz_compressed

bool mz_compressed {false}

Compressed (not MS:1000576) on m/z array.

◆ mz_length

uint64_t mz_length {0}

Element count (IMS:1000103)

◆ mz_offset

uint64_t mz_offset {0}

Byte offset of m/z array (IMS:1000102)

◆ mz_type

◆ x

uint32_t x {0}

Pixel column (1-based, IMS:1000050)

◆ y

uint32_t y {0}

Pixel row (1-based, IMS:1000051)

◆ z

uint32_t z {1}

Depth slice (1-based, IMS:1000052)