tlt-dataconvert command does not work for ".dcm" images

I am trying to use tlt-dataconvert command to convert medical images to .nii.gz format. It works on .mhd to .nii.gz convertion, but not on .dcm to .nii.gz convertion with the error "File extension does not match expected format: dicom_to_nifty/luna/luna. Skipped!’

The command I used was strictly follow the “The Transfer Learning Toolkit Getting Started Guide” as

tlt-dataconvert -d /workspace/dicom_to_nifty/luna/luna -r 1 -s .dcm -e .nii.gz -o /workspace/dicom_to_nifty/dcm_images

Did anyone meet the same problem? And how did you fix it? Thanks!


Thanks for your interest in Clara train SDK.

Do your dcm Files have extension? Could you verify that the folders has files with .dcm as an extension ? if not then this a know bug that we are working on fixing. In the mean while if you add “.dcm” as a suffix to the names of the folders that contain the individual DCM images, then the data conversion would work successfully.

Hope that helps


Thanks for your reply.

It keeps failing. Cry…

Actually I have .dcm as extensions for all files in my data folder. And nothing except .dcm files are in the folder.

I am not working on multiple folders, just one folder with about 100 Dicom images. I have tried one folder with one dicom file, it failed. I have also tried to change my folder’s name with .dcm as a suffix, it also failed.

So far as I understand, the option -d should be followed by the directory of the folder that contains all dicom images, is this correct?

Hope it will work soon and thank you again.

Think I have solved the problem.
I added .dcm as a suffix to the folder that contains all .dcm files.
In the command after -d, just point to the parent directory of the .dcm folder and everything works. As:

tlt-dataconvert -d /workspace/dicom_to_nifty/luna -s .dcm -e .nii.gz -o /workspace/dicom_to_nifty/dcm_images

The luna folder contains a sub-folder with the name of luna.dcm
But btw, this function really puzzled me for a loooong time…