34#ifndef BIDS_EDF_READER_H
35#define BIDS_EDF_READER_H
97 explicit EDFReader(
float fScaleFactor = 1e6);
102 bool open(
const QString& sFilePath)
override;
104 Eigen::MatrixXf
readRawSegment(
int iStartSampleIdx,
int iEndSampleIdx)
const override;
126 enum EDFHeaderFieldLengths {
128 LOCAL_PATIENT_INFO = 80,
129 LOCAL_RECORD_INFO = 80,
132 NUM_BYTES_HEADER = 8,
133 HEADER_RESERVED = 44,
134 NUM_DATA_RECORDS = 8,
135 DURATION_DATA_RECS = 8,
144 SIG_PREFILTERING = 80,
149 void parseHeader(QIODevice* pDev);
151 float m_fScaleFactor;
155 QString m_sVersionNo;
156 QString m_sPatientId;
157 QString m_sRecordingId;
158 QDateTime m_startDateTime;
159 int m_iNumBytesInHeader{0};
160 int m_iNumDataRecords{0};
161 float m_fDataRecordsDuration{0.0f};
162 int m_iNumChannels{0};
163 int m_iNumBytesPerDataRecord{0};
165 QVector<EDFChannelInfo> m_vAllChannels;
166 QVector<EDFChannelInfo> m_vMeasChannels;
168 mutable QFile m_file;
169 bool m_bIsOpen{
false};
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.
EDFReader(float fScaleFactor=1e6)
EDFReader Default constructor.
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.
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,...