GithubHelp home page GithubHelp logo

shifeng1981 / dicompyler-core Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dicompyler/dicompyler-core

0.0 1.0 0.0 2.73 MB

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

Home Page: https://dicompyler-core.readthedocs.io

License: Other

Python 98.19% Makefile 1.81%

dicompyler-core's Introduction

dicompyler-core

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.

dicompyler-core's People

Contributors

bastula avatar davidchall avatar gacou54 avatar gertsikkema avatar inamoto85 avatar nicocrm avatar pyup-bot avatar wkt84 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.