Giter Site home page Giter Site logo

paper-ecg's Introduction

Paper ECG

An application for digitizing ECG scans. (OSU Capstone Project 2020-21)

See ecgdigitize for the library implementing the grid and signal digitization. Cite published manuscript: J. D. Fortune, N. E. Coppa, K. T. Haq, H. Patel and L. G. Tereshchenko. Digitizing ECG image: a new method and open-source software code. Computer Methods and Programs in Biomedicine 2022 Pages 106890. DOI: https://doi.org/10.1016/j.cmpb.2022.106890 https://www.sciencedirect.com/science/article/pii/S0169260722002723

Authors

  • Natalie Coppa
  • Julian Fortune
  • Larisa Tereschenko (tereshch at ohsu.edu)

With help from:

  • Kazi Haq
  • Hetal Patel

Overview

This application allows digitizing paper ECG image scans, such as this one:

fullscan

To produce digital signals, like these:

fullscan-output

Installation

Download the latest release here.

User Guide

Read the user guide here

Contributing

Follow the set-up instructions:

You should now have:

  • Python 3.6.7
  • Virtual environment
  • All required packages

Reminder: Make sure your virtual environment is running! (this will happen automatically if you are using pyenv)

You can now run:

fbs run

Or, on Windows, you may need to run:

py -3.6 -m fbs run

This will start the interpreted version of the project.

Build

In order to create an executable that can be distributed, run:

fbs build

Or, on Windows, you may need to run:

py -3.6 -m fbs build

This only builds an executable targeting the current OS (i.e., virtualization or multiple machines is necessary to produce builds for each OS).

Contributing

View the issues list to see what tasks are available to work on.

Dependencies

The project currently requires Python 3.6.7 to work with fbs (see 3.7 support issue).

Build Notes

Capstone

See our sprint documents here.

Preprint to cite

Julian Fortune, Natalie Coppa, Kazi T Haq, Hetal Patel, Larisa G Tereshchenko. Digitizing ECG image: new fully automated method and open-source software code. medRxiv 2021.07.13.21260461; doi: https://doi.org/10.1101/2021.07.13.21260461

Statistical validation code

see file digitizing_validation Stata code.do. See manuscript(peprint above) for the detailed description of statistical methods.

paper-ecg's People

Contributors

julianfortune avatar nataliecoppa avatar tereshchenko9 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

paper-ecg's Issues

Resolution of exportation data

Hello, I have tried your software and it worked for my ECG paper data.
The exported output is a csv file with each row the corresponding lead data. However, I am not very clear with the resolution in time. What is the temporal resolution of the output ecg data points?
Thank you very much!
Best

Unable to open jpg file?

I receive an error text. How can I solve?

Image set
Traceback (most recent call last):
File "Main.py", line 26, in
File "controllers\MainController.py", line 57, in openImageFile
File "views\EditorWidget.py", line 140, in loadImageFromPath
File "views\EditorWidget.py", line 143, in displayImage
File "views\ImageView.py", line 105, in setImage
File "ImageUtilities.py", line 23, in opencvImageToPixmap
AttributeError: 'NoneType' object has no attribute 'shape'

App does not open

App fails to open (not responding). Running macOS Big Sur (11.5.2). Any ideas how to fix this issue? I would love to try out the application.
Thanks,

Paul

Doesn't digitize

For some reason, tool doesn't digitize the selected windows of leads from a jpg.
It doesn't say what was wrong. It doesn't have a log. It remaints silent when pushing the "Process" button.
This is very disappointing.

Unable to execute on Windows 10 platform

I have included some results from the installation and attempt to execute the code: 1) verification using Python 3.6.7, 2) results running requirements.txt, and 3) execution of fbs run :
``
1)
C:\PythonTestCode\Graph-to-ECG\paper-ecg-1.0.0>c:/python36/python
Python 3.6.7 (v3.6.7:6ec5cf24b7, Oct 20 2018, 13:35:33) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

