v2.0.0
Loading...
Searching...
No Matches
artifact_detect.h
Go to the documentation of this file.
1//=============================================================================================================
40
41#ifndef ARTIFACT_DETECT_DSP_H
42#define ARTIFACT_DETECT_DSP_H
43
44//=============================================================================================================
45// INCLUDES
46//=============================================================================================================
47
48#include "dsp_global.h"
49
50#include <fiff/fiff_info.h>
51
52//=============================================================================================================
53// EIGEN INCLUDES
54//=============================================================================================================
55
56#include <Eigen/Core>
57
58//=============================================================================================================
59// QT INCLUDES
60//=============================================================================================================
61
62#include <QVector>
63
64//=============================================================================================================
65// DEFINE NAMESPACE UTILSLIB
66//=============================================================================================================
67
68namespace UTILSLIB
69{
70
71//=============================================================================================================
74{
75 double dFilterLow = 5.0;
76 double dFilterHigh = 40.0;
77 int iFilterOrder = 4;
78 double dThreshFactor = 0.5;
79 double dMinRRSec = 0.35;
80};
81
82//=============================================================================================================
85{
86 double dFilterHigh = 10.0;
87 int iFilterOrder = 4;
88 double dThresholdV = 150e-6;
89 double dMinGapSec = 0.3;
90};
91
92//=============================================================================================================
105{
106public:
109
110 //=========================================================================================================
125 static QVector<int> detectEcg(const Eigen::MatrixXd& matData,
126 const FIFFLIB::FiffInfo& fiffInfo,
127 double dSFreq,
128 const EcgParams& params = EcgParams());
129
130 //=========================================================================================================
145 static QVector<int> detectEog(const Eigen::MatrixXd& matData,
146 const FIFFLIB::FiffInfo& fiffInfo,
147 double dSFreq,
148 const EogParams& params = EogParams());
149
150private:
151 //=========================================================================================================
163 static Eigen::RowVectorXd bandpassFilter(const Eigen::RowVectorXd& vecSignal,
164 double dSFreq,
165 double dLow,
166 double dHigh,
167 int iOrder);
168
169 //=========================================================================================================
179 static QVector<int> findPeaks(const Eigen::RowVectorXd& vecSignal,
180 double dThreshold,
181 int iMinDist);
182};
183
184} // namespace UTILSLIB
185
186#endif // ARTIFACT_DETECT_DSP_H
FiffInfo class declaration.
dsp library export/import macros.
#define DSPSHARED_EXPORT
Definition dsp_global.h:56
Shared utilities (I/O helpers, spectral analysis, layout management, warp algorithms).
ECG R-peak detection parameters (defined outside class to avoid Clang/GCC default-argument issues wit...
EOG blink / saccade detection parameters (defined outside class to avoid Clang/GCC default-argument i...
ECG and EOG physiological artifact event detection.
static QVector< int > detectEcg(const Eigen::MatrixXd &matData, const FIFFLIB::FiffInfo &fiffInfo, double dSFreq, const EcgParams &params=EcgParams())
ArtifactDetectEogParams EogParams
ArtifactDetectEcgParams EcgParams
static QVector< int > detectEog(const Eigen::MatrixXd &matData, const FIFFLIB::FiffInfo &fiffInfo, double dSFreq, const EogParams &params=EogParams())
FIFF measurement file information.
Definition fiff_info.h:86