Fmriprep 20.2.0 not saving out skull stripped version of MNI space preprocessed T1w

Hi,

I am trying to help a researcher troubleshoot why the LTS version of fMRIPrep (20.2.0) is not saving out a skull stripped, preprocessed T1 in MNI152NLin2009cAsym space (*_space-MNI152NLin2009cAsym_desc-preproc_T1w.nii.gz). A skull stripped, normalized version of the T1 appears in the html file under the “Spatial normalization of the anatomical T1w reference” section, and the .json sidecar file says that skull stripped is set to “True”. The associated brainmask file looks correctly skull stripped also. Additionally, the html files for all subjects indicate no errors.

What is contained in the *_space-MNI152NLin2009cAsym_desc-preproc_T1w.nii.gz files is the same non-skull stripped brain as the original subject-space T1, just normalized into MNI space.

This is the command that is being run:

/usr/local/miniconda/bin/fmriprep /scratch/nbray005/bids_backup/bids_true_int /scratch/nbray005/fmriprep_nofs participant --participant_label UWO040 --nthreads 8 --n_cpus 8 --mem_mb 32000 --omp-nthreads 8 --use-plugin /home/nbray005/neuroglia-helpers/cfg_apps/fmriprep_multiproc_8c_32gb.yaml -w /localscratch/nbray005.40152052.0 --fs-license-file /project/6046235/shared/.license --resource-monitor --notrack --use-syn-sdc --fs-no-reconall

I cannot see any obvious errors that would suggest that the researcher has inadvertently turned off saving the standard *_space-MNI152NLin2009cAsym_desc-preproc_T1w.nii.gz file.

Any suggestions?

Thanks,

suzanne

fMRIPrep provides brain masks but generally does not skull-strip data, since that is trivial to do on demand, e.g.:

import nibabel as nb
T1w = nb.load('sub-01_space-MNI152NLin2009cAsym_desc-preproc_T1w.nii.gz')
mask = nb.load('sub-01_space-MNI152NLin2009cAsym_desc-brain_mask.nii.gz')
masked_img = nb.Nifti1Image(np.asanyarray(T1w.dataobj) * mask.dataobj,
                            T1w.affine, T1w.header)
masked_img.to_filename('sub-01_space-MNI152NLin2009cAsym_desc-masked_T1w.nii.gz')

If the SkullStripped metadata field is set to true, then that’s a bug. Could you please report that on https://github.com/nipreps/smriprep/issues?

Hi Chris,

Thanks for the prompt response and apologies for not getting back sooner. I wanted to check a few things on my end before replying.

Part of my confusion is that fMRIPrep versions <=1.4 did output skull-stripped space-MNI152NLin2009cAsym_desc-preproc_T1w.nii.gz image files. This appears to stop with versions >=1.5.

I will post the bug report on the github issues page, as from versions >=1.5, the space-MNI152NLin2009cAsym_desc-preproc_T1w.nii.gz image files are not skull stripped, even though the .json sidecar files say that they are.

Not sure if this is better posted in the bug report or here, but in dealing with some of the researchers on my end who are new to fMRI, from the fMRIPrep documentation, they come in expecting that fMRIPrep will output a skull stripped T1w images. Is there perhaps a way to add a flag to allow a user to decide to write out skull stripped T1w images?

I realize from your end the nipype steps you provided are super obvious, but using nibabel to apply the skull stripping is not necessarily a trivial step for researchers who aren’t as computer savvy. It also kind of defeats the purpose of having fMRIPrep be a one-stop-shop for preprocessing if users are left to recreate skull-stripping on their own for second level-analyses (e.g., CONN).

Thanks,

suzanne