I am having trouble getting a good quality functional-to-T1w registration in fMRIPrep.
Summary of what happened:
I’m using fmriprep to preprocess BOLD images, and the bbregister outputs are not aligning the functional images well to the T1 images. The anatomical images seem to be tilted slightly more forwards compared to the functional images, and this issue is consistent across my dataset (though some are worse than others). I have tried disabling bbregister (using --force-no-bbr), but the issue seems to persist (the attached code and screenshots below show my original attempt using bbregister). This is a dataset of young kids (5-7 yr olds), so I don’t want to rely on --bold2anat-init header because there was likely some motion in between T1 and BOLD acquisitions.
Command used (and if a helper script was used, a link to the helper script or the command generated):
unset PYTHONPATH;
SINGULARITY_TMPDIR=$CBICA_TMPDIR #make sure it mounts this as /tmp inside the container
export SINGULARITY_TMPDIR
echo $CBICA_TMPDIR
export SINGULARITYENV_OPENBLAS_NUM_THREADS=8;export SINGULARITYENV_OMP_NUM_THREADS=8;
singularity run --cleanenv -B ${SINGULARITY_TMPDIR}:/tmp ${tools_dir}/fmriprep-24.1.1.sif \
${BIDS_folder} ${BIDS_folder}/derivatives/fmriprep_24.1.1/fmriprep_t${ses:1} participant \
--participant-label ${sub} \
--fs-license-file $HOME/license.txt \
--fs-subjects-dir ${BIDS_folder}/derivatives/freesurfer_t${ses:1} \
--skull-strip-template MNIPediatricAsym:res-2:cohort-2 \
--output-spaces T1w func MNI152NLin2009cAsym:res-2 \
--ignore sbref \
--nthreads 8 \
-w /tmp --debug all \
It looks like you have session wise freesurfer data but are processing all anatomical data with fmriprep (which creates a subject average image from all sessions). Perhaps try BIDS filter files to only process the session’s anatomical data in fmriprep.
Also you shouldn’t need to specify session-wise output folders.
Also, I’m not seeing misalignment. In fact the alignment looks great. What I do see is likely signal dropout in the orbitofrontal lobe, affecting the final brain mask. Was susceptibility distortion performed on these data?
It is worth trying for a few subjects, but don’t get your hopes up. I think SynBOLD-DisCo would be a better option. You can synthesize a fieldmap before re-running fmriprep.
Thanks, Steven! We originally thought our registration was failing because we are analyzing task data and our task vs. rest activation maps weren’t perfectly aligned with the edge of the brain, as expected. We thought this might be caused by the functional and anatomical brain masks not aligning perfectly. I’m now wondering if re-running fmriprep with synthesized fieldmaps may help this issue. I tried following the method you outlined here.
Do these fieldmap corrected outputs from fmriprep seem reasonable to you?
Thank you!
Thank you so much! Attached is the boldref overlaid on the T1 in MNI space for a subject after using the generated fieldmap. I’m also using --ignore sbref in fmriprep. Should I take that flag out?
The MNI outputs aren’t as useful, because those are non-linearly warped to the output space. The T1w space outputs, which should just use rigid alignment, would be a better gauge of bold-to-T1 alignment.
In that case, I would say the second image looks better, with less dropout in orbitofrontal. This is with SynBOLD-DisCo? Or the --use-syn-sdc flag in fMRIPrep?
Great! I’m happy that worked. It looks better than what I would expect the --use-syn-sdc fmriprep flag to have produced. Tagging @schillkg so he can see a successful SynBOLD use in fMRIPrep!