Click here to Skip to main content
Click here to Skip to main content
 
Add your own
alternative version

Tagged as

ECG recording, storing, filtering and recognition

, 14 Apr 2004
Full open code project for making driver and application software for ECG medical measurements.
ecg_dsp_src.zip
drvECG_1
drvECG_1.clw
drvECG_1.def
drvECG_1.dsp
drvECG_1.dsw
drvECG_1.exp
drvECG_1.ilk
drvECG_1.lib
res
Ecg_1
ECG_1.clw
ECG_1.dsp
ECG_1.dsw
ECG_DRAW.obj
ECG_Statistic_View.lib
ECG_VIEW.exp
ECG_VIEW.ilk
ECG_VIEW.lib
TestOCX.ocx
drvECG_1.exp
drvECG_1.ilk
drvECG_1.lib
resource.hm
res
ECG_1.ico
bitmap1.bmp
bmp00001.bmp
setup.bmp
ECG_Statistic_View
ECG_Statistic_View.clw
ECG_Statistic_View.def
ECG_Statistic_View.dsp
ECG_Statistic_View.dsw
res
ECG_VIEW
ECG_DRAW.obj
ECG_VIEW.APS
ECG_VIEW.clw
ECG_VIEW.def
ECG_VIEW.dll
ECG_VIEW.dsp
ECG_VIEW.dsw
ECG_VIEW.exp
ECG_VIEW.lib
res
testrecord2.zip
test_file1.zip
// ECG_1Dlg.h : header file
//

#if !defined(AFX_ECG_1DLG_H__949713E6_8ABD_11D7_8A9A_CD3460C9807B__INCLUDED_)
#define AFX_ECG_1DLG_H__949713E6_8ABD_11D7_8A9A_CD3460C9807B__INCLUDED_

#include "DSP_Filter.h"	// Added by ClassView
#include "MCP3002.h"	// Added by ClassView
#include "ECG_DRAW.h"	// Added by ClassView
#include "ECG_Data.h"	// Added by ClassView
#include "Statistic_View.h"	// Added by ClassView
#include "DlgPersonal.h"	// Added by ClassView
#include "DlgVeloTest.h"	// Added by ClassView
#include "DlgConfirm.h"	// Added by ClassView
#include "DSP_ECG.h"	// Added by ClassView
#include "DlgPulseMeter.h"	// Added by ClassView
#include "DlgDSPAll.h"	// Added by ClassView

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

/////////////////////////////////////////////////////////////////////////////
// CECG_1Dlg dialog

