Error using dwifslpreproc: topup fails

Dear MRtrix team,

I have an issue with the data preprocessing and I haven’t found the solution in the forum archive. The dwifslpreproc returns an error message:

$ dwifslpreproc dwi_den_degibbs_AP.mif dwi_den_degibbs_AP_preproc.mif  -rpe_header -se_epi dwi_b0_PA.mif  -eddy_options   " --slm=linear " -eddy_options " --data_is_shelled " -align_seepi
Command:  dirstat dwi.mif -output asym
dwifslpreproc: [WARNING] sampling of b=1000 shell is moderately asymmetric; distortion correction may benefit from use of: -eddy_options " ... --slm=linear ... "
dwifslpreproc: [WARNING] sampling of b=1700 shell is moderately asymmetric; distortion correction may benefit from use of: -eddy_options " ... --slm=linear ... "
dwifslpreproc: No phase-encoding contrast present in SE-EPI images; will examine again after combining with DWI b=0 images
dwifslpreproc: No phase-encoding contrast present in SE-EPI images; will examine again after combining with DWI b=0 images
Command:  dwiextract dwi.mif - -bzero | mrcat - se_epi.mif se_epi_dwibzeros.mif -axis 3
Command:  mrinfo dwi.mif -export_grad_mrtrix grad.b
Command:  mrconvert se_epi_dwibzeros.mif topup_in.nii -strides -1,+2,+3,+4 -export_pe_table topup_datain.txt
Command:  topup --imain=topup_in.nii --datain=topup_datain.txt --out=field --fout=field_map.nii.gz --config=/usr/share/fsl/5.0/etc/flirtsch/b02b0.cnf --verbose

dwifslpreproc: [ERROR] topup --imain=topup_in.nii --datain=topup_datain.txt --out=field --fout=field_map.nii.gz --config=/usr/share/fsl/5.0/etc/flirtsch/b02b0.cnf --verbose (dwifslpreproc:793)
dwifslpreproc: [ERROR] Failed command did not provide any output information

Here is a brief description of the dataset. It was acquired with anterior-posterior (AP) phase encoding and consists of 158 volumes (14 b0 volumes, and dwi volumes with b=1000, b=1700, b=2500). Two b0 volumes are in the beginning of the dataset, one b0 volume in the end of the dataset and the rest of b0 volumes are interspersed within the set. In addition, we have collected three b0 images with reversed PA phase encoding for the topup correction.

I wonder, whether the issue is related to the fact that there is an uneven number of b0 images with opposite phase encoding? It is also confusing why the command suggests to use the –slm=linear option if it was already set.
I would be grateful for your help or suggestions.

Best regards,
Maksym

Hi @Maksym,

It’s always tricky to diagnose silent failures of topup such as this one, where there isn’t even an error message to go on… However, given your command and acquisition protocol, I have a feeling that at least one (if not both) of the following issues may be relevant:

  • the data provided to the -se_epi option should consist of an even number of volumes, the first half of which should have the same PE direction as the main dMRI series, and the latter half the opposite PE direction. This isn’t immediately obvious from the help page, but it can be found in this section (for the case “DWIs all acquired with a single fixed phase encoding; but additionally a pair of b=0 images with reversed phase encoding to estimate the inhomogeneity field”):

    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.

    I mention this as a potential issue since the image you provide to that option is labelled dwi_b0_PA.mif, which suggests it only contains the reversed PE directions, without the matching non-reversed PE directions.

  • Your use of the -rpe_header implies that the required PE direction information is contained in the image headers, which typically can only be guaranteed for Siemens data converted using mrconvert. Given the error message:

    No phase-encoding contrast present in SE-EPI images
    

    I expect this means that the required PE direction information is likely not present in your data. You can verify this using mrinfo on the input data to double-check.

    Assuming that is the issue, you can always run with the -rpe_pair option, which sounds like it matches your data anyway.

As a last point, you’ll find (hopefully) helpful information on how to deal with this step on this dedicated page in the documentation, which will hopefully contain the right pointers to sort out the problem.

All the best,
Donald.

Dear @jdtournier,

Thank you for the detailed answer. The issue was related to FSL and it was solved. There was an older version and the topup failed for some reason even when it was used directly.

I have a following question considering your notice about the usage of paired b0 images with reversed phase encoding (PE). I found several threads in the archives where researchers used a full set of b0 images from both PE (multiple pairs or unpaired b0 images). On the other hand, the members of FSL group usually do not recommend to use more than one pair of b0 images. They explain that adding more b0 will only slightly improve the quality of the data at the cost of increased computation time. As I understood, an acquisition of primary DWI dataset with many b0 interspersed within the data is intended to improve the motion correction. Also, an acquisition of several additional b0 with reversed PE is a certain guarantee that at least one of these images will have a good quality (without intra-volume movement) and it can be utilized for the distortion correction. Are these statements correct? I also found that in some studies multiple b0 were averaged and a pair of such averaged AP and PA images were forwarded to topup. Overall, what is the strategy or rationale to the usage of multiple b0 with reversed PE?

Best regards,
Maksym