Errors when converting DICOM to NRRD with DWIConvert

I am having difficulty converting DICOM files to nrrd using the DWIConvert module.

The following command gives the output below:

DWIConvert --inputDicomDirectory /path/to/dicom/files --outputVolume output.nrrd

======= DWI Convert Public Lib Ctest =========
Exception creating converter
itk::ExceptionObject (0x2f769d0)
Location: "unknown"
File: /home/kitware/Dashboards/Nightly/Slicer-0-build/BRAINSTools/DWIConvert/GenericDWIConverter.cxx
Line: 13
Description: itk::ERROR:  LoadFromDisk not relevant

Please add --conversionMode DicomToNrrd to the command line.

(not sure if Andras was helping you, but, x-ref DWI loading from DICOM which I’m looking at right now)

I have the same error after --conversionMode DicomToNrrd was added. I assumed DicomToNrrd was the default so I left it out the first time.

I have also just run DWIConvert through the GUI and receive the same error.

Is the data in this question yours? I just evaluated the sample data @lassoan shared there, for a similar error. If so, then we should consolidate the threads and figure out next steps. See:

No I am using different data than Andras. I am using data exported from a Bruker scanner (7T biospec). I am getting the same error on all the Bruker data I have tried (Diffusion and non-diffusion data).

Though I wonder if this is the wrong approach for what I am trying to do. I am hoping to automatically convert all DICOM files to Nrrd as data is acquired. What I have been doing is using the DICOM module to import data into slicer and then just saving as nrrd within the GUI. I thought the DWIConvert command line interface might be able to help me automate this.

I haven’t used DWIConvert with Bruker data, diffusion or otherwise, and the error message is not very helpful, unfortunately. But I do know there is currently no support for Bruker diffusion specifically in DWIConvert (this is a small animal magnet, correct?). If the non-diffusion volumes are “relatively sane” it probably could/should work but may require a bug report with sample data.

If the Slicer DICOM module interface works well, most steps should be accessible via a script in Python, as an alternative automation approach.

Yes it is a small animal magnet. Just scripting it with python does seem like it is probably the way to go. Thanks!

1 Like

Hi atbauman,

I am having the same issue as you. However, I could not figure out how you solved it from the selected solution. Would you mind elaborate a little bit? Thanks!

Hi @zjx1805 ,

I suppose calling this solved is not entirely accurate. I solved my issue of converting DICOM files to NRRD, though I ended up doing this without using the DWIConvert module. Instead I wrote a python script using Slicer’s python interpreter instead. The script basically uses the DICOM browser module to import dicom files, and then the Save module to convert them to NRRD. I was able to suppress all the graphical windows so the script can be run without actually opening the Slicer GUI.

Thank you for the clarification!