Abstract
The WaveForm DataBase (WFDB) Toolbox for MATLAB/Octave enables integrated access to PhysioNet’s software and databases. Using the WFDB Toolbox for MATLAB/Octave, users have access to over 50 physiological databases in PhysioNet. The toolbox provides access over 4 TB of biomedical signals including ECG, EEG, EMG, and PLETH. Additionally, most signals are accompanied by metadata such as medical annotations of clinical events: arrhythmias, sleep stages, seizures, hypotensive episodes, etc. Users of this toolbox should easily be able to reproduce, validate, and compare results published based on PhysioNet’s software and databases.
Keywords: ECG, QRS, EEG, Arrhythmia, PhysioNet, Biosignal processing, Biomedical, Database, Octave, MATLAB, Physiological Signals
(1) Overview
Introduction
The WaveForm DataBase (WFDB) Toolbox for MATLAB/Octave (see Figure 1) is a collection of over 30 functions and utilities that integrate PhysioNet’s open-source applications and databases with the high-precision numerical computational and graphics environment of MATLAB and Octave. The WFDB Toolbox for MATLAB/Octave is an open-source project supported by PhysioNet [1], with a dedicated support mailing address at: wfdb-matlab-support@physionet.org. A managed community forum for discussions is also available at https://groups.google.com/forum/#!forum/wfdb-app-toolbox.
The WFDB Toolbox for MATLAB and Octave currently provides direct access to over 50 databases in PhysioNet (around 3 TB of data). The function RDSAMP allows users to load PhysioNet waveform data into MATLAB’s or Octave’s workspace; if the database signals are not cached locally, they are automatically fetched from PhysioNet’s servers using HTTP and stored locally for future access. In addition, the function RDANN allows users to load meta data (defined as “annotations” in WFDB terminology). The annotations are generated by medical experts examining the raw waveforms, or by sophisticated published medical algorithms. Examples of the types of annotations available include arrhythmia events, evoked potential epoch markers, epileptic seizure onset, sleep stages, apnea events, and signal quality indication. The PHYSIONETDB function allow users to browse PhysioNet’s databases within MATLAB/Octave. The output argument of PHYSIONETDB, a cell array following the input syntax of RDSAMP, provides a convenient way to process all databases and signals in PhysioNet, using only two ‘for’ loops and RDSAMP.
The WDFB Toolbox also provides functions useful for processing physiological signals. Some of these functions consist of MATLAB/Octave wrappers for open-source C-code functions published in the literature and contributed by user’s to PhysioNet. Among the currently implemented wrappers to popular third-party C-code software are ECGPUWAVE [2–5], EDR [6], MSENTROPY [7–8], and WABP [9]. The WFDB Toolbox also contains a wrapper, BXB, to a function for testing and reporting performance results of cardiac rhythm and ST segment measurement algorithms according to ANSI/AAMI EC38:1998 [10–11]. Thus this library and the databases provide a vital resource for MATLAB and Octave users who want to learn, validate, and compare different biosignal processing algorithms.
Implementation and architecture
A schematic diagram of the software architecture is shown in Figure 2. The top level of the toolbox consists of HTML documentation files and *.m files. The MATLAB/Octave layer is responsible for interfacing between the user and the toolbox. Additional files not shipped with the toolbox, but available at the code repository, are used for unit testing at the MATLAB/Octave layer. This MATLAB/Octave layer is linked through a Java API (provided either through MATLAB or Octave) to a set of Java classes. These Java classes are responsible for path configuration, library/binary loading, I/O parsing, multi-thread processing, and basic database queries. The Java classes are linked to WFDB native binaries through standard input, output, and error pipes that are created when the JVM performs a system call. An example of this framework in the specific case of reading PhysioNet data using RDSAMP on a Windows environment is shown in Figure 3.
Quality control
A unit-test framework has been specifically developed for the toolbox, in order to ensure consistent testing in both MATLAB and Octave environments. The goal of the unit tests is to certify a minimum quality prior to public releases. These test suites were individually run on 64-bit versions of GNU Octave 3.6.4, MATLAB 2013a/2013b, Windows 7, Mac OS X 10.9, and Linux Ubuntu 13. These tests ensure that all documented examples work as expected in all the supported environments. In some cases, tests for known issues were also added. These issues are not yet fixed, but have been documented through the repository tracking system. The unit test framework, and the list of known issues and bugs in the code repository are updated and maintained by the PhysioNet developers.
(2) Availability
Operating system
The software was tested on 64-bit versions of Linux, Mac OS X 10.9, and Windows 7. The WFDB Toolbox for MATLAB/Octave can be configured to work on other systems, but support is not provided for systems other than those in which unit tests were performed.
Programming language
Java 1.6, MATLAB 2013a/2013b, C, bash, and Octave 3.6.4 or higher.
Additional system requirements
N/A
Dependencies
Libcurl 7.33.0 or higher for accessing PhysioNet databases via a HTTP connection.
List of contributors
Michael Craig and Daniel J. Scott helped with the development of the first few revisions of the alpha version of the software.
Gari D. Clifford provided valuable guidance on toolbox requirements and features.
Developers who have contributed open-source C code to PhysioNet that is implemented in the WFDB Toolbox for MATLAB/Octave are credited on the help pages of the respective MATLAB wrappers to their software.
An up-to-date list of users who have contribute with bug reports, fixes, testing, or enhancement requests is maintained at the project’s web page in PhysioNet.
Archive
-
Name
PhysioNet
-
Persistent identifier
-
License
GNU GPL v3
-
Publisher
PhysioNet
-
Date published
11/02/2014
Code Repository
-
Name
Google Code
-
Identifier
-
License
GNU GPL v3
-
Date published
11/02/2014
Language
Java, MATLAB, C, Octave, POSIX
(3) Reuse potential
This software should be of interest to any user who wishes to do signal processing research with biomedical data. This software can be used as valuable resource for reporting and validating scientific and industry results. PhysioNet encourages the use of this toolbox and its accessible databases for educational purposes as well.
Acknowledgments
Funding Statement: This work was supported by NIH/NIGMS grant R01-GM104987.
The author wishes to thank Ken Pierce for providing assistance with the manuscript.
References
- 1.Goldberger AL, et al. PhysioBank, PhysioToolkit, and PhysioNet: Components of A New Research Resource for Complex Physiologic Signals. Circulation. 2000;101(23):E215–E220. doi: 10.1161/01.cir.101.23.e215. http://dx.doi.org/10.1161/01.CIR.101.23.e215. [DOI] [PubMed] [Google Scholar]
- 2.Pan J, Tompkins WJ. A Real-time QRS Detection Algorithm. IEEE transactions on Bio-medical Engineering. 1985;32(3):230–236. doi: 10.1109/TBME.1985.325532. http://dx.doi.org/10.1109/TBME.1985.325532. [DOI] [PubMed] [Google Scholar]
- 3.Laguna P. Thesis (PhD) Science Faculty, University of Zaragoza; 1990. New Electrocardiographic Signal Processing Techniques: Application to Long-term Records. [Google Scholar]
- 4.Laguna P, Jané R, Caminal P. Automatic Detection of Wave Boundaries in Multilead ECG Signals: Validation with the CSE Database. Computers and Biomedical Research, an International Journal. 1994;27(1):45–60. doi: 10.1006/cbmr.1994.1006. http://dx.doi.org/10.1006/cbmr.1994.1006. [DOI] [PubMed] [Google Scholar]
- 5.Jane R, et al. Evaluation of An Automatic Threshold Based Detector of Waveform Limits in Holter ECG with the QT Database. Computers in Cardiology 1997 [Google Scholar]
- 6.Moody GB, Mark RG, Zoccola A, Mantero S. Derivation of Respiratory Signals from Multi-lead ECGs. Computers in Cardiology. 1985;12(1985):113–116. [Google Scholar]
- 7.Costa M, Goldberger AL, Peng C-K. Multiscale Entropy Analysis of Biological Signals. Physical review E, Statistical, nonlinear, and soft matter physics. 2005;71(1):021906. doi: 10.1103/PhysRevE.71.021906. http://dx.doi.org/10.1103/PhysRevE.71.021906. [DOI] [PubMed] [Google Scholar]
- 8.Costa M, Goldberger AL, Peng C-K. Multiscale Entropy Analysis of Complex Physiologic Time Series. Physical review letters. 2002;89(6):068102. doi: 10.1103/PhysRevLett.89.068102. http://dx.doi.org/10.1103/PhysRevLett.89.068102. [DOI] [PubMed] [Google Scholar]
- 9.Zong W, et al. An Open-source Algorithm to Detect Onset of Arterial Blood Pressure Pulses. Computers in Cardiology 2003 [Google Scholar]
- 10.American National Standard. ANSI/AAMI EC38:1998, Ambulatory Electrocardiographs. 1998. [Google Scholar]
- 11.American National Standard. ANSI/AAMI EC57:1998, Testing and Reporting Performance Results of Cardiac Rhythm and ST Segment Measurement Algorithms. 1998. [Google Scholar]