OpenMS
Loading...
Searching...
No Matches
ImzMLWriter Class Reference

Writer for imzML 1.1.0 files (.imzML + companion .ibd). More...

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

Static Public Member Functions

static void store (const std::string &imzml_path, const MSExperiment &exp, const PeakFileOptions &options, ProgressLogger &logger)
 Store an MSExperiment as imzML + .ibd.
 

Detailed Description

Writer for imzML 1.1.0 files (.imzML + companion .ibd).

Member Function Documentation

◆ store()

static void store ( const std::string &  imzml_path,
const MSExperiment exp,
const PeakFileOptions options,
ProgressLogger logger 
)
static

Store an MSExperiment as imzML + .ibd.

Supports continuous (shared m/z array) and processed (per-spectrum m/z) modes. Pixel coordinates are read from imzml:x/y/z MetaValues on each spectrum (required for export); dataset metadata is taken from experiment MetaValues when present.

Export writes external binary arrays with a 16-byte UUID header in the .ibd file. Binary precision follows PeakFileOptions (getMz32Bit, getIntensity32Bit). PeakFileOptions spectrum/peak filters (MS level, RT, precursor m/z, m/z and intensity ranges, metadata-only, sort-by-m/z) are applied to a temporary copy before export.

Parameters
[in]imzml_pathPath to the output .imzML file.
[in]expExperiment to store (must contain at least one spectrum).
[in]optionsPeak file options (filtering, sort, binary precision).
[in]loggerProgress logger for status output.
Exceptions
Exception::MissingInformationif exp has no spectra or lacks imzml:x/y on any spectrum.
Exception::InvalidValueif pixel coordinates are invalid or duplicate.
Exception::InvalidParameterif continuous export is requested but spectra are incompatible.
Exception::UnableToCreateFileif output files cannot be written.
Exception::ParseErrorif binary array serialization fails.