Reading DICOM-RT files

Hello,

I’d like to read DICOM-RT Structure Set files in my application. Is the method described in the paper below the best way to do this using ITK?
http://www.insight-journal.org/browse/publication/887

The paper uses some basic GDCM APIs to convert DICOM-RT files into images. I just want to confirm that this is still the best way, and there are no higher-level filters or classes for the task in ITK.

Thanks,
–Fijoy

I don’t think ITK can create high-quality surfaces from the usual poor-quality RT contours (planar contours with large spacing, potentially with branches, keyholes, etc). There is a contour converter class in 3D Slicer’s SlicerRT extension that you may use: either take the parts that you need (mostly in this class) or use 3D Slicer’s end-to-end solution for DICOM RT structure set, dose map, plan, and image import/export, visualization, and analysis. 3D Slicer contains ITK (accessible from both C++ and Python), so you should be able to use ITK within Slicer to do any kind of processing or analysis.

2 Likes

You can also consider command line converter provided in Plastimatch: http://plastimatch.org/plastimatch.html.

If you compare both approaches, it would be good if you could share your experience!

1 Like

Hello

I reopen that topic because I am in a similar case.
I also want to read my DICOM-RT structure set files with sitk, but I don t know how.

Could you explain how can I use Plastimatch on python to convert RT and read them

I am a beginner in using python and sitk

I figure it out how to do it but still facing some issues…
i run :

“plastimatch convert
–input structures.dcm
–output-ss-img outfile.nrrd
–output-ss-list outfile.txt”

and that s the error they are showing me :

[nrrd] nrrdSave: couldn’t fopen(“outfile.nrrd”,“wb”): Permission denied
save_ss_img: save_ss_list
Could not open ss_list file for write: outfile.txt

Why isn t it working ?

Try putting full paths there, such as C:/image/outfile.nrrd. You might be running as ordinary user, and might not have permission to write to whatever is the current directory.

C:\Program Files\Plastimatch>plastimatch convert --input RT_essai.dcm --output-ss-img C:/Program Files/Plastimatch/outfile.nrrd --output-ss-list outfile.txt
Error. Unknown option Files/Plastimatch/outfile.nrrd

When the path has spaces, you need to put it in quotes ... --output-ss-img "C:/Program Files/Plastimatch/outfile.nrrd" --output-ss-list ...

1 Like