Sikerdebaard / dcmrtstruct2nii

DICOM RT-Struct to mask
MIT License
91 stars 27 forks source link

'/' in VOI name #1

Closed xfuren closed 5 years ago

xfuren commented 5 years ago

Although it may be against the principle, some VOI name may contain '/' (slash). It will cause the following error...


** ERROR (nifti_image_write_hdr_img2): cannot open output file '/case2018.08.22.13.06.34/mask_TumorSite(CTV)-27/3fr.nii.gz'

Is it possible to replace '/' to some other character before trying to output the mask file?

Sikerdebaard commented 5 years ago

Ah yes this seems important.

I've uploaded a new version (pip install --upgrade dcmrtstruct2nii==1.0.15) that tries to sanitize the mask names. Filenames for the masks are now generated using this piece of code: https://github.com/Sikerdebaard/dcmrtstruct2nii/blob/v1.0.15/dcmrtstruct2nii/adapters/convert/filenameconverter.py

Does this solve the issue for you?