C:\PythonTestCode\Graph-to-ECG\paper-ecg-1.0.0>c:/python36/python -m pip install -r requirements.txt
Requirement already satisfied: fbs==0.9.0 in c:\python36\lib\site-packages (from -r requirements.txt (line 2)) (0.9.0)
Requirement already satisfied: PyQt5==5.15.1 in c:\python36\lib\site-packages (from -r requirements.txt (line 3)) (5.15.1)
Requirement already satisfied: numpy in c:\python36\lib\site-packages (from -r requirements.txt (line 6)) (1.19.5)
Requirement already satisfied: scipy==1.4.1 in c:\python36\lib\site-packages (from -r requirements.txt (line 8)) (1.4.1)
Requirement already satisfied: opencv-python-headless>=4.4 in c:\python36\lib\site-packages (from -r requirements.txt (line 9)) (4.6.0.66)
Requirement already satisfied: qimage2ndarray in c:\python36\lib\site-packages (from -r requirements.txt (line 10)) (1.9.0)
Requirement already satisfied: mypy in c:\python36\lib\site-packages (from -r requirements.txt (line 13)) (0.971)
Requirement already satisfied: pathlib in c:\python36\lib\site-packages (from -r requirements.txt (line 14)) (1.0.1)
Requirement already satisfied: dataclasses in c:\python36\lib\site-packages (from -r requirements.txt (line 15)) (0.8)
Requirement already satisfied: PyInstaller==3.4 in c:\python36\lib\site-packages (from fbs==0.9.0->-r requirements.txt (line 2)) (3.4)
Requirement already satisfied: PyQt5-sip<13,>=12.8 in c:\python36\lib\site-packages (from PyQt5==5.15.1->-r requirements.txt (line 3)) (12.9.0)
Requirement already satisfied: pefile>=2017.8.1 in c:\python36\lib\site-packages (from PyInstaller==3.4->fbs==0.9.0->-r requirements.txt (line 2)) (2021.9.3)
Requirement already satisfied: macholib>=1.8 in c:\python36\lib\site-packages (from PyInstaller==3.4->fbs==0.9.0->-r requirements.txt (line 2)) (1.16.2)
Requirement already satisfied: setuptools in c:\python36\lib\site-packages (from PyInstaller==3.4->fbs==0.9.0->-r requirements.txt (line 2)) (59.6.0)
Requirement already satisfied: pywin32-ctypes in c:\python36\lib\site-packages (from PyInstaller==3.4->fbs==0.9.0->-r requirements.txt (line 2)) (0.2.0)
Requirement already satisfied: altgraph in c:\python36\lib\site-packages (from PyInstaller==3.4->fbs==0.9.0->-r requirements.txt (line 2)) (0.17.2)
Requirement already satisfied: tomli>=1.1.0 in c:\python36\lib\site-packages (from mypy->-r requirements.txt (line 13)) (1.2.3)
Requirement already satisfied: mypy-extensions>=0.4.3 in c:\python36\lib\site-packages (from mypy->-r requirements.txt (line 13)) (0.4.3)
Requirement already satisfied: typed-ast<2,>=1.4.0 in c:\python36\lib\site-packages (from mypy->-r requirements.txt (line 13)) (1.5.4)
Requirement already satisfied: typing-extensions>=3.10 in c:\python36\lib\site-packages (from mypy->-r requirements.txt (line 13)) (4.1.1)
Requirement already satisfied: future in c:\python36\lib\site-packages (from pefile>=2017.8.1->PyInstaller==3.4->fbs==0.9.0->-r requirements.txt (line 2)) (0.18.2)

C:\PythonTestCode\Graph-to-ECG\paper-ecg-1.0.0>

C:\PythonTestCode\Graph-to-ECG\paper-ecg-1.0.0>c:/python36/python -m fbs run
Traceback (most recent call last):
File "C:\PythonTestCode\Graph-to-ECG\paper-ecg-1.0.0\src\main\python\Main.py", line 12, in
from controllers.MainController import MainController
File "C:\PythonTestCode\Graph-to-ECG\paper-ecg-1.0.0\src\main\python\controllers\MainController.py", line 9, in
import cv2
File "c:\python36\lib\site-packages\cv2_init_.py", line 181, in
bootstrap()
File "c:\python36\lib\site-packages\cv2_init_.py", line 175, in bootstrap
if _load_extra_py_code_for_module("cv2", submodule, DEBUG):
File "c:\python36\lib\site-packages\cv2_init
.py", line 28, in _load_extra_py_code_for_module
py_module = importlib.import_module(module_name)
File "c:\python36\lib\importlib_init
.py", line 126, in import_module
return _bootstrap.gcd_import(name[level:], package, level)
File "c:\python36\lib\site-packages\cv2\gapi_init
.py", line 290, in
cv.gapi.wip.GStreamerPipeline = cv.gapi_wip_gst_GStreamerPipeline
AttributeError: module 'cv2' has no attribute 'gapi_wip_gst_GStreamerPipeline``

Modify the ECG digitalization in noisy parts

Dear all,

Firstly, to congratulate you, for this amazing tool. We would like to use it for research purposes and we need to digitalize some ECGs to build some models. We found some cases that the peaks were not well detected because of noise or lack of resolution, I wonder if there are tools in this app to modify the lines when there are wrong parts.

Again, amazing work
Sincerely
Esmeralda

The ECG picture cannot be successfully displayed on the interface.

image
The picture is the background interface when the unhappy electrogram picture is played. The problem I encountered was that the ECG picture could not be read successfully.In fact, my friend and I use the same windows system and the same exe installation package, but he did not have this problem. How can I solve this problem.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.