v2.0.0
Loading...
Searching...
No Matches
bids_abstract_format_reader.h
Go to the documentation of this file.
1//=============================================================================================================
29
30#ifndef BIDS_ABSTRACT_FORMAT_READER_H
31#define BIDS_ABSTRACT_FORMAT_READER_H
32
33//=============================================================================================================
34// INCLUDES
35//=============================================================================================================
36
37#include "../bids_global.h"
38
39#include <fiff/fiff_info.h>
40#include <fiff/fiff_raw_data.h>
41
42//=============================================================================================================
43// EIGEN INCLUDES
44//=============================================================================================================
45
46#include <Eigen/Core>
47
48//=============================================================================================================
49// QT INCLUDES
50//=============================================================================================================
51
52#include <QString>
53#include <memory>
54
55//=============================================================================================================
56// DEFINE NAMESPACE BIDSLIB
57//=============================================================================================================
58
59namespace BIDSLIB
60{
61
62//=============================================================================================================
70{
71public:
72 using UPtr = std::unique_ptr<AbstractFormatReader>;
73
74 //=========================================================================================================
78 virtual ~AbstractFormatReader() = default;
79
80 //=========================================================================================================
88 virtual bool open(const QString& sFilePath) = 0;
89
90 //=========================================================================================================
96 virtual FIFFLIB::FiffInfo getInfo() const = 0;
97
98 //=========================================================================================================
107 virtual Eigen::MatrixXf readRawSegment(int iStartSampleIdx, int iEndSampleIdx) const = 0;
108
109 //=========================================================================================================
113 virtual long getSampleCount() const = 0;
114
115 //=========================================================================================================
119 virtual float getFrequency() const = 0;
120
121 //=========================================================================================================
125 virtual int getChannelCount() const = 0;
126
127 //=========================================================================================================
133 virtual FIFFLIB::FiffRawData toFiffRawData() const = 0;
134
135 //=========================================================================================================
139 virtual QString formatName() const = 0;
140
141 //=========================================================================================================
149 virtual bool supportsExtension(const QString& sExtension) const = 0;
150
151protected:
153};
154
155} // namespace BIDSLIB
156
157#endif // BIDS_ABSTRACT_FORMAT_READER_H
MNE-CPP BIDS library entry point: Qt symbol-visibility plumbing and the BIDSLIB namespace documentati...
#define BIDSSHARED_EXPORT
Definition bids_global.h:43
FIFF continuous raw recording: FiffInfo plus a directory of FIFF_DATA_BUFFER tags for random-access s...
Full FIFF measurement metadata: everything from FIFFB_MEAS / FIFFB_MEAS_INFO needed to interpret a re...
BIDS dataset reading, writing, path construction, and sidecar metadata handling for iEEG/EEG/MEG.
virtual QString formatName() const =0
Return a descriptive name for the format (e.g. "EDF", "BrainVision").
virtual ~AbstractFormatReader()=default
Virtual destructor.
virtual bool supportsExtension(const QString &sExtension) const =0
Check whether this reader can handle the given file extension.
virtual float getFrequency() const =0
Return the sampling frequency in Hz.
virtual long getSampleCount() const =0
Return total number of samples across the recording.
virtual FIFFLIB::FiffInfo getInfo() const =0
Return measurement metadata as FiffInfo.
virtual FIFFLIB::FiffRawData toFiffRawData() const =0
Convert the entire dataset to a FiffRawData structure.
virtual bool open(const QString &sFilePath)=0
Open and parse the file header. Must be called before reading data.
virtual int getChannelCount() const =0
Return the number of measurement channels.
std::unique_ptr< AbstractFormatReader > UPtr
virtual Eigen::MatrixXf readRawSegment(int iStartSampleIdx, int iEndSampleIdx) const =0
Read a segment of raw data.
Full FIFF measurement info: per-channel descriptors, sampling and filter setup, projectors,...
Definition fiff_info.h:88