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//=============================================================================================================
53{
54 double dFilterLow = 5.0;
55 double dFilterHigh = 40.0;
56 int iFilterOrder = 4;
57 double dThreshFactor = 0.5;
58 double dMinRRSec = 0.35;
59};
60
61//=============================================================================================================
64{
65 double dFilterHigh = 10.0;
66 int iFilterOrder = 4;
67 double dThresholdV = 150e-6;
68 double dMinGapSec = 0.3;
69};
70
71//=============================================================================================================
84{
85public:
88
89 //=========================================================================================================
104 static QVector<int> detectEcg(const Eigen::MatrixXd& matData,
105 const FIFFLIB::FiffInfo& fiffInfo,
106 double dSFreq,
107 const EcgParams& params = EcgParams());
108
109 //=========================================================================================================
124 static QVector<int> detectEog(const Eigen::MatrixXd& matData,
125 const FIFFLIB::FiffInfo& fiffInfo,
126 double dSFreq,
127 const EogParams& params = EogParams());
128
129private:
130 //=========================================================================================================
142 static Eigen::RowVectorXd bandpassFilter(const Eigen::RowVectorXd& vecSignal,
143 double dSFreq,
144 double dLow,
145 double dHigh,
146 int iOrder);
147
148 //=========================================================================================================
158 static QVector<int> findPeaks(const Eigen::RowVectorXd& vecSignal,
159 double dThreshold,
160 int iMinDist);
161};
162
163} // namespace UTILSLIB
164
165#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:88