34#ifndef BIDS_EDF_READER_H
35#define BIDS_EDF_READER_H
108 bool open(
const QString& sFilePath)
override;
110 Eigen::MatrixXf
readRawSegment(
int iStartSampleIdx,
int iEndSampleIdx)
const override;
136 enum EDFHeaderFieldLengths
139 LOCAL_PATIENT_INFO = 80,
140 LOCAL_RECORD_INFO = 80,
143 NUM_BYTES_HEADER = 8,
144 HEADER_RESERVED = 44,
145 NUM_DATA_RECORDS = 8,
146 DURATION_DATA_RECS = 8,
155 SIG_PREFILTERING = 80,
160 void parseHeader(QIODevice* pDev);
165 QString m_sVersionNo;
166 QString m_sPatientId;
167 QString m_sRecordingId;
168 QDateTime m_startDateTime;
169 int m_iNumBytesInHeader{0};
170 int m_iNumDataRecords{0};
171 float m_fDataRecordsDuration{0.0f};
172 int m_iNumChannels{0};
173 int m_iNumBytesPerDataRecord{0};
175 QVector<EDFChannelInfo> m_vAllChannels;
176 QVector<EDFChannelInfo> m_vMeasChannels;
178 mutable QFile m_file;
179 bool m_bIsOpen{
false};
180 int m_iBytesPerSample{2};
Strategy interface for format-specific raw-data readers (BrainVision, EDF, …) consumed by BIDSLIB::Bi...
#define BIDSSHARED_EXPORT
BIDS dataset reading, writing, path construction, and sidecar metadata handling for iEEG/EEG/MEG.
AbstractFormatReader()=default
Channel-level metadata from the EDF header.
QString physicalDimension
FIFFLIB::FiffInfo getInfo() const override
Return measurement metadata as FiffInfo.
Eigen::MatrixXf readRawSegment(int iStartSampleIdx, int iEndSampleIdx) const override
Read a segment of raw data.
bool open(const QString &sFilePath) override
Open and parse the file header. Must be called before reading data.
bool supportsExtension(const QString &sExtension) const override
Check whether this reader can handle the given file extension.
QVector< EDFChannelInfo > getAllChannelInfos() const
Return all channel infos (measurement + extra).
float getFrequency() const override
Return the sampling frequency in Hz.
FIFFLIB::FiffRawData toFiffRawData() const override
Convert the entire dataset to a FiffRawData structure.
QVector< EDFChannelInfo > getMeasurementChannelInfos() const
Return measurement channel infos only.
EDFReader()
EDFReader Default constructor.
long getSampleCount() const override
Return total number of samples across the recording.
QString formatName() const override
Return a descriptive name for the format (e.g. "EDF", "BrainVision").
int getChannelCount() const override
Return the number of measurement channels.
Per-channel FIFF descriptor: identifiers, kind, calibration, coil type, channel-frame coil position a...
Full FIFF measurement info: per-channel descriptors, sampling and filter setup, projectors,...
Continuous FIFF raw recording: FiffInfo plus a random-access directory of FIFF_DATA_BUFFER tags.