v2.0.0
Loading...
Searching...
No Matches
BIDSLIB::BidsEvent Struct Reference

Single event annotation, typically parsed from or written to *_events.tsv. More...

#include <bids_event.h>

Static Public Member Functions

static QList< BidsEventreadTsv (const QString &sFilePath)
 Read a BIDS *_events.tsv file.
static bool writeTsv (const QString &sFilePath, const QList< BidsEvent > &events)
 Write a BIDS *_events.tsv file.

Public Attributes

float onset {0.0f}
float duration {0.0f}
int sample {0}
int value {0}
QString trialType

Detailed Description

Single event annotation, typically parsed from or written to *_events.tsv.

Each event represents a discrete occurrence during the recording, such as a stimulus presentation, button press, or seizure onset.

Definition at line 65 of file bids_event.h.

Member Function Documentation

◆ readTsv()

QList< BidsEvent > BidsEvent::readTsv ( const QString & sFilePath)
static

Read a BIDS *_events.tsv file.

Parses onset, duration, sample, value, and trial_type columns. Missing or "n/a" fields default to zero / empty.

Parameters
[in]sFilePathPath to the events.tsv file.
Returns
List of events.

Definition at line 52 of file bids_event.cpp.

◆ writeTsv()

bool BidsEvent::writeTsv ( const QString & sFilePath,
const QList< BidsEvent > & events )
static

Write a BIDS *_events.tsv file.

Parameters
[in]sFilePathOutput path.
[in]eventsList of events.
Returns
true on success.

Definition at line 99 of file bids_event.cpp.

Member Data Documentation

◆ duration

float BIDSLIB::BidsEvent::duration {0.0f}

Duration of the event in seconds.

Definition at line 68 of file bids_event.h.

◆ onset

float BIDSLIB::BidsEvent::onset {0.0f}

Onset in seconds from the start of the recording.

Definition at line 67 of file bids_event.h.

◆ sample

int BIDSLIB::BidsEvent::sample {0}

Sample index (0-based) corresponding to onset.

Definition at line 69 of file bids_event.h.

◆ trialType

QString BIDSLIB::BidsEvent::trialType

Trial type or condition label (e.g. "stimulus", "response").

Definition at line 71 of file bids_event.h.

◆ value

int BIDSLIB::BidsEvent::value {0}

Numeric event value / trigger code.

Definition at line 70 of file bids_event.h.


The documentation for this struct was generated from the following files: