Bit-Exact Reconstruction and Certification of Electrocardiogram Waveforms from Vector-Encoded PDF Files
- 1Beth Israel Deaconess Medical Center
Abstract
ECG waveform data, which is increasingly required for artificial intelligence analyses, is often unavailable in raw data formats. Digitization can approximate original raw data from ECG images, but digitizers reconstruct ECG waveforms only approximately. Exact waveform reconstruction is needed to guarantee that any errors, even if small, do not unexpectedly propagate into downstream analyses. Portable document format (PDF) files containing vector graphics store waveforms derived directly from raw data. This improves reconstruction accuracy, but existing PDF reconstruction methods remain approximate because raw data values are rounded during PDF encoding/generation. Despite rounding, however, there is a 1:1 mapping between raw data and PDF-encoded values which can be reversed to recover the original raw data with no error. We developed open-source software in MATLAB and Python (http://github.com/BIVectors/pdf2ECG) for bit-exact waveform reconstruction of General Electric MUSE ECG PDFs based on double quantization of ECG waveform data. The software supports multiple PDF layouts and voltage gains, automatically flags waveform clipping under which exact reconstruction is not possible, and certifies if parameter values used for waveform reconstruction are consistent with parameter values used during PDF encoding. Accuracy was assessed by comparing PDF reconstructed waveforms to raw XML waveforms, and reconstruction parameters were perturbed to determine the accuracy of waveform certification. 1,632 PDF-XML pairs were assessed in 5 layouts, each at 3 gains. After software-identified waveform clipping was excluded, the software reconstructed 100% of ECG waveforms with zero error compared to ground-truth XML. Certification tests were extremely sensitive to minor perturbation in encoding parameters, and if passed, confirmed bit-exact waveform reconstruction without need for ground-truth comparisons. Although this method does not replace the need for general ECG image digitization, for MUSE generated PDFs this method is preferable to rasterization followed by image-based digitization.
Related
- Dynamic graph vector autoregression for characterizing cardiac electromechanical dynamics during incremental exercise from the joint phase space of electrocardiogram and phonocardiogram
- External validation of artificial intelligence-guided electrocardiogram (AI-ECG) in detecting asymptomatic left ventricular dysfunction: A systematic review and meta-analysis
- A multimodal optimisation framework for cardiac electrophysiology model personalisation using computed tomography and 12-lead electrocardiogram: Algorithm development and validation
- Foundation Model Artificial Intelligence for Electrocardiogram Detection of Rheumatic Mitral Stenosis
- Image-based deep learning for emergency electrocardiogram classification
BibTeX
@misc{abdelrahman2026bitexact,
title = {{Bit-Exact Reconstruction and Certification of Electrocardiogram Waveforms from Vector-Encoded PDF Files}},
author = {K. Abdelrahman and H. F. Stabenau and K. Patlatzoglou and A. Sau and B. Zeidaabadi and L. Pastika and N. S. Peters and F. S. Ng and D. B. Kramer and J. W. Waks},
howpublished = {medRxiv},
year = {2026},
month = sep,
doi = {10.64898/2026.09.23.26362281},
url = {https://www.medrxiv.org/content/10.64898/2026.09.23.26362281v1},
note = {CC BY-NC},
}
RIS
TY - UNPB
TI - Bit-Exact Reconstruction and Certification of Electrocardiogram Waveforms from Vector-Encoded PDF Files
AU - K. Abdelrahman
AU - H. F. Stabenau
AU - K. Patlatzoglou
AU - A. Sau
AU - B. Zeidaabadi
AU - L. Pastika
AU - N. S. Peters
AU - F. S. Ng
AU - D. B. Kramer
AU - J. W. Waks
PY - 2026
DA - 2026/09/23
PB - medRxiv
DO - 10.64898/2026.09.23.26362281
UR - https://www.medrxiv.org/content/10.64898/2026.09.23.26362281v1
AB - ECG waveform data, which is increasingly required for artificial intelligence analyses, is often unavailable in raw data formats. Digitization can approximate original raw data from ECG images, but digitizers reconstruct ECG waveforms only approximately. Exact waveform reconstruction is needed to guarantee that any errors, even if small, do not unexpectedly propagate into downstream analyses. Portable document format (PDF) files containing vector graphics store waveforms derived directly from raw data. This improves reconstruction accuracy, but existing PDF reconstruction methods remain approximate because raw data values are rounded during PDF encoding/generation. Despite rounding, however, there is a 1:1 mapping between raw data and PDF-encoded values which can be reversed to recover the original raw data with no error. We developed open-source software in MATLAB and Python (http://github.com/BIVectors/pdf2ECG) for bit-exact waveform reconstruction of General Electric MUSE ECG PDFs based on double quantization of ECG waveform data. The software supports multiple PDF layouts and voltage gains, automatically flags waveform clipping under which exact reconstruction is not possible, and certifies if parameter values used for waveform reconstruction are consistent with parameter values used during PDF encoding. Accuracy was assessed by comparing PDF reconstructed waveforms to raw XML waveforms, and reconstruction parameters were perturbed to determine the accuracy of waveform certification. 1,632 PDF-XML pairs were assessed in 5 layouts, each at 3 gains. After software-identified waveform clipping was excluded, the software reconstructed 100% of ECG waveforms with zero error compared to ground-truth XML. Certification tests were extremely sensitive to minor perturbation in encoding parameters, and if passed, confirmed bit-exact waveform reconstruction without need for ground-truth comparisons. Although this method does not replace the need for general ECG image digitization, for MUSE generated PDFs this method is preferable to rasterization followed by image-based digitization.
ER -