MnaRecording
Namespace: MNALIB · Library: MNA Library
#include <mna/mna_recording.h>
struct MNALIB::MnaRecording
Groups files belonging to one recording run.
src/examples/ex_mna/main.cpp
MnaFileRef raw;
raw.role = MnaFileRole::Raw;
raw.path = "sub-01/ses-01/meg/sample_audvis_raw.fif"; // relative POSIX path
raw.format = "fiff";
MnaRecording recording;
recording.id = "run-01";
recording.files.append(raw);
MnaSession session;
session.id = "ses-01";
session.recordings.append(recording);
MnaSubject subject;
subject.id = "sub-01";
subject.freeSurferDir = "subjects/sample";
subject.sessions.append(session);
MnaScript report; // a script node: inline code run by an interpreter
report.language = "python";
report.code = "print({{in}})";
Public Methods
toJson()
Serialize to QJsonObject.
Returns:
- QJsonObject — JSON object with the recording id, its file references and preserved extras.
toCbor()
Serialize to QCborMap.
Returns:
- QCborMap — CBOR map with the recording id, its file references and preserved extras.
Static Methods
fromJson(json)
Deserialize from QJsonObject.
Parameters:
- json : const QJsonObject &
JSON object as produced by
toJson().
Returns:
- MnaRecording — The recording; missing keys take default values and unknown keys go to extras.
fromCbor(cbor)
Deserialize from QCborMap.
Parameters:
- cbor : const QCborMap &
CBOR map as produced by
toCbor().
Returns:
- MnaRecording — The recording; missing keys take default values and unknown keys go to extras.
Example
- Full source:
src/examples/ex_mna/main.cpp - Build target:
ex_mna(runs under CTest)
Used in examples
ex_mna
MNA library: register operations, build and run a graph, bind parameters and save a project.
src/examples/ex_mna/main.cpp, line 194
raw.role = MnaFileRole::Raw;
raw.path = "sub-01/ses-01/meg/sample_audvis_raw.fif"; // relative POSIX path
raw.format = "fiff";
MnaRecording recording;
recording.id = "run-01";
recording.files.append(raw);
MnaSession session;
session.id = "ses-01";
session.recordings.append(recording);
MnaSubject subject;
subject.id = "sub-01";
subject.freeSurferDir = "subjects/sample";
subject.sessions.append(session);
MnaScript report; // a script node: inline code run by an interpreter
Authors of this file
- Christoph Dinh <christoph.dinh@mne-cpp.org>