Skip to main content

A library of core radiation therapy modules for DICOM / DICOM RT used by dicompyler

Project description

Binder pypi travis-ci coveralls Codacy Codecov Documentation Status Zenodo

A library of core radiation therapy modules for DICOM / DICOM RT used by dicompyler. This package includes:

  • dicomparser: parse DICOM objects in an easy-to-use manner

  • dvh: Pythonic access to dose volume histogram (DVH) data

  • dvhcalc: Independent DVH calculation using DICOM RT Dose & RT Structure Set

Other information

Dependencies

  • numpy 1.2 or higher

  • pydicom 0.9.9 or higher (pydicom 1.0 compatible)

  • matplotlib 1.3.0 or higher (for DVH calculation)

  • six 1.5 or higher

  • Optional:

Basic Usage

from dicompylercore import dicomparser, dvh, dvhcalc
dp = dicomparser.DicomParser("rtss.dcm")

# i.e. Get a dict of structure information
structures = dp.GetStructures()

>>> structures[5]
{'color': array([255, 128, 0]), 'type': 'ORGAN', 'id': 5, 'empty': False, 'name': 'Heart'}

# Access DVH data
rtdose = dicomparser.DicomParser("rtdose.dcm")
heartdvh = dvh.DVH.from_dicom_dvh(rtdose.ds, 5)

>>> heartdvh.describe()
Structure: Heart
DVH Type:  cumulative, abs dose: Gy, abs volume: cm3
Volume:    437.46 cm3
Max Dose:  3.10 Gy
Min Dose:  0.02 Gy
Mean Dose: 0.64 Gy
D100:      0.00 Gy
D98:       0.03 Gy
D95:       0.03 Gy
D2cc:      2.93 Gy

# Calculate a DVH from DICOM RT data
calcdvh = dvhcalc.get_dvh("rtss.dcm", "rtdose.dcm", 5)

>>> calcdvh.max, calcdvh.min, calcdvh.D2cc
(3.0899999999999999, 0.029999999999999999, dvh.DVHValue(2.96, 'Gy'))

Advanced Usage and Examples can be found in Binder: Binder

Citing dicompyler-core

A DOI for dicompyler-core with various citation styles can be found at Zenodo: Zenodo

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

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

dicompyler-core-0.5.5.tar.gz (2.6 MB view details)

Uploaded Source

Built Distribution

dicompyler_core-0.5.5-py2.py3-none-any.whl (26.3 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file dicompyler-core-0.5.5.tar.gz.

File metadata

  • Download URL: dicompyler-core-0.5.5.tar.gz
  • Upload date:
  • Size: 2.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.26.0 CPython/3.7.3

File hashes

Hashes for dicompyler-core-0.5.5.tar.gz
Algorithm Hash digest
SHA256 728dcd144308e3e872648756c2b557139fb4d682f770d74df69cf8f13654b209
MD5 8aba03b6cbbff4edf27c7a601c16b00f
BLAKE2b-256 cbf38e26a47b72848909675ea0bb6c969196630ed484f2bb956fd3987b78f151

See more details on using hashes here.

File details

Details for the file dicompyler_core-0.5.5-py2.py3-none-any.whl.

File metadata

  • Download URL: dicompyler_core-0.5.5-py2.py3-none-any.whl
  • Upload date:
  • Size: 26.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.26.0 CPython/3.7.3

File hashes

Hashes for dicompyler_core-0.5.5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 2a2eb89f7251982befd701c161d6a5d889fc5ee246aa87a3bd9608e969ac26d3
MD5 649629620dcc82bb6764dfde1620adcd
BLAKE2b-256 c2d510b9a4a7f935d4ddff17506a5158093a9a7f0a1f2c576e2f1ec52e3f0c5e

See more details on using hashes here.

Supported by

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