Inaccurate alignment of EPI and T1

Hi everyone!

I’m currently running fmriprep (v21.0.1) for my multi-echo EPI data. However, I’ve encountered some runs where the alignment of EPI and T1w appeared inaccurate, even though other runs of the same subject data showed decent alignment.
As depicted in the attached image, the visualization for the alignment of functional and anatomical MRI data (surface driven) doesn’t look great. Below is the fmriprep command I used.

I am seeking potential solutions to this issue. My initial hypothesis is that it might be related to distortion correction or the varying contrasts of multi-echo images.
Any insights you could offer would be greatly appreciated!!

singularity exec \
    --cleanenv --bind ${BIDS_DIR},${WORK_DIR},${FREESURFER_DIR} \
    $FMRIPREP_IMG fmriprep \
    $BIDS_DIR $OUTPUT_DIR participant --participant_label $PARTICIPANT_LABEL -w $WORK_DIR \
    --nprocs 16 \
    --nthreads 12 \
    --mem_mb 60000 \
    --write-graph \
    --dummy-scans 10 \
    --fd-spike-threshold 0.9 \
    --fs-license-file /optnfs/freesurfer/6.0.0/license.txt \
    --fs-no-reconall \
    --skip-bids-validation \
    --random-seed 42 \
    --skull-strip-fixed-seed \
    --resource-monitor \
    --bold2t1w-dof 9 \

Hi @ByeolKLux and welcome to neurostars!


is not recommended since the boundary registration afforded by FreeSurfer workflows tends to outperform volumetric registration. Is there a reason you are not using FreeSurfer here?

Can you share the SDC part of the report? If using a GRE fieldmap, v20.2.7 might be better for you. If using a SE fieldmap, 23.1.4 might be better for you. Is there a reason you are not using the most recent branch?


1 Like

Hey Steven, thank you for your incredibly prompt responses!

I added the --fs-no-reconall based on my lab’s previous fmriprep scripts, but it seems advisable to remove it as per your suggestion. I’ll try it.

Here is the SDC report. I chose version 21 because the --me-output-echos option is available from version 21. If I opt for version 23, I’ll have to manage the intendedFor in JSON files, which I’m trying to avoid…

Hi @ByeolKLux,

The SDC doesn’t look bad here, so I doubt it’s an issue (but you may still want to try upgrading just for any additional useful features introduced in recent releases, even though you’ll have to update the IntendedFor fields).

Do the T1 images look like the skull strip went well? I imagine it went fine if the other runs worked well, but if not, you can pass in a pre-stripped T1 image with the --skull-strip-t1w skip option.

It looks like skull stripping did not work great on the second BOLD image, causing the brain size to be overestimated. Maybe upgrading would fix that, but you can also just try rerunning with a fresh work directory and hope that it works the second time and that this was a random fluke.


1 Like

Hi @Steven , I am surprised by this statement: what kind of update is needed with the IntendedFor fields between FMRIPREP v21 vs v23?

Hi @jsein,

I don’t use multi echo data, so I assumed that Byeol had tried it before and found that the behavior changed based on the earlier post.

You are right @Steven , this topic is about multi-echo fMRI, where the specification of IntendedFor may indeed have changed. I was thinking of single echo fMRI where I don’t recall any change between these versions.

I’m not an FMRIPREP user so I can’t help much regarding options in the pipeline, but my understanding is that FMRIPREP will uses a single echo for alignment and that’s the data that you should be seeing in the output. The results would be the same if you gave the program multiple echoes or just a single echo. The one exception is, that the later echoes have more drop-out. If the echo used for registration has more dropout, you might benefit from using an earlier echo. The contrast and dropout in your EPI image looks fine so I don’t think this is the source of the issue you’re having here.

1 Like

Hello everyone, I appreciate all your valuable insights. I’d like to leave some follow-up.

To address this matter, I decided to experiment with the latest version of fmriprep, specifically version 23.1.3. In this process, I removed the ‘B0field’ from the JSON files and included the ‘IntendedFor’ field before running the fmriprep.

Upon examining the subjects experiencing alignment issues, I observed significant improvements with the 23.1.3 version, even without modifying any other settings (still with --fs-no-reconall). This leads me to believe that the recent update of fmriprep is more effective in handling multi-echo data.