-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathQRSPointsDetector.h
47 lines (30 loc) · 1 KB
/
QRSPointsDetector.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#pragma once
#include "ModulesInterfaces.h"
#include "ModulesMethods.h"
#include <fstream>
#include <sstream>
#include <gsl/gsl_sort_vector.h>
//#define DEBUG
//#define USE_MOCKED_SIGNAL
using namespace std;
class QRSPointsDetector : public WavesModule
{
public:
QRSPointsDetector(void);
~QRSPointsDetector(void);
void setParams(ParametersTypes ¶meterTypes);
void runModule (const ECGSignalChannel &, const ECGInfo &, const ECGRs &, ECGWaves &);
ECGSignalChannel getMockedSignal();
ECGRs getMockedRPeak();
private:
ECGSignalChannel filteredSignal;
ECGRs rsPositions;
ECGWaves * qrsPoints;
ECGSignalChannel mockedSignal;
bool detectQRS();
bool detectPT();
ECGSignalChannel gradient(ECGSignalChannel *signal);
ECGSignalChannel averageFilter(ECGSignalChannel *signal);
friend double findMinimum (ECGSignalChannel *signal,int forBegin, int forEnd);
friend double findMaximum (ECGSignalChannel *signal,int forBegin, int forEnd);
};