35#ifndef BIDS_BRAIN_VISION_READER_H
36#define BIDS_BRAIN_VISION_READER_H
137 bool open(
const QString& sFilePath)
override;
139 Eigen::MatrixXf
readRawSegment(
int iStartSampleIdx,
int iEndSampleIdx)
const override;
153 QVector<BrainVisionMarker>
getMarkers()
const;
164 static float unitScale(
const QString& sUnit);
170 bool parseHeader(
const QString& sVhdrPath);
171 bool parseMarkers(
const QString& sVmrkPath);
172 void computeSampleCount();
176 QString m_sMarkerPath;
179 float m_fSFreq{0.0f};
180 int m_iNumChannels{0};
183 long m_lSampleCount{0};
185 QVector<BrainVisionChannelInfo> m_vChannels;
186 QVector<BrainVisionMarker> m_vMarkers;
188 mutable QFile m_dataFile;
189 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.
BVOrientation
Data orientation enumeration.
BVBinaryFormat
Binary format enumeration for BrainVision data files.
AbstractFormatReader()=default
Marker entry from the .vmrk file.
Channel info from the .vhdr header.
FIFFLIB::FiffChInfo toFiffChInfo() const
BrainVisionReader()
Default constructor.
FIFFLIB::FiffRawData toFiffRawData() const override
Convert the entire dataset to a FiffRawData structure.
long getSampleCount() const override
Return total number of samples across the recording.
Eigen::MatrixXf readRawSegment(int iStartSampleIdx, int iEndSampleIdx) const override
Read a segment of raw data.
static bool isVoltageUnit(const QString &sUnit)
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.
bool supportsExtension(const QString &sExtension) const override
Check whether this reader can handle the given file extension.
QVector< BrainVisionChannelInfo > getChannelInfos() const
Return all channel infos.
float getFrequency() const override
Return the sampling frequency in Hz.
FIFFLIB::FiffInfo getInfo() const override
Return measurement metadata as FiffInfo.
bool open(const QString &sFilePath) override
Open and parse the file header. Must be called before reading data.
static float unitScale(const QString &sUnit)
QVector< BrainVisionMarker > getMarkers() const
Return all parsed markers from the .vmrk file.
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.