class CECG_1Dlg : public CDialog
{
// Construction
public:
	void CountQRSmin();
	void ShowCurrPulse(int data_index);
	void SetTestdate();
	BYTE hh;
	BYTE mm;
	void NewECG();
	void StopSampling();
	void StartSampling();
	int i_old_ctldata_index;//index for the list box 
	void SetDataAt(double* source,int start,int lenght);
	void GetDataFrom(double* dest,int start,int lenght);
	void SetData(double* source,int lenght);
	bool b_start_stop;
	CString s_ECG_Info;
	CTime TStart;
	ECG_DRAW ecg_draw;
	int CountQRS(double* ECG,int lenght);
	int Resample(double* dest,double* source,int lenght,int fold,int fnew);
	DSP_Filter dsp_flf;
	void CopyFromSample(unsigned short *ar0,unsigned short *ar1,int lenght);
	double AR_ECG[5001];
	double AR_REV[5001];
	MCP3002 mcp3002;
	CECG_1Dlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CECG_1Dlg)
	enum { IDD = IDD_ECG_1_DIALOG };
	CButton	m_ctlcorect;
	CListBox	m_ctldata;
	CButton	m_ctlRecord;
	CSliderCtrl	m_ctlBmp;
	CProgressCtrl	m_ctlSampling;
	int		m_bmppos;
	CString	m_sComment;
	BOOL	m_b50hz;
	BOOL	m_b60hz;
	BOOL	m_b40hzlol;
	BOOL	m_bw50noht;
	BOOL	m_bw45low;
	BOOL	m_bw067hz;
	int		m_select_segment;
	CString	m_srecord;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CECG_1Dlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CECG_1Dlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnBrecord();
	afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
	virtual void OnOK();
	afx_msg void OnBshowbmp();
	afx_msg void OnBtest();
	afx_msg void OnBinvertecg();
	afx_msg void OnBlow();
	afx_msg void OnButton2();
	afx_msg void OnBprint();
	afx_msg void OnButton1();
	afx_msg void OnBdelta();
	afx_msg void OnBdelta2();
	afx_msg void OnBdeltareverse();
	afx_msg void OnButton3();
	afx_msg void OnBdeltareverse2();
	afx_msg void OnSelchangeLdata();
	afx_msg void OnBcorect();
	afx_msg void OnFileExit();
	afx_msg void OnFileSave();
	afx_msg void OnFileOpen();
	afx_msg void OnFileNew();
	afx_msg void OnInfoEcg();
	afx_msg void OnInfoPersonal();
	afx_msg void OnBsavebmp();
	afx_msg void OnInfoConfirm();
	afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
	afx_msg void OnBrecalcall();
	afx_msg void OnBexit();
	afx_msg void OnHelpAboutecg1();
	afx_msg void OnBwflow();
	afx_msg void OnBwfnoht50hz();
	afx_msg void OnBwflow40hz();
	afx_msg void OnDspNoht50hz();
	afx_msg void OnDspLow100hz();
	afx_msg void OnDspHigh0025hz();
	afx_msg void OnDspEcganalysis();
	afx_msg void OnDspLow40hz();
	afx_msg void OnBsavebmp2();
	afx_msg void OnC50hz();
	afx_msg void OnC60hz();
	afx_msg void OnC40lol();
	afx_msg void OnCw50hz();
	afx_msg void OnCw40hz();
	afx_msg void OnCw067();
	afx_msg void OnBampl();
	afx_msg void OnBdspall();
	afx_msg void OnRadio1();
	afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
	afx_msg void OnBecgprint();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
private:
	CDlgDSPAll dlg_dsp_all;
	int i_bmp;
	int cur_index;
	CString s_filter_input;
	int i_past_pulse;
	void HidePulseDialog();
	BOOL b_dlgPulseMeter;
	void ShowPulseDialog();
	CDlgPulseMeter dlg_pulse_meter;
	void FormatTestDlg();
	void ECG_Statistic();
	int i_fsmpl;
	DSP_ECG dsp_ecg;
	
	void ClearECGInfo();
	CDlgConfirm dlg_confirm;
	int GetQRSmean();
	CDlgVeloTest dlg_velo_test;
	void ClearPersonal();
	void SetPersonal();
	void GetPersonal();
	CDlgPersonal dlg_personal;
	Statistic_View statistic_draw;
	CWordArray QRS_MIN_COUNT;
	int i_QRS_count;
	int i_QRS_ms;
	int i_PR_ms;
	int i_QT_QTc_ms;

	void ZeroArr(double* dest,int lenght);
	CECG_Data ecg_data;
	void SamplingProcess();
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_ECG_1DLG_H__949713E6_8ABD_11D7_8A9A_CD3460C9807B__INCLUDED_)

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Georgi Petrov
Instructor / Trainer
Bulgaria Bulgaria
PhD, Cum Laude in digital automation systems
M.S. in Telemommunication management
B.S. in Telecommunication systems engineering
Programming: CUDA, C/C++, VHDL
Software and Hardware development and consulting:
data acquisition, image processing, medical instrumentation

| Advertise | Privacy | Mobile
Web04 | 2.8.140821.2 | Last Updated 15 Apr 2004
Article Copyright 2003 by Georgi Petrov
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid