Missing data after dwifslpreproc

Dear MRTrix experts,

I’ve encountered a problem when preprocessing (denoised, gibbs corrected) DWI data using dwifslpreproc:

dwifslpreproc ${force} ${path_dwi}/${current}/preproc/${current}_dwi_den_gibbs.mif ${path_dwi}/${current}/preproc/${current}_dwi_den_gibbs_preproc.mif -rpe_header -eddy_options " --slm=linear --repol" -eddy_mask ${path_dwi}/${current}/seg/${current}_DWI_preprocessing_mask.nii.gz

After this step, the first and last slices of my data disappear, and the second-to-last is cut in the middle. Those bits were present after mrdegibbs, and they seem to be covered by the mask. Any idea of what might be happening here? Apologies if I am missing something obvious, I’m a newbie to DWI processing.

Thank you very much for your help and the work you put in here.

Isabel

Second-to-last slice:

Last slice:

As a first guess, I’d say this is due to motion causing the bottom slices to be missing data for some of the volumes because these volumes might have shifted up over the course of the acquisition. Assuming that’s the problem, there’s not much we can do about it, I think this is what eddy will produce in this case, and to be fair it’s probably the most sensible thing to do…

You can check by going through the original data in mrview, displayed as a sagittal section: if some of the volumes end up shifted down compared to the first volume, then the registration will shift them back up, and that would explain what you’re getting.

Hi,
I have a kinda similar problem. I ran the commands below:

mrconvert b0_AP.nii.gz b0_AP.mif

mrconvert b0_PA1.nii.gz b0_PA1.mif -fslgrad bvec_PA bval_PA

mrconvert dwi.nii.gz dwi.mif -fslgrad bvec bval

dwidenoise dwi.mif dwi_den.mif -noise noise.mif

dwiextract dwi_den.mif -bzero b0_AP_ext.mif

mrcat b0_AP_ext.mif b0_PA1.mif -axis 3 b0_pair.mif

dwifslpreproc dwi_den.mif dwi_den_preproc.mif -nocleanup -pe_dir AP -rpe_pair -se_epi b0_pair.mif -eddy_options " --slm=linear --data_is_shelled"

After these steps, I wanted to start tractography by running this command:

dwi2response dhollander dwi_den_preproc.mif wm.txt gm.txt csf.txt

I got this error

mrstats: [ERROR] Cannot output statistic of interest; no values read (empty mask?)

dwi2response: [ERROR] Error trying to calculate statistics from image '_crudenonwm.mif'

Then I ran mrstat to see where the problem is, and this is what I got

 volume       mean     median        std        min        max      count
       [ 0 ]    107.838    32.1278    173.935   -207.511     3289.9     983040
       [ 1 ]    52.8768    31.5951    49.8871    -4.7955    567.185     983040
       [ 2 ]    4.39954          0    15.9057 -0.00832543    322.236     983040
       [ 3 ]          0          0          0          0          0     983040
       [ 4 ]          0          0          0          0          0     983040
       [ 5 ]          0          0          0          0          0     983040
       [ 6 ]          0          0          0          0          0     983040
       [ 7 ]          0          0          0          0          0     983040
       [ 8 ]          0          0          0          0          0     983040
       [ 9 ]          0          0          0          0          0     983040
      [ 10 ]          0          0          0          0          0     983040
      [ 11 ]          0          0          0          0          0     983040
      [ 12 ]          0          0          0          0          0     983040
      [ 13 ]          0          0          0          0          0     983040
      [ 14 ]          0          0          0          0          0     983040
      [ 15 ]          0          0          0          0          0     983040
      [ 16 ]          0          0          0          0          0     983040
      [ 17 ]          0          0          0          0          0     983040
      [ 18 ]          0          0          0          0          0     983040
      [ 19 ]          0          0          0          0          0     983040
      [ 20 ]          0          0          0          0          0     983040
      [ 21 ]          0          0          0          0          0     983040
      [ 22 ]          0          0          0          0          0     983040
      [ 23 ]          0          0          0          0          0     983040
      [ 24 ]          0          0          0          0          0     983040
      [ 25 ]          0          0          0          0          0     983040
      [ 26 ]          0          0          0          0          0     983040
      [ 27 ]          0          0          0          0          0     983040
      [ 28 ]          0          0          0          0          0     983040
      [ 29 ]          0          0          0          0          0     983040
      [ 30 ]          0          0          0          0          0     983040

Do you know why all these values turn into zero while they are not zero in the original diffusion image and also after denoising?

Thanks,
Maryam

OK, not something I’ve come across before… Just to confirm, the mrstats output you’re showing is for the dwi_den_preproc.mif image, but the dwi_den.mif image is OK?

Assuming that’s the case, does the b0_pair.mif image look sensible, for all volumes? Can I also check that the image you’ve provided to the -se_epi option of dwifslpreproc (b0_pair.mif) matches all the requirements stated in the docs:

Note that with the -rpe_pair option used here, which indicates that the SE-EPI image series contains one or more pairs of b=0 images with reversed phase encoding, the FIRST HALF of the volumes in the SE-EPI series must possess the same phase encoding as the input DWI series, while the second half are assumed to contain the opposite phase encoding direction but identical total readout time.

Finally, could the issue be related to running out of storage space…?

Also, what’s the purpose of that first mrconvert b0_AP.nii.gz b0_AP.mif command? As far as I can tell, that output is unused.

Hopefully some of this will provide a clue as to what’s going on…

1 Like