Weird alignment from EPI to T1 space

Summary of what happened:

I’m new to fMRIprep. I’ve been working on a dataset recently and found some weird output from .html report. Particularly in ’ Alignment of functional and anatomical MRI data (surface driven)’ Session. The ‘fixed’ and ‘moving’ images are not overlaid well. I paste two screenshots for a sample participant. This issue is found in 3-4 participants in a 50 participants datasets. Please let me know if it is helpful to upload any source files or original T1 images. I wonder if this issue is related to bad T1? Should I change to other alignment method?

Command used

--write-graph \
--dummy-scans 10 \
--fd-spike-threshold 0.9 \
--fs-license-file /optnfs/freesurfer/6.0.0/license.txt \
--cifti-output 91k \
--skip-bids-validation \
--random-seed 42 \
--bold2t1w-dof 9\
--skull-strip-fixed-seed \



Environment (Docker, Singularity, custom installation):


Data formatted according to a validatable standard? Please provide the output of the validator:


Relevant log outputs (up to 20 lines):

bbregister was used to generate transformations from EPI-space to T1w-space. Note that Nearest Neighbor interpolation is used in the reportlets in order to highlight potential spin-history and other artifacts, whereas final images are resampled using Lanczos interpolation.

Screenshots / relevant information:

1 Like

2 other participants have similar issues. Basically the brain image in ‘moving’ is much smaller than ‘fixed’.

Hi @KeBo2023,

Do you get better performance in the latest stable release?


Hi @KeBo2023 ,

You may also use the following options to see if you get an improvement in the bold-to-T1w registration:
--bold2t1w-dof 6 --bold2t1w-init header

1 Like

I would try with just --bold2t1w-dof 6 before resorting to assuming the images are already mostly aligned with --bold2t1w-init header. The additional 3 degrees of freedom in 9-dof registration are scale factors, so they would presumptively cause the shrinking.

Also, did you get any Susceptibility Distorsion Correction done by fmriprep? i.e. do you provide fieldmaps in your dataset? This could help the registration also.

Hi @jsein , thanks for the suggestion! I’ll try that option and updated what I got. And to answer your question regarding the SDC. Yes, I have done SDC based on field map, and I attached the report here. Do you think it looks reasonable? I have some issues when I use the newest version of fmriprep (23.1.4), but it is solved using the current version I used now (21.0.1). I’ll post another issue regarding this, but it is less relevant to the current issue.

Thanks @effigies ! I’ll try your suggestions and updated to you once the report coming out

Hi, @Steven. Thanks! But I actually encountered serious issue with SDC when I’m using the newest release (Both 23.1.3 and 23.1.4). I solved this issue by changing the version back to 21.0.1. Due to this issue, I’m not able to run things correctly using the newest release. If anyone is interested in this issue, I’ll start another post about this.

Hi @KeBo2023 , About SDC, you could try fmriprep v23.2.0a3 for which SDC is expected to work better. But it would be interesting to understand why SDC was working for 21.0.1 and not for 23.1.4.
It would be important to know if it was a bug in the execution (the execution failed) or if it was the result that was wrong.

From the images you show, the image after SDC correction looks very reasonable, so I don’t thing the problem with realignment is coming from there. Let us know if the suggestions we made did change anything in the result.

Another possibility would be to not use bbregister for registration, but usually this is for cases where the GM/WM contrast in the functional image is very low which doesn’t look to be the case for your images. In that case, it is possible to use: --force-no-bbr.

Thanks @jsein . I posted a new thread to talk about SDC issue with more details. Hope it’ll make this more clear. Distortion correction issue related to the version of fmriprep

Update result here:

Thanks for all your help! I think the --bold2t1w-dof 6 command is the key to help!

I did a simple change of dof from 9 to 6. The shrinking issue is gone. Here are the the new alignment result:

1 Like