Problem with sorting of DICOM images using mrconvert

Hi,

I recently ran into an issue converting DWI data from DICOM to .mif / .nii format using mrconvert. I was wondering if someone has had similar issues and has a solution.

When running mrconvert on my dataset, it converts the folder with all the separate dicom slices to a 4D volume, as expected. Spatially the slices are ordered correctly, but the slices are not properly sorted into volumes (stacks) by gradient direction, as the screenshot below of a sagittal slice of the first stack clearly shows. (Note that this is a lower leg, not a very weird looking brain :slight_smile:) The bright slices are the b0-images, which are interspersed with slices of other gradient directions. The other b0 slices are interspersed in other stacks. I don’t have this issue using dcm2niix: the first volume contains all b0 slices, followed by the slices of the other gradient directions in subsequent stacks. So one possible solution is to first convert to nii using dcm2niix, and then convert to MRtrix for further processing, but I would prefer to simply use mrconvert.

Any suggestions are highly appreciated!
Bart

image

Hi Bart,

DICOM sorting can indeed be problematic… I think this will require some investigation and changes to the DICOM handling code – any chance you could share an example dataset with this issue? Feel free to share it anyway you see fit with my gmail address: jdtournier@gmail.com

Cheers,
Donald.

Hi Donald

Thanks for your very quick response! I’ll send you a Google Drive link with an example dataset shortly.

Bart

Hi Bart,

Just to let you know I have the data, and I can reproduce the issue on my side. It might be a while before I can look into the issue properly though – lots of marking to finish off at the moment… :sob:

Cheers,
Donald.

Hi Donald
Thanks for looking into this, take your time of course. As I mentioned before, the sorting issues doesn’t occur in dcm2niix so that might hint at a solution.
Bart

OK, I’ve had a quick look into this, and it seems a simple fix might be all that’s required. I’ve started a pull request for this, but if you want to give it a shot straight away, these are the changes needed.

1 Like

Thanks for looking into this and providing a solution. I haven’t been able to test it yet, but will let you know if the issue is indeed resolved in next releases.
Bart

Hi Donald (or others)

Do you know if the DICOM sorting issue has been implemented already in the most recent release of MRtrix? Or do I need to compile from source to get this implemented? We’re still experiencing issues with DICOM sorting in DTI scans from our Philips Ingenia CX.

Cheers, Bart

You have to install from source (or wait for the 3.0.4 release). Instructions on installing from source can be found in the documentation: Building MRtrix3 from source — MRtrix 3.0 documentation

1 Like