# Command line conversion of DICOM images and RTStruct to NRRD

**URL:** <https://discourse.slicer.org/t/command-line-conversion-of-dicom-images-and-rtstruct-to-nrrd/3950>\
**Category:** Support\
**Tags:** dicom\
**Created:** [August 30, 2018, 1:59pm UTC](https://discourse.slicer.org/t/command-line-conversion-of-dicom-images-and-rtstruct-to-nrrd/3950 "2018-08-30T13:59:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_Marcus](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@Daniel\_Marcus](https://discourse.slicer.org/u/Daniel_Marcus)\
**Post date:** [August 30, 2018, 1:59pm UTC](https://discourse.slicer.org/t/command-line-conversion-of-dicom-images-and-rtstruct-to-nrrd/3950/1 "2018-08-30T13:59:08Z")

</div>

Hey all,

We’re looking to convert DICOM images and associated RTStructs to NRRD from the command line (actually as an automation in XNAT). Before we dig in, I just wanted to check on the state of the art for doing this with Slicer/SlicerRT. It looks like [Steve was making progress on this](https://github.com/Radiomics/pyradiomics/issues/263) via pyradiomics as was [Andrei via QIICR](https://github.com/QIICR/dcmheat/blob/master/docker/SlicerConvert.py). Are those the best examples for us to be working from? Or is there other code around that we haven’t come across yet?

Thanks in advance,  
Dan

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [August 30, 2018, 9:03pm UTC](https://discourse.slicer.org/t/command-line-conversion-of-dicom-images-and-rtstruct-to-nrrd/3950/2 "2018-08-30T21:03:35Z")

</div>

Howdy Dan -

Did you look at [plastimatch](http://plastimatch.org/)? I’ve heard it works well and would be good for batches.

The SlicerRT based one you linked to was also working well for me. It turned out the data I was trying to convert was fundamentally flawed so I didn’t end up using it (something about the table being moved during therapy but not recorded in the files). Other than that I believe it works well and it can sometimes be useful to load the original RT data in Slicer anyway for QC before exporting the labelmaps.

Best,  
Steve
