Software Open Access

Lightweight 12-lead ECG viewer for MATLAB

Erick Andres Perez Alday Larisa Tereshchenko

Published: Aug. 30, 2021. Version: 1.0.0


When using this resource, please cite: (show more options)
Perez Alday, E. A., & Tereshchenko, L. (2021). Lightweight 12-lead ECG viewer for MATLAB (version 1.0.0). PhysioNet. https://doi.org/10.13026/sm8m-v308.

Please include the standard citation for PhysioNet: (show more options)
Goldberger, A., Amaral, L., Glass, L., Hausdorff, J., Ivanov, P. C., Mark, R., ... & Stanley, H. E. (2000). PhysioBank, PhysioToolkit, and PhysioNet: Components of a new research resource for complex physiologic signals. Circulation [Online]. 101 (23), pp. e215–e220.

Abstract

Electrocardiograms (ECGs) provide time-varying measurements of the electrical activity of the heart. These signals can provide insights into underlying aspects of heart health and disease. Here we provide software for viewing 12-lead ECG files (in .txt format) in a form familiar to any clinician or ECG expert, facilitating manual measurements of intervals and amplitudes. An executable version of the software, without the need for Matlab installation, can be downloaded separately. The input file is a 10-second 12 lead ECG text file, the output from the Magellan ECG Research Workstation Software Version 2.0 (GE Marquette Medical Systems, USA).


Background

Electrocardiograms (ECGs) provide time-varying measurements of the electrical activity of the heart. These signals can provide insights into underlying aspects of heart health and disease. ECG waveforms are typically presented against a standardized background grid that allows features such as intervals and amplitudes to be easily interpreted. A number of ECG visualization tools are publicly available, several of which are available on PhysioNet [1-6]. However, these tools typically require significant set up and may be more feature heavy than needed for those seeking to simply view 12-lead ECGs.

Clinical investigators are often able to export raw ECG signals as .txt files comprising a matrix of digits in columns and rows. These are not immediately straightforward to view and explore. To satisfy the requests of clinical investigators who would like to see ECGs in their favorite clinical 12-lead ECG presentation view, there is therefore a demand for a simple viewer to handle these .txt files.


Software Description

In this project, we introduce software for viewing raw 12-lead ECG files in .txt format (specifically, the format output by the Magellan ECG Research Workstation, Software Version 2.0; GE Marquette Medical Systems, USA). The viewer was developed per the request of clinical investigators who desired to see de-identified, 12-lead ECG in a familiar presentation.

The input file is a 10-second 12 lead ECG text file, the output from the Magellan ECG Research Workstation Software Version 2.0 (GE Marquette Medical Systems, USA). The Magellan output text file does not contain any channel/leads label information. However, it has a standardized structure and contains the channel labels in the following order: Lead I, Lead II, Lead III, aVR, aVL, aVF, V1, V2, V3, V4, V5, V6.

Example viewer

Figure 1: Screenshot of the 12-lead ECG viewer

The viewer displays the 10-second 12-lead ECG in a similar view to a paper-print 12-lead ECG (see Figure 1). In addition, it includes a zoom-in window at the bottom where the user has the option to browse over 10 seconds of any specific ECG channel using the “Select Lead” button. The "Load ECG file" button is used to read the text file with the digital data. The “Select lead” button is used to zoom in on a specific beat and plotted on the bottom plot.


Installation and Requirements

The software has been tested in Matlab 2016 up to 2020 version. The software requires input data formatted according to the output format of the Magellan ECG Research Workstation, Software Version 2.0; GE Marquette Medical Systems, USA (see testing_ecg.txt). Additional sample data and documentation can be found on GitHub [7]. The viewer can be installed on a Windows 7 computer without pre-installed Matlab using the self-installed executable also found on GitHub.

The function ECG_viewer.m includes the source code of the clinical 12-lead ECG viewer. The input of the viewer is a text file in *.txt format, that includes 12-lead digital ECG in a 5000 x 12 matrix and lead labels in the following order: Lead I, Lead II, Lead III, aVR, aVL, aVF, V1, V2, V3, V4, V5, V6. A header can be parsed by the software with the dimensions of the matrix.

A standard Magellan ECG Research Workstation output file (testing_ecg.txt) is provided as a test file, with a sampling rate of 500 Hz and an amplitude resolution of 1 µV.


Usage Notes

Large NIH-funded cohorts can typically share only fully de-identified data. The output from the Magellan ECG Research Workstation provides such fully de-identified data as a text file of the exact format that we provided as an example.

Limitations

The current software only works with 12 lead ECG txt files with 500Hz sample frequency. Bugs and contributions can be submitted via Github [7].


Release Notes

Version 1.0: Initial working version of the viewer.


Acknowledgements

This work was supported by 1R01HL118277 and 2R56HL118277 (PI Tereshchenko).


Conflicts of Interest

None.


References

  1. Silva, I., Moody, B., & Moody, G. (2021). Waveform Database Software Package (WFDB) for MATLAB and Octave (version 0.10.0). PhysioNet. https://doi.org/10.13026/6zcz-e163.
  2. Silva I, Moody G. An Open-source Toolbox for Analysing and Processing PhysioNet Databases in MATLAB and Octave. Journal of Open Research Software. 2014;2(1):e27. DOI: http://doi.org/10.5334/jors.bi
  3. Goldberger, A., Amaral, L., Glass, L., Hausdorff, J., Ivanov, P. C., Mark, R., ... & Stanley, H. E. (2000). PhysioBank, PhysioToolkit, and PhysioNet: Components of a new research resource for complex physiologic signals. Circulation [Online]. 101 (23), pp. e215–e220.
  4. Moody, G., Pollard, T., & Moody, B. (2021). WFDB Software Package (version 10.6.2). PhysioNet. https://doi.org/10.13026/zzpx-h016.
  5. Laguna P. et al (2018). ECGPUWAVE: QRS detector and waveform limit locator. PhysioNet. https://physionet.org/content/ecgpuwave/.
  6. Lipsitz L and Moody G (2000). ECG-Derived Respiration. PhysioNet. https://physionet.org/content/edr/.
  7. Clinical Viewer of raw digital 12-lead ECG on GitHub. https://github.com/Tereshchenkolab/12-lead-ECG-viewer. [Accessed: 8 June 2021]

Share
Access

Access Policy:
Anyone can access the files, as long as they conform to the terms of the specified license.

License (for files):
MIT License

Corresponding Author
You must be logged in to view the contact information.

Files

Total uncompressed size: 409.1 KB.

Access the files
Folder Navigation: <base>
Name Size Modified
ECG_viewer.m (download) 15.0 KB 2021-03-29
Figure1.png (download) 190.3 KB 2021-08-28
LICENSE (download) 1.0 KB 2021-03-29
LICENSE.txt (download) 1.1 KB 2021-08-28
README.md (download) 823 B 2021-03-29
SHA256SUMS.txt (download) 537 B 2021-10-13
readme.txt (download) 1.4 KB 2021-03-29
testing_ecg.txt (download) 198.9 KB 2021-03-29