Dwifslpreproc: topup not applied to outlier free data

Dear MRtrix3 community,

I realise this question could potentially require a simple yes or no kind of answer, but I just want to make sure that I am not missing anything very obvious on the functioning of the dwifslpreproc command.
Here is my call:

dwifslpreproc -force -nocleanup ${subID}_degibbs.mif ${subID}_geomcorr_eddytop.mif -pe_dir AP -readout_time 0.0203 \
-eddy_mask ../raw/${subID}_brain_mask.mif \
-eddy_options " --slm=linear --repol" -eddyqc_all eddyqctop/ \
-rpe_pair -se_epi ${subID}_topup_pair.mif

(background on sequence: 3 shells of b1000, b2000 and b3000 acquired in AP direction + 6 b0 volumes acquired in PA direction).

I would like to apply outlier correction to my data (with the eddy --repol option).
However, am I correct that dwifslpreproc does not allow applying the topup field to the _eddy.eddy_outlier_free_data? Meaning that only the main output image from eddy is corrected for EPI-induced susceptibility distortions, but not the image with the outlier slices being replaced?

If yes, then my workaround would be to use applytopup in FSL directly, having as input the _eddy.eddy_outlier_free_data.

Thanks in advance,


Hi Sam,

I’m struggling to figure out whether 1. there’s a misunderstanding on your end as to what is being output by eddy, or 2. a scepticism on my end as to what you’re trying to achieve.

So, facts first. The image “eddy_outlier_free_data”, as per the FSL documentation, contains a copy of the input DWIs, with the only manipulation being the replacement of outlier slices with data from the predictive model. However this does not mean that the primary output image of eddy does not also perform outlier replacement; it includes that, along with all of the geometric corrections.

  1. If what you want is your DWIs that possess both geometric distortion correction and replacement of outlier data, then eddy (and consequently dwifslpreproc) already provides this. The presence of image “eddy_outlier_free_data” is a red herring that has misled you into thinking that if that image contains outlier replacement, then the main output image must not.

  2. If what you want truly is your DWIs with outlier slices replaced with predicted data, and EPI susceptibility distortion correction applied, but motion / eddy current correction not applied, then your exotic use case should probably be interfacing with the FSL tools directly rather than trying to go through the dwifslpreproc convenience wrapper.

I hope that makes sense?

Hi Rob,

Thanks for your answer. You are indeed right to be puzzled, as I soon realised after posting this question that there was a misunderstanding on my side, that you perfectly summarised in point number 1).
So yes, your answer makes perfect sense and indeed, dwifslpreproc is doing exactly what I want.

Thanks for your time and apologies for the confusion!