Created
February 15, 2017 17:20
-
-
Save nbassler/688188e1ae65011849e7bc6e3cdc4637 to your computer and use it in GitHub Desktop.
PyTRiP test for loading dicoms
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pytrip as pt | |
dcmf = "/local/dicom/pinnacle3-9.9-phantom-imrt" | |
dcm = pt.dicomhelper.read_dicom_folder(dcmf) | |
basename = "foobar" | |
c = pt.CtxCube() | |
c.read_dicom(dcm) | |
vdx_cube = pt.VdxCube(cube=c) | |
vdx_cube.read_dicom(dcm) | |
vdx_cube.write_trip(basename + ".vdx") | |
c.write_trip_header(basename + pt.CtxCube.header_file_extension) | |
c.write_trip_data(basename + pt.CtxCube.data_file_extension) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment