v2.0.0
Loading...
Searching...
No Matches
fiff_stream.h File Reference

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>
Include dependency graph for fiff_stream.h:
This graph shows which files directly or indirectly include this file:

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.

Detailed Description

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

Author
Christoph Dinh chris.nosp@m.toph.nosp@m..dinh.nosp@m.@mne.nosp@m.-cpp..nosp@m.org; Christof Pieloth pielo.nosp@m.th@l.nosp@m.abp.h.nosp@m.twk-.nosp@m.leipz.nosp@m.ig.d.nosp@m.e; Lorenz Esch loren.nosp@m.z.es.nosp@m.ch@tu.nosp@m.-ilm.nosp@m.enau..nosp@m.de; Gabriel Motta gabri.nosp@m.elbe.nosp@m.nmott.nosp@m.a@gm.nosp@m.ail.c.nosp@m.om; Juan GPC jgarc.nosp@m.iapr.nosp@m.ieto@.nosp@m.mgh..nosp@m.harva.nosp@m.rd.e.nosp@m.du
Since
0.1.0
Date
October 2012

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.