Dwipreproc - Eddy error: global index not dwi


I’ve been trying to preprocess my data and got a few errors during the dwipreproc step. I used the following line:

dwipreproc 202dwi_den_unr.mif 202dwi_den_unr_mdc.mif -pe_dir AP -rpe_pair -se_epi 202dwi_b0_re.mif -eddy_options " --slm=linear"

After this line I got the error that my data wasn’t shelled so I added the data_is_shelled flag.
This brings me to the next error:

dwipreproc: [ERROR] Command failed: eddy_openmp --imain=eddy_in.nii --mask=eddy_mask.nii --acqp=eddy_config.txt --index=eddy_indices.txt --bvecs=bvecs --bvals=bvals --topup=field --data_is_shelled --out=dwi_post_eddy (dwipreproc:853)
dwipreproc: Output of failed command:
eddy: msg=ECScanManager::GetGlobal2DWIIndexMapping: Global index not dwi
terminate called after throwing an instance of ‘EDDY::EddyException’
what(): eddy: msg=ECScanManager::GetGlobal2DWIIndexMapping: Global index not dwi

So far I can’t seem to find a solution and I was hoping someone knows how to solve this error


Hi Ida,

That error is coming from deep inside eddy code, and I’ve never encountered it myself, so unfortunately I can’t help beyond suggesting the FSL forum. Always a chance that somebody else on here has come across it though.


Hi Rob,

Thanks for your reply!
I’ve heard someone who had the same problem and to him it was suggested to use the --ol_nstd and raise it to 5 or 6 so I’ll give that a try.
If/when I found a solution I will let it know!


So the --ol_nstd option didn’t work out either.
Someone mentioned to check the DWI images more carefully and it turned out my b100 images were the problem.
After leaving them out it was solved, so for now I will continue without those images

I am having this issue with scans obtained from NDAR. This must be generic to the sequence rather than just one scan since it happens on all the scans. What was it about your b100 sequence that corrected this?

For others that experience this issue, it might be worth looking at your b-value file to see how many shells were acquired. For example, I saw the same error for some OASIS-3 data. This sequence acquired 48 volumes sampling MANY b-values, so there is not a good estimate for any shell across the b-vector directions. The bvalue file looked like this:

0 50 350 600 900 1150 100 400 650 950 150 450 700 1000 1300 200 500 800 1050 1350 300 850 1100 1400 0 50 350 600 900 1150 100 400 650 950 150 450 700 1000 1300 200 500 800 1050 1350 300 850 1100 1400

The Eddy documentation notes:

At the moment eddy works for single- or multi-shell diffusion data, i.e. it doesn’t work for DSI data. In order to ensure that the data is shelled `eddy “checks it”, and only proceeds if it is happy that it is indeed shelled. The checking is performed through a set of heuristics such as i) how many shells are there? ii) what are the absolute numbers of directions for each shell? iii) what are the relative numbers of directions for each shell? etc. It will for example be suspicious of too many shells, too few directions for one of the shells etc.

I suspect this is the reason FSL still distributes eddy_correct. I think eddy_correct will work on these datasets. Albeit, eddy_correct is very constrained (as I recall, it is essentially an affine coregistration).

1 Like

Rather than excluding the b=100 shell, you can change the 100 values to 101 in the .bval file. It might even work to change 100 to 100.01, although I haven’t tested that. Changing to 101 does not cause any issues with the data, as far as our tests have shown (internal analyses). Others could verify this is true for your data before proceeding.