FIFF binary tag-stream layer: wraps a QIODevice to read and write FIFF tags, directories, blocks and the structured records nested inside them. More...
#include "fiff_global.h"#include "fiff_types.h"#include "fiff_id.h"#include "fiff_dir_node.h"#include "fiff_dir_entry.h"#include <Eigen/Core>#include <Eigen/SparseCore>#include <QByteArray>#include <QDataStream>#include <QIODevice>#include <QList>#include <QSharedPointer>#include <QString>#include <QStringList>#include <memory>

Go to the source code of this file.
Classes | |
| class | FIFFLIB::FiffStream |
| FIFF tag-stream reader/writer: wraps a QIODevice and exposes typed read_* / write_* methods for every FIFF block and record kind. More... | |
Namespaces | |
| namespace | FIFFLIB |
| FIFF file I/O, in-memory data structures and high-level readers/writers. | |
FIFF binary tag-stream layer: wraps a QIODevice to read and write FIFF tags, directories, blocks and the structured records nested inside them.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2012-2026 MNE-CPP Authors
FiffStream is the workhorse of FIFFLIB. It owns a QIODevice (typically a QFile or a QTcpSocket for realtime), reads and writes the 16-byte FIFF tag header, decodes payloads through the endian-swap helpers in fiff_byte_swap.h, and assembles the directory and block tree on the way in. The high-level methods then trade tag streams for typed objects: read_meas_info returns a FiffInfo, read_raw_data returns a FiffRawData, read_evoked returns a FiffEvoked, read_cov returns a FiffCov, etc. On the writing side start_writing_raw, write_tag, write_int / write_float / write_float_matrix, start_block / end_block and the record-level writers (write_id, write_ch_info, write_coord_trans, ...) emit a fully spec-compliant FIFF file that round-trips through MNE-Python and MNE-C unchanged.
Inheriting from QDataStream gives the class transparent access to the Qt I/O byte ordering / device abstraction while keeping the rest of FIFFLIB Qt-agnostic at the API boundary.
Definition in file fiff_stream.h.