Topup: phase-encode directions are F-H and H-F

Dear experts

I’m experiencing an error with dwipreproc(topup) when the phase encoding directions are H-F and F-H. The error is:

Exception thrown with message: Topup: msg=TopupScan::TopupScan: third element of pevec must be zero

What should I do ?

Thank you !

Hi Liyuan,

The topup / eddy combo makes the assumption that the third axis corresponds to slices, particularly now with eddy's slice-to-volume motion correction. Therefore phase encoding can’t possibly occur along that axis.

What needs to be done is to permute the image axes so that the direction in which phase encoding was applied appears as one of the first two axes, perform the distortion correction, and then permute the axes back to their original order. This can be done using the -axes option in mrconvert.

I did make an attempt at doing so seamlessly within dwipreproc, but IIRC I got too frustrated because that script is a nightmare. So you’re stuck doing it on your own :sweat_smile:


Thanks! I got it :grinning: