Conversion helpers between FIFF annotations and the integer stim-channel event list used by epoching / averaging. More...
#include "fiff_global.h"#include "fiff_annotations.h"#include <QMap>#include <QString>#include <Eigen/Core>

Go to the source code of this file.
Namespaces | |
| namespace | FIFFLIB |
| FIFF file I/O, in-memory data structures and high-level readers/writers. | |
Functions | |
| FiffAnnotations | FIFFLIB::annotationsFromEvents (const Eigen::MatrixXi &events, double sfreq, const QMap< int, QString > &eventDescriptions=QMap< int, QString >(), int firstSample=0) |
| Eigen::MatrixXi | FIFFLIB::eventsFromAnnotations (const FiffAnnotations &annotations, double sfreq, const QMap< QString, int > &eventIds=QMap< QString, int >(), int firstSample=0) |
| QMap< QString, int > | FIFFLIB::countAnnotations (const FiffAnnotations &annotations) |
Conversion helpers between FIFF annotations and the integer stim-channel event list used by epoching / averaging.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2026 MNE-CPP Authors
Two representations coexist in MNE workflows: free-text FiffAnnotation entries (onset / duration / description) and integer (sample, prev, code) event triples extracted from a stim channel or fed to mne.Epochs. These free functions translate between the two: mapping annotation descriptions to event codes via a description→code table, exploding annotation durations into start / stop event pairs, and the reverse aggregation. They mirror mne.events_from_annotations and mne.annotations_from_events in MNE-Python.
Definition in file fiff_annotation_event_utils.h.