Nvmidl-dataconvert not able to convert Dicom RT Structure File to nii.gz


I am trying to convert a DICOM RT Structure file to nii,gz format for training. I am using the following command. I have appended -l as documented in Clara documentation.

nvmidl-dataconvert -d /workspace/clara-experiments/testdata/pros_rs_001 -r 1 -s .dcm -e .nii.gz -o /workspace/clara-experiments/testdata/convert -l

However I encountered the below error during the conversion.

root@1b9994571a00:/workspace/clara-experiments/testdata# nvmidl-dataconvert -d /workspace/clara-experiments/testdata/pros_rs_001 -r 1 -s .dcm -e .nii.gz -o /workspace/clara-experiments/testdata/convert -l

Converting dicom series 1 of 1 in .

WARNING: In /tmp/SimpleITK-build/ITK/Modules/IO/GDCM/src/itkGDCMSeriesFileNames.cxx, line 122

GDCMSeriesFileNames (0x1df1900): No Series can be found, make sure your restrictions are not too strong

Failed to convert image file: /workspace/clara-experiments/testdata/pros_rs_001. Skipped!

Am I using the correct command?


Thanks for your interest in Clara Train.

The conversion tool is mainly for converting dicom images not all dicom formats as Dicom RT and Dicom Seg. You could also use it to resample images or labels to change the resolution before training.
To convert RT struct may be you could try using something like https://pypi.org/project/dcmrtstruct2nii/

Hope that helps

Hi aharouni,

Thank you for the direction. I will try dcmrtstruct2nii.