Python-based solution for converting ECG data from XML format to the DICOM(Digital Imaging and Communications in Medicine) format
Project description
XML2DCM-ECG
Description
This repository contains a Python-based solution for converting ECG data from XML format to the DICOM (Digital Imaging and Communications in Medicine) format. The goal of this project is to facilitate the process of transforming clinical ECG data stored in XML files into a standardized, widely-used DICOM format, which is essential for healthcare systems, medical imaging devices, and Electronic Health Record (EHR) systems.
The solution handles the extraction and conversion of ECG information, including patient details, acquisition context, and waveform data, from XML files into the DICOM format. The project also integrates essential metadata such as the type of ECG lead (e.g., Lead I, Lead II), device information (e.g., acquisition device, software versions), and patient demographics.
Installation
You can install XML2DCM-ECG directly from PyPI:
pip install XML2DCM-ECG
Usage
After installation, you can run the ECG XML-to-DICOM converter directly using the command-line interface.
-
Set
--ecg_xml_pathto the directory containing the XML files to be converted. -
Set
--output_dirto the directory where you want the converted DICOM files to be saved. The default isecg_dicom. -
If you want to enable debug mode, set
--debugtoTrue. Only the first--debug_nfiles will be processed in this mode. The default value for--debugisFalse, and the default value for--debug_nis5when--debugis enabled. -
Run the following command to convert the XML files to DICOM format:
xml2dcm-ecg --ecg_xml_path /path/to/xml_files --output_dir /path/to/save_dicom --debug True --debug_n 5
Example results
The following are examples of the ECG data converted from XML to DICOM format:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xml2dcm_ecg-1.1.4.tar.gz.
File metadata
- Download URL: xml2dcm_ecg-1.1.4.tar.gz
- Upload date:
- Size: 11.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1793d02be1772b0138bf81332c2e07094656c8667dac9f2f1ea32540582e10b9
|
|
| MD5 |
0413ee4b962d97893679bc78c7fee85a
|
|
| BLAKE2b-256 |
70025e179c6ec77bed80e9b9573ae5b0554f7f6fefbe355d790ed6c28ceea6d8
|
File details
Details for the file xml2dcm_ecg-1.1.4-py3-none-any.whl.
File metadata
- Download URL: xml2dcm_ecg-1.1.4-py3-none-any.whl
- Upload date:
- Size: 12.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
113a3738f1c163c89827a4c909fba90522056d9b01d6c205e3a00e1bd4a508a9
|
|
| MD5 |
51be122b280c29f7cb584d0be2872d90
|
|
| BLAKE2b-256 |
15457f8bd9e41cd35689086f412e8fe08926f17b04055b444bc4c0092913d512
|