Core library of dicompyler
Project description
Core functionality of 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 dose volume histogram (DVH) calculation if dose grid and structure data is present
Other information
Free software: BSD license
Documentation: Read the docs
Tested on Python 2.7/3.3+
Dependencies
numpy 1.2 or higher
pydicom 0.9.9 or higher
pydicom 1.0 is preferred and can be installed via pip using: pip install https://github.com/darcymason/pydicom/archive/master.zip
matplotlib 1.3.0 or higher (for DVH calculation)
six 1.5 or higher
Optional:
Pillow (for image display)
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")
dvh = dvh.DVH.from_dicom_dvh(rtdose.ds, 5)
>>> dvh.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'))
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
History
0.5.2 (2016-07-25)
0.5.1 (2016-02-17)
Added support for pydicom 0.9.9 so releases from PyPI can be built.
0.5.0 (2016-02-11)
First release on PyPI.
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
Built Distribution
File details
Details for the file dicompyler-core-0.5.2.1.tar.gz
.
File metadata
- Download URL: dicompyler-core-0.5.2.1.tar.gz
- Upload date:
- Size: 2.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | efc21c1a818053eba487f6d315ce8ec443e77b20d0b49eae01c894aed199cb74 |
|
MD5 | 9c7c85cccc1ed132e11aa2c01af870b4 |
|
BLAKE2b-256 | f95d7f7db5f629968f8d874fad8215a6032c0accedbf07d1e56174477d0a22aa |
File details
Details for the file dicompyler_core-0.5.2-py2.py3-none-any.whl
.
File metadata
- Download URL: dicompyler_core-0.5.2-py2.py3-none-any.whl
- Upload date:
- Size: 27.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 823a6472a719427451d04b9c5c1f5fe7f6aae176fdc1039da60a353e3e66f490 |
|
MD5 | 4e0d3207bdd4a1252b521f311666038f |
|
BLAKE2b-256 | 57843a582a5037a1776ac93c8e264903efc642852bc9f43a04436bf0d7cba6cd |