v2.0.0
Loading...
Searching...
No Matches
artifact_detect.h
Go to the documentation of this file.
1//=============================================================================================================
19
20#ifndef ARTIFACT_DETECT_DSP_H
21#define ARTIFACT_DETECT_DSP_H
22
23//=============================================================================================================
24// INCLUDES
25//=============================================================================================================
26
27#include "dsp_global.h"
28
29#include <fiff/fiff_info.h>
30
31//=============================================================================================================
32// EIGEN INCLUDES
33//=============================================================================================================
34
35#include <Eigen/Core>
36
37//=============================================================================================================
38// QT INCLUDES
39//=============================================================================================================
40
41#include <QVector>
42
43//=============================================================================================================
44// DEFINE NAMESPACE UTILSLIB
45//=============================================================================================================
46
47namespace UTILSLIB
48{
49
50//=============================================================================================================
57{
58 double dFilterLow = 5.0;
59 double dFilterHigh = 40.0;
60 int iFilterOrder = 4;
61 double dThreshFactor = 0.5;
62 double dMinRRSec = 0.35;
63};
64
65//=============================================================================================================
72{
73 double dFilterHigh = 10.0;
74 int iFilterOrder = 4;
75 double dThresholdV = 150e-6;
76 double dMinGapSec = 0.3;
77};
78
79//=============================================================================================================
86{
87public:
90
91 //=========================================================================================================
106 static QVector<int> detectEcg(const Eigen::MatrixXd& matData,
107 const FIFFLIB::FiffInfo& fiffInfo,
108 double dSFreq,
109 const EcgParams& params = EcgParams());
110
111 //=========================================================================================================
126 static QVector<int> detectEog(const Eigen::MatrixXd& matData,
127 const FIFFLIB::FiffInfo& fiffInfo,
128 double dSFreq,
129 const EogParams& params = EogParams());
130
131private:
132 //=========================================================================================================
144 static Eigen::RowVectorXd bandpassFilter(const Eigen::RowVectorXd& vecSignal,
145 double dSFreq,
146 double dLow,
147 double dHigh,
148 int iOrder);
149
150 //=========================================================================================================
160 static QVector<int> findPeaks(const Eigen::RowVectorXd& vecSignal,
161 double dThreshold,
162 int iMinDist);
163};
164
165} // namespace UTILSLIB
166
167#endif // ARTIFACT_DETECT_DSP_H
Full FIFF measurement metadata: everything from FIFFB_MEAS / FIFFB_MEAS_INFO needed to interpret a re...
Export/import macros and namespace declaration for the DSP library.
#define DSPSHARED_EXPORT
Definition dsp_global.h:50
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())
Full FIFF measurement info: per-channel descriptors, sampling and filter setup, projectors,...
Definition fiff_info.h:90