Skip to content

Instantly share code, notes, and snippets.

@nbassler
Last active June 21, 2018 12:30
Show Gist options
  • Save nbassler/5cbfe96b1313b67ef0fb238bc0f6c50e to your computer and use it in GitHub Desktop.
Save nbassler/5cbfe96b1313b67ef0fb238bc0f6c50e to your computer and use it in GitHub Desktop.
PyTRiP read DICOM
# Example of how to load DICOM data using PyTRiP
# lots of DICOM may be found at SlicerRT
# https://github.com/SlicerRt/SlicerRtData
import pytrip as pt
dp = "/local/dicom/pinnacle3-9.9-phantom-imrt/"
dcm = pt.dicomhelper.read_dicom_dir(dp)
c = pt.CtxCube()
c.read_dicom(dcm)
v = pt.VdxCube(cube=c)
v.read_dicom(dcm)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment