35#ifndef BIDS_BRAIN_VISION_READER_H
36#define BIDS_BRAIN_VISION_READER_H
129 bool open(
const QString& sFilePath)
override;
131 Eigen::MatrixXf
readRawSegment(
int iStartSampleIdx,
int iEndSampleIdx)
const override;
143 QVector<BrainVisionMarker>
getMarkers()
const;
152 static float unitScale(
const QString& sUnit);
155 bool parseHeader(
const QString& sVhdrPath);
156 bool parseMarkers(
const QString& sVmrkPath);
157 void computeSampleCount();
161 QString m_sMarkerPath;
164 float m_fSFreq{0.0f};
165 int m_iNumChannels{0};
168 long m_lSampleCount{0};
170 QVector<BrainVisionChannelInfo> m_vChannels;
171 QVector<BrainVisionMarker> m_vMarkers;
173 mutable QFile m_dataFile;
174 bool m_bIsOpen{
false};
Contains the declaration of the AbstractFormatReader class.
#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.
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.
FIFF measurement file information.
FIFF raw measurement data.