1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/seanwei-ECG-analyzer

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
STAnalysis.h 1.9 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
Bartek Bulat Отправлено 22.01.2013 23:36 7d566dd
#ifndef STANALYSIS_H
#define STANALYSIS_H
#include <ModulesInterfaces.h>
class STAnalysis : public STIntervalModule
{
public:
enum AlgorithmType {
Simple,
Complex
};
STAnalysis();
virtual void runModule(const ECGRs&, const ECGWaves&, const ECGSignalChannel&, const ECGInfo&, ECGST&);
void setParams(ParametersTypes& );
virtual ~STAnalysis();
private:
class AbstractAnalizer {
public:
virtual void analyse(const int it, const ECGRs& rpeaks, const ECGWaves& waves, const ECGSignalChannel& signal, const ECGChannelInfo& info, ECGST&) = 0;
virtual void setParams(ParametersTypes&);
virtual ~AbstractAnalizer() {};
protected:
ParametersTypes params;
};
class SimpleAnalizer: public AbstractAnalizer {
public:
SimpleAnalizer();
void analyse(const int it, const ECGRs& rpeaks, const ECGWaves& waves, const ECGSignalChannel& signal, const ECGChannelInfo& info, ECGST& output);
virtual void setParams(ParametersTypes& );
private:
double thresh;
int start;
bool during_episode;
};
class ComplexAnalizer: public AbstractAnalizer {
public:
ComplexAnalizer();
void analyse(const int it, const ECGRs& rpeaks, const ECGWaves& waves, const ECGSignalChannel& signal, const ECGChannelInfo& info, ECGST& output);
virtual void setParams(ParametersTypes& );
private:
std::pair<int, double> maxDistanceSample(const OtherSignal&, int, int);
std::pair<int, int> overBelowSamples(const OtherSignal&, int, int);
int getTPeak(const OtherSignal&, int, int);
double thresh, type_thresh, slope_thresh;
int start;
bool during_episode;
};
AbstractAnalizer * analizator;
void setAnalizer(STAnalysis::AbstractAnalizer* a);
void setAnalizer(AlgorithmType atype = AlgorithmType::Simple);
#ifdef DEVELOPMENT
ECGRs read_normal_r_peaks(std::string path, std::string filename);
#endif
};
#endif // STANALYSIS_H

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/seanwei-ECG-analyzer.git
git@api.gitlife.ru:oschina-mirror/seanwei-ECG-analyzer.git
oschina-mirror
seanwei-ECG-analyzer
seanwei-ECG-analyzer
master