FIFF event list: (sample, prev, new) integer triples with read / write / detect / filter helpers.
More...
#include <fiff_events.h>
|
| static bool | read (const QString &t_sEventName, const QString &t_fileRawName, FiffEvents &p_Events) |
| static bool | read_from_fif (QIODevice &p_IODevice, FiffEvents &p_Events) |
| static bool | read_from_ascii (QIODevice &p_IODevice, FiffEvents &p_Events) |
| static bool | detect_from_raw (const FiffRawData &raw, FiffEvents &p_Events, const QString &triggerCh=QString("STI 014"), unsigned int triggerMask=0xFFFFFFFF, bool leadingEdge=true) |
| static bool | matchEvent (const AverageCategory &cat, const Eigen::MatrixXi &events, int eventIdx) |
FIFF event list: (sample, prev, new) integer triples with read / write / detect / filter helpers.
On-disk representation matches mne.io.write.write_events output and the -eve.fif files consumed by mne.read_events; the detection path mirrors mne.find_events. Used by FiffEpochs and the batch-averaging path in FiffEvokedSet to drive epoch extraction.
Definition at line 68 of file fiff_events.h.
◆ FiffEvents() [1/2]
| FIFFLIB::FiffEvents::FiffEvents |
( |
| ) |
|
Default constructor. Creates an empty event set.
◆ FiffEvents() [2/2]
| FIFFLIB::FiffEvents::FiffEvents |
( |
QIODevice & | p_IODevice | ) |
|
|
explicit |
Constructs FiffEvents by reading from an I/O device.
Attempts to read as FIFF first; if that fails, tries ASCII format.
- Parameters
-
| [in] | p_IODevice | The I/O device to read from. |
◆ detect_from_raw()
| bool FIFFLIB::FiffEvents::detect_from_raw |
( |
const FiffRawData & | raw, |
|
|
FiffEvents & | p_Events, |
|
|
const QString & | triggerCh = QString("STI 014"), |
|
|
unsigned int | triggerMask = 0xFFFFFFFF, |
|
|
bool | leadingEdge = true ) |
|
static |
Detect trigger events from raw data using a stimulus channel. Ported from detect_events (MNE-C).
- Parameters
-
| [in] | raw | The raw data. |
| [out] | p_Events | The detected events. |
| [in] | triggerCh | Name of the trigger channel (empty = default "STI 014"). |
| [in] | triggerMask | Bitmask to apply to trigger values. |
| [in] | leadingEdge | If true, only detect rising edges (default = true). |
- Returns
- true if events were detected, false otherwise.
◆ is_empty()
| bool FIFFLIB::FiffEvents::is_empty |
( |
| ) |
const |
|
inline |
Returns true if no events are stored.
- Returns
- true if the event matrix has zero rows.
Definition at line 215 of file fiff_events.h.
◆ matchEvent()
| bool FIFFLIB::FiffEvents::matchEvent |
( |
const AverageCategory & | cat, |
|
|
const Eigen::MatrixXi & | events, |
|
|
int | eventIdx ) |
|
static |
Check whether an event matches a category definition.
- Parameters
-
| [in] | cat | The averaging category to match against. |
| [in] | events | Full event matrix (nEvents x 3): [sample, from, to]. |
| [in] | eventIdx | Index of the current event row. |
- Returns
- true if the event matches.
◆ num_events()
| int FIFFLIB::FiffEvents::num_events |
( |
| ) |
const |
|
inline |
Returns the number of events.
- Returns
- Number of events.
Definition at line 208 of file fiff_events.h.
◆ read()
| bool FIFFLIB::FiffEvents::read |
( |
const QString & | t_sEventName, |
|
|
const QString & | t_fileRawName, |
|
|
FiffEvents & | p_Events ) |
|
static |
Read events from a FIFF or ASCII event file.
If t_sEventName is empty, the event file name is derived from the raw file name (replacing ".fif" with "-eve.fif").
- Parameters
-
| [in] | t_sEventName | Path to the event file (empty = derive from raw file name). |
| [in] | t_fileRawName | Path to the raw data file (used to derive event file name if needed). |
| [out] | p_Events | The loaded events. |
- Returns
- true if succeeded, false otherwise.
◆ read_from_ascii()
| bool FIFFLIB::FiffEvents::read_from_ascii |
( |
QIODevice & | p_IODevice, |
|
|
FiffEvents & | p_Events ) |
|
static |
Read a list of events from an ASCII event file.
- Parameters
-
| [in] | p_IODevice | The I/O device to read from. |
| [out] | p_Events | The loaded events. |
- Returns
- true if succeeded, false otherwise.
◆ read_from_fif()
| bool FIFFLIB::FiffEvents::read_from_fif |
( |
QIODevice & | p_IODevice, |
|
|
FiffEvents & | p_Events ) |
|
static |
Read an event list from a FIFF file.
- Parameters
-
| [in] | p_IODevice | The I/O device to read from. |
| [out] | p_Events | The loaded events. |
- Returns
- true if succeeded, false otherwise.
◆ write_to_ascii()
| bool FIFFLIB::FiffEvents::write_to_ascii |
( |
QIODevice & | p_IODevice, |
|
|
float | sfreq = 0.0f ) const |
Write the event list to a text file (MNE-C compatible format).
- Parameters
-
| [in] | p_IODevice | The I/O device to write to. |
| [in] | sfreq | Sampling frequency for time column computation. |
- Returns
- true if succeeded, false otherwise.
◆ write_to_fif()
| bool FIFFLIB::FiffEvents::write_to_fif |
( |
QIODevice & | p_IODevice | ) |
const |
Write the event list to a FIFF file.
- Parameters
-
| [in] | p_IODevice | The I/O device to write to. |
- Returns
- true if succeeded, false otherwise.
◆ events
| Eigen::MatrixXi FIFFLIB::FiffEvents::events |
Event matrix (nEvents x 3): [sample, before, after].
Definition at line 199 of file fiff_events.h.
The documentation for this class was generated from the following file: