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

Header-only Eigen matrix text I/O — round-trips dense matrices to whitespace-separated ASCII for cross-validation against MNE-Python. More...

#include "utils_global.h"
#include <string>
#include <sstream>
#include <vector>
#include <fstream>
#include <QSharedPointer>
#include <QTextStream>
#include <QFile>
#include <QDebug>
#include <QStringList>
#include <QRegularExpression>
#include <Eigen/Core>
Include dependency graph for ioutils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  UTILSLIB::IOUtils
 Eigen matrix I/O utilities. More...

Namespaces

namespace  UTILSLIB
 Shared utilities (I/O helpers, spectral analysis, layout management, warp algorithms).

Detailed Description

Header-only Eigen matrix text I/O — round-trips dense matrices to whitespace-separated ASCII for cross-validation against MNE-Python.

SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2013-2026 MNE-CPP Authors

Author
Christoph Dinh chris.nosp@m.toph.nosp@m..dinh.nosp@m.@mne.nosp@m.-cpp..nosp@m.org; Lorenz Esch loren.nosp@m.z.es.nosp@m.ch@tu.nosp@m.-ilm.nosp@m.enau..nosp@m.de; Ricky ricky.nosp@m.tjen.nosp@m.@yaho.nosp@m.o.co.nosp@m.m; liminsun limin.nosp@m.sun@.nosp@m.nmr.m.nosp@m.gh.h.nosp@m.arvar.nosp@m.d.ed.nosp@m.u; Juan GPC jgarc.nosp@m.iapr.nosp@m.ieto@.nosp@m.mgh..nosp@m.harva.nosp@m.rd.e.nosp@m.du; Gabriel Motta gabri.nosp@m.elbe.nosp@m.nmott.nosp@m.a@gm.nosp@m.ail.c.nosp@m.om; Andreas Griesshammer ag@fi.nosp@m.eldl.nosp@m.inein.nosp@m.c.co.nosp@m.m
Since
0.1.0
Date
March 2013

UTILSLIB::IOUtils provides a single, overload-rich API for writing and reading Eigen::Matrix instances in plain text with an optional two-line header (rows x cols / description). Every other mne-cpp library, test binary, and example tool uses these helpers when it needs to dump an intermediate matrix to disk for inspection in Python / MATLAB or to compare reference data committed to the bin/ MNE-CPP-Test-Data repository against freshly-computed C++ results.

The class is templated on scalar type and dimensionality (dynamic, row-vector and column-vector specialisations) and accepts both QString and std::string paths so callers can choose whichever string flavour is idiomatic for their surrounding code without an extra conversion.

Definition in file ioutils.h.