Skip to main content

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.

  1. Set --ecg_xml_path to the directory containing the XML files to be converted.

  2. Set --output_dir to the directory where you want the converted DICOM files to be saved. The default is ecg_dicom.

  3. If you want to enable debug mode, set --debug to True. Only the first --debug_n files will be processed in this mode. The default value for --debug is False, and the default value for --debug_n is 5 when --debug is enabled.

  4. 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: ecg_dicom.png

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xml2dcm_ecg-1.1.5.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xml2dcm_ecg-1.1.5-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file xml2dcm_ecg-1.1.5.tar.gz.

File metadata

  • Download URL: xml2dcm_ecg-1.1.5.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

Hashes for xml2dcm_ecg-1.1.5.tar.gz
Algorithm Hash digest
SHA256 e50a4ef8e69f1618df4525353b0530c24fb942cd5dd50e7bde59ed7feeb9623f
MD5 fdb12288dbddb2c7afbc24618c6a7564
BLAKE2b-256 ba9a60f16463d1990afe5c761c553a0bb6dd44644f6c2b24f2b186691b728a36

See more details on using hashes here.

File details

Details for the file xml2dcm_ecg-1.1.5-py3-none-any.whl.

File metadata

  • Download URL: xml2dcm_ecg-1.1.5-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

Hashes for xml2dcm_ecg-1.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 9a8aabf9f5c615c95f3ec9e058ebd32fb7136d2cd6679f361c0af782c90e1632
MD5 094268194f38888fe1e0878cd8f23996
BLAKE2b-256 592ed3dc57ed7c2b3fa72385d1ef48e4580bb7ebc477ae11b3a7360c9135e561

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page