fMRIprep skull-strip and registration error

Hi all!

I have a set of T1/rs-fMRI scans; the T1s have already been processed with freesurfer recon-all.

When running a subject, pointing fMRI prep to the pre-existing fs directory, the cross modality registration appeared erroneous. I suspect due to a faulty brain mask. Below is the command and the resulting T1/MNI registered volumes.

Initial command:

usr/pubsw/packages/fmriprep/21.0.1/fmriprep-21.0.1.simg
–skip_bids_validation
–participant_label “$SUBJ”
–output-spaces MNI152NLin2009cAsym fsaverage:den-10k
–cifti-output 91k
-w $OUT_DIR/fMRI_prep/fmriprep_tmp/
–fs-license-file $DATA_DIR/code/license.txt
–fs-subjects-dir $OUT_DIR/fs-dir/
$DATA_DIR/ $OUT_DIR/fMRI_prep/ participant -v

This completed with out errors, but resulted in a T1 brain mask that incorporated skull and mid face and an inaccurate T1/MNI registration.

I re-ran using a pre-skull stripped T1 (from freesurfer), and skipping the skull-strip step, as follows:

usr/pubsw/packages/fmriprep/21.0.1/fmriprep-21.0.1.simg
–skip_bids_validation
–participant_label “$SUBJ”
–output-spaces MNI152NLin2009cAsym fsaverage:den-10k
–cifti-output 91k
-w $OUT_DIR/fMRI_prep/fmriprep_tmp/
–fs-license-file $DATA_DIR/code/license.txt
–fs-subjects-dir $OUT_DIR/fs-dir/
–skull-strip-t1w skip
$DATA_DIR/ $OUT_DIR/fMRI_prep/ participant -v

Again the brain mask extended well beyond the brian and again the registration to MNI was inaccurate, as below:
Brain mask:

I can supply the registration gifs if needed.

Any advice on how to either supply a brain mask or skip this step entirely?

Thank you in advance!
Sam Snider
MGH/BWH
Harvard Medical School

Hi Sam,

Which version of recon-all did you use? fMRIPrep is best designed to use version 6 outputs by default (though plans to move to 7.X in the future).

Do the T1s look like they have good tissue contrast? Is this occurance subject-specific or prevalent across all subjects?

Just to clarify, does this mean you put the FS-output T1 in the raw data folder? If so, I’d recommend against that.

If it isn’t too much trouble, as a test, can you try not reusing the previously computed recon-all and have fMRIPrep rerun it? When doing so, I’d recommend using a new work directory too.

usr/pubsw/packages/fmriprep/21.0.1/fmriprep-21.0.1.simg
–skip_bids_validation
–participant_label “$SUBJ”
–output-spaces MNI152NLin2009cAsym fsaverage:den-10k
–cifti-output 91k
-w $OUT_DIR/fMRI_prep/fmriprep_tmp_TEST/
–fs-license-file $DATA_DIR/code/license.txt
$DATA_DIR/ $OUT_DIR/fMRI_prep/ participant -v

Best,
Steven

Thank you Steven.

recon-all was completed with freesurfer version 7

Yes the T1 was good quality. Freesurfer had no trouble masking the brain.

Yes, I did this just a test, after converting to nifti format and reorienting.

The reason why I prefer to do it this way, is some of the brain scans have significant lesions. I have a custom pipeline in freesurfer that is more robust to the presence of lesions (uses samseg), and so would prefer to run it outside fMRI prep.

So I already know that recon-all will fail on a good portion of the subjects.

Do you have any other ideas? Thanks again.

Have you read this about providing fmriprep with lesion masks? Processing pipeline details — fmriprep version documentation

I will take a look. May be challenging to scale that approach.

If the cross-modality (T1/BOLD) registration looks accurate, does it matter if the BOLD_space-MNI volumes are misregistered, seeing as I will be using the .gii output?

Thanks!
Sam

If you are worried about the surface files, perhaps you should instead compare the fsaverage subject output surface to the fsaverage template surface. Since resampling/spatial normalization happens in a single step, perhaps looking at this will make it clear where fMRIPrep is going wrong. That is, if the surface registration looks fine, then T1/BOLD registration is probably okay. If both the MNI and fsavergae resamplings are poor, then that may implicate a poor T1/BOLD registration that is being propogated.