Dwipreproc problem(dwipreproc:853)

Hello every experts!

I’m doing pre-processing with mrtrix3 but I have some problem…

How can I solve it?

You can use only eddy instead of eddy_openMp or else try eddy_correct input_data output_data 0

This error is internal to FSL’s eddy command, so it’s hard to tell exactly what the problem is. But it seems to be complaining about the DW encoding, so maybe you could tell us a bit about your acquisition. Maybe by running:

mrinfo -shell_size -shell_bvalue 3test.mif

and

mrinfo -dwgrad 3test.mif

I strongly recommend against ever using eddy_correct. I’ve often seen it corrupt otherwise perfectly usable data…

This error is internal to FSL’s eddy command, so it’s hard to tell exactly what the problem is. But it seems to be complaining about the DW encoding, so maybe you could tell us a bit about your acquisition. Maybe by running:

mrinfo -shell_size -shell_bvalue 3test.mif

and

mrinfo -dwgrad 3test.mif

Dear sir, I also met this problem (dwipreproc:853) in one of my data cohorts, but no error is reported when preprocessing another data set. And I check the MR acquisition of the problematic one, and list the parameters as following. Could you help me to figure out the potential issue?

 $ mrinfo -dwgrad 1/001_noliv/dwi_denoised_unringed.mif
0 0 0 0
0.499998 0.499998 -0.70711 1000
0.499998 0.499998 0.70711 1000
-0.707107 0.707107 3.28E-09 1000
0.653288 0.270606 -0.707098 1000
0.208664 0.67563 -0.707095 1000
-0.0196577 0.706829 -0.707112 1000
-0.421225 0.56795 -0.707109 1000
-0.689925 0.154927 -0.707108 1000
0.653495 0.270675 -0.70688 1000
0.292882 0.707102 -0.643604 1000
-0.294515 0.706411 -0.643619 1000
-0.514993 0.486072 -0.706056 1000
-0.707102 0.292882 -0.643604 1000
0.707102 0.472485 -0.526084 1000
0.472486 0.707102 -0.526084 1000
-0.555492 0.64395 -0.526077 1000
-0.707102 0.472485 -0.526084 1000
0.707107 0.707107 -0.000212121 1000
0.707102 0.472485 0.526084 1000
-0.707102 0.472486 0.526084 1000
-0.472486 0.707102 0.526084 1000
0.707085 0.707085 0.00784865 1000
0.636392 0.425181 0.643604 1000
0.706047 0.706047 0.0547301 1000
0.292882 0.707102 0.643604 1000
-0.292882 0.707102 0.643604 1000
-0.707085 0.707085 0.00784865 1000
-0.707102 0.292882 0.643604 1000
0.70626 0.70626 0.0489319 1000
-0.0347188 0.706256 0.707105 1000
-0.70706 0.70706 0.0115262 1000
-0.707107 -5.07E-09 0.707107 1000
0 0 0 0
mrinfo -shell_size -shell_bvalue /home/zhangjie/data/obesity_20211207/1/001_noliv/dwi
mrinfo: [100%] reading DICOM series "DTI_high32_iso_2"
0 1000 
2 32

But when I check the files bvecs and bvals produced after the command during dwipreproc:

mrconvert dwi.mif -import_pe_table dwi_manual_pe_scheme.txt eddy_in.nii -strides -1,+2,+3,+4 -export_grad_fsl bvecs bvals -export_pe_eddy eddy_config.txt eddy_indices.txt

file bvals contains 33 volumes of b=1000 and only one volume of b=0 (the last 1000 was turned into 0):

0
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000

file bvecs is also different from that from mrinfo -dwgrad, but the last row is still 0:

0 0 0
-0.467756969 0.621062942 -0.628875368
-0.48175409 0.417370363 0.770529052
0.741020966 0.663383579 0.10397173
-0.63214521 0.402038663 -0.662387581
-0.168145641 0.780032047 -0.602724646
0.061423835 0.799421234 -0.597622541
0.45564826 0.642033521 -0.616585474
0.703679297 0.220370714 -0.675479222
-0.632350791 0.402085533 -0.662162894
-0.251336502 0.806214102 -0.53558264
0.335285079 0.776082934 -0.53411531
0.545257995 0.556260995 -0.627110355
0.726997012 0.346703745 -0.592681968
-0.677746073 0.578182587 -0.454274378
-0.431876962 0.79829175 -0.419776735
0.59169572 0.6843384 -0.426118714
0.734674285 0.507279876 -0.450467398
-0.671406818 0.734317321 0.099954822
-0.688159833 0.426637066 0.58687044
0.724260527 0.355734363 0.590677361
0.501488504 0.599369049 0.623911848
-0.671465945 0.733133664 0.107928057
-0.621030662 0.359413658 0.696521869
-0.67094434 0.725303329 0.154171351
-0.264076595 0.620815206 0.738140928
0.320948134 0.591447292 0.73971778
0.740920485 0.662232715 0.11173495
0.714256948 0.161304838 0.68104166
-0.671088998 0.726359427 0.148463999
0.06244068 0.594408294 0.801735589
0.740857665 0.661679373 0.1153703
0.6992164 -0.137297395 0.701602321
0 0 0

So, if I have tried to delete the last volume, the error dtwipreproc:853 would not appear. Could you tell me the reason?

I think I find the reason: the final volume in the dicom file of dwi might be ADC. When I convert the dicom file to nii using MRIcon, two nii files are produced: one is dti with 33 volumes (32 b=1000 and one b=0), and the other nii file named ADC with 34 volumes:

So, should the final volume ADC be deleted from the total 34 volumes of dwi dicom file before dwipreproc?

Hi @Jallyson,

If your DWI series contains a volume containing a pre-calculated ADC, this will indeed need to be erased prior to processing; this includes prior to the dwidenoise step, as such a generated volume will not possess the same noise level as the raw DWI data. A similar issue has been observed elsewhere with Philips data including a calculated trace-weighted volume at the end of the series (e.g. #2172) that is not adequately identified based on the gradient table alone.

Cheers
Rob

Hi @Jallyson,

Any chance you could share this dataset with me so I can figure out how to deal with these issues? I had hoped that changes I’d made to the DICOM handling a while back would have dealt with this by splitting up the series, as MRIcron seems to do, so I’d be interested to work out why this isn’t working as expected.

Thanks!
Donald.