Fmriprep issue: bbregister rejected & brain upside down

Hello everyone,
I’ve just completed preprocessing my first dataset with fmriprep and when checking all the fmriprep html outputs, I noticed something weird for 2 subjects, for one it is just one run, for the other both runs are affected. Unlike the other subjects for both it is indicated:
mri_coreg (FreeSurfer) was used to generate transformations from EPI space to T1 Space - bbregister refinement rejected.

And then when you check the following output images:

  1. Estimated fieldmap and alignment to corresponding EPI
  2. Brain mask and temporal/ anatomical CompCor ROIs
  3. Alignment functional and anatomical MRI data. (uploaded image below)

the brain is turned upside down. I also asked some colleagues of mine who have used fmriprep but they never had this issue so I’m wondering, anyone knows why bbregister gets rejected (what I could check why this happens), why coreg apparently does a bad job here or why the brains are upside down? I used fmriprep version 20.0.6. Any help is really much appreciated!!

Cheers Vanessa!

Is it possible for you to share some of these data? I’m afraid that the NIfTI headers of those weird images could be wrong. Do you need assistance on how to check on that?

Hello :slight_smile:
Many thanks for our reply and really sorry for my delayed response!
I’m afraid sharing is not really possible but you might be right about the Nifti headers , we actually had some issues with other subjects in the past. Could you indeed give me some advise on how to check the current data, or what exactly I’m looking for that could be causing this specific issue? If the Nifti headers are wrong, would this be fixable, or could I force fmriprep to maybe ignore some of the potentially erroneous information then?

many thanks for the support!
cheers Vanessa

Depends on how they went wrong, and whether you have access to the original DICOM data prior conversion to NIfTI.

fMRIPrep is pretty inflexible (by design). It will not allow you to do that, and when you are past this particular study and more experience will look back and realize that was the only option. Because the fMRIPrep devs don’t want to make you happy today with a quick shortcut and have you come back in one year from now with very serious problems in your analysis of hundreds of subjects and a looming deadline to make sense of everything.

So, IMHO, you are better off not trying to deceive fMRIPrep (or any other software, really), just to get a result you think makes more sense (and think that, after having your brains upside-down, almost anything you get different will look MUCH better).

You can fix the original dataset if the answer to my first response is yes.

you can at least compare “working” files to non-working files using some software to check the headers such as fslinfo in FSL or mri_info in FreeSurfer. You can also use Nibabel (Python) library, which IMHO has a much sensible organization of the header information (because fmriprep uses this internally, this is probably the preferred way).

You want to look into the s-form and the q-form matrices.

Great, thank you! Then I will try and compare working with non-working files with regard to the s-and q-form matrices.

And yes, I do have access to the original Dicom files, so if I found something, it would indeed be great to have a way to fix the original dataset :slight_smile:

Hi, I’ve been looking for help on a similar issue I think:

I am getting some badly misaligned EPIs. Headers look identical between the goods and the bads. Not sure where to start to figure it out…