![]() |
OpenMS
|
Shared .ibd binary array decode utilities for imzML handlers. More...
#include <OpenMS/FORMAT/HANDLERS/ImzMLHandlerHelper.h>
Static Public Member Functions | |
| static void | readMzArray (FILE *ibd, uint64_t offset, uint64_t count, ImzMLSpectrumIndex::DataType dt, std::vector< double > &out, const std::string &ibd_path) |
| Read an m/z array from the companion .ibd file. | |
| static void | readIntArray (FILE *ibd, uint64_t offset, uint64_t count, ImzMLSpectrumIndex::DataType dt, std::vector< float > &out, const std::string &ibd_path) |
| Read an intensity array from the companion .ibd file. | |
| static void | readAuxArray (FILE *ibd, uint64_t offset, uint64_t count, ImzMLSpectrumIndex::DataType dt, std::vector< float > &out, const std::string &ibd_path, const std::string &array_name) |
| Read an auxiliary (non-m/z, non-intensity) array from the .ibd file. | |
| static void | writeFloat32Array (FILE *ibd, const float *data, uint64_t count, const std::string &ibd_path) |
| Write a float32 array to the companion .ibd file (little-endian). | |
| static void | writeMzAsFloat32 (FILE *ibd, const std::vector< double > &mz, const std::string &ibd_path) |
| Write m/z values as float32 to the companion .ibd file. | |
| static void | writeFloat64Array (FILE *ibd, const double *data, uint64_t count, const std::string &ibd_path) |
| Write a float64 array to the companion .ibd file (little-endian). | |
| static void | writeMzAsFloat64 (FILE *ibd, const std::vector< double > &mz, const std::string &ibd_path) |
| Write m/z values as float64 to the companion .ibd file. | |
Shared .ibd binary array decode utilities for imzML handlers.
|
static |
Read an auxiliary (non-m/z, non-intensity) array from the .ibd file.
imzML permits additional binaryDataArray entries per spectrum beyond the mandatory m/z and intensity pair — most notably ion mobility arrays such as MS:1003006 "mean inverse reduced ion mobility array". Values are returned as float because OpenMS stores auxiliary spectrum data in MSSpectrum::FloatDataArray.
| [in] | ibd | Open binary file handle. |
| [in] | offset | Byte offset (IMS:1000102). |
| [in] | count | Element count (IMS:1000103). |
| [in] | dt | Scalar type of stored values. |
| [out] | out | Decoded values as float (FloatDataArray storage). |
| [in] | ibd_path | Path used in error messages. |
| [in] | array_name | Array name used in error messages (e.g. the CV term name). |
IMS:1000104 is then required to know how many compressed bytes to read.| Exception::ParseError | if seek or read fails. |
|
static |
Read an intensity array from the companion .ibd file.
| Exception::ParseError | if seek or read fails. |
|
static |
Read an m/z array from the companion .ibd file.
| [in] | ibd | Open binary file handle. |
| [in] | offset | Byte offset (IMS:1000102). |
| [in] | count | Element count (IMS:1000103). |
| [in] | dt | Scalar type of stored values. |
| [out] | out | Decoded m/z values. |
| [in] | ibd_path | Path used in error messages. |
| Exception::ParseError | if seek or read fails. |
|
static |
Write a float32 array to the companion .ibd file (little-endian).
| Exception::ParseError | if write fails. |
|
static |
Write a float64 array to the companion .ibd file (little-endian).
| Exception::ParseError | if write fails. |
|
static |
Write m/z values as float32 to the companion .ibd file.
| Exception::ParseError | if write fails. |
|
static |
Write m/z values as float64 to the companion .ibd file.
| Exception::ParseError | if write fails. |