Fmriprep: coregistration and unwarping error

Hi all,

I just finished running fmriprep on my dataset (N=44, 3 multiband 3 multiecho 3T Siemens), the fmriprep output data looks great for most participants, but I ran into two errors.

  1. This error occurred in all participants. For every run there seems to be something wrong with unwarping the gradient field maps. I did not understand the error, the output data seems to be good and applying the gradient field maps. If anybody could help me figure out if this error is problematic that would be great.

  2. For 4 participants there seems to be a serious problem with coregistration in one of the runs. I have rerun the participants multiple times but the problem does not disappear, the raw data looked fine and fmriprep does not throw errors. Could anybody give a hint to what is going on here?

Below a link to a google drive with the data for one participant that showed both problems. Problem 1 for all runs (with error message) problem 2 for run 1 and 2, not for run 3 (no error messages). In the drive I attached the raw data in BIDS format and the fmriprep output in pdf, the html file and the figures.

Thanks for your help, if you need any more information please let me know either here or at


1 Like

Thanks for reporting. The

RuntimeError: Command:
CreateJacobianDeterminantImage 3 /tmp/sub-024/fmriprep_wf/single_subject_024_wf/func_preproc_ses_mri01_task_cmrr25isombme3TR1500TaskPart1_run_2_echo_1_wf/sdc_wf/sdc_unwarp_wf/vsm2dfm/sub-024_ses-mri01_acq-grefieldmappingMB3MEE2_dir-None_run-1_phasediff_rads_unwrapped_filt_demean_maths_fmap_trans_rad_vsm_unmasked_demeaned_antswarp.nii.gz jacobian.nii.gz
Standard output:

Standard error:
terminate called after throwing an instance of 'itk::ExceptionObject'
  what():  /opt/ANTs/20180607/build/ITKv5/Modules/Core/Common/src/itkPoolMultiThreader.cxx:202:
itk::ERROR: PoolMultiThreader(0x1c03260): Exception occurred during SingleMethodExecute
itk::ERROR: DeformationFieldGradientTensorImageFilter(0x193dad0): Subclass should override this method!!! If old behavior is desired invoke this->DynamicMultiThreadingOff(); before Update() is called. The best place is in class constructor.
Return code: -6

is an issue with ANTs compatibility. If you switch to using Singularity or Docker versions of FMRIPREP (bundled with the right ANTs version) the error should go away.

As for the coregistration problem, my quick assessment leads me to think that the issues is caused by very low tissue contrast in your input data. Was this the same sequence as the one used by HCP? To improve the situation in such cases this feature would have to be implemented.

Thanks for your quick reply. I assume avoiding the error is always a good idea, but to rerun fmriprep for all subjects is a rather (very) large time investment. What does this error exactly mean? How problematic is it? Could you help me assess if it is worth the time investment?

I have not worked with the HCP data myself, this is a rather standard sequence used at Donders, I have never heard that this causes problems with low tissue contrast. We do have the SBRef images, Is there any way these could be helpful?

Hi Chris,

Is there any way you could help me with suggestions on how to continue with these issues?


Hi Chris,

I followed your discussion on github here

and noticed that you were wondering why we did not collect reference images for the first echo, I asked the local mri technician and he argued that typically in the first echo there is enough contrast, why they do not collect the reference image for the first echo.

Regarding your idea that the problem might be due to low contrast, I compared the raw data for sub 024 (shared with you) for run 1 (coregistration problems) and run 3 (no coregistration problems) and I have to say I do not see very large differences in contrast.

Attached an jpg to show you the difference in run 1 vs run 3 (volume 1)

Could you repost it in the GitHub thread (with illustrations)? It will make communication easier.

1 Like