I am just wanting to double check that my fmriprep has run correctly for my func data, I have found that my func output ‘sub-01_task-fogplank_run-2_space-MNI152NLin2009cAsym_desc-preproc_bold.nii’ is not skull-stripped, the.json file says “skull-stripped”-false, and I am not quite sure why this has occurred. Or whether I am supposed to then run a separate tool (ANTs brain extraction), to use the func brain mask to skull strip my func data. Is there something that I have missed in my fmriprep run, or does the func data not come out skull stripped normally?
It is normal that the func output is not skull stripped, but there should be a brain mask file that is also in the derivatives folder that you can apply to your func output. Given the name of your func image, the brain mask file should be named:
Oh perfect! Thank you, just wanted to double check.
Also, thank you for consistently responding to my many questions with fmriprep. Finally got it all running correctly thanks to all your help.
Happy to help, if you have a question, chances are someone else also has that question, but doesn’t ask. The more (different) questions people ask and get answered, the more useful neurostars becomes and hopefully the easier it gets to do reproducible/open neuroscience!
To clarify, we need to apply the brain mask to the functional data before sending the functional data off for further analysis (in FSL FEAT, AFNI etc), correct?
Good question, In my experience, I usually pass the mask as an additional argument into whatever application I’m using. For example, when I use nistats (soon to be incorporated into nilearn), I pass the mask file as an additional argument into the
The answers to those questions apply the mask output from fmriprep during their analyses, so you can take a look there to see further examples.
However, this is dependent on what workflow you are using, so I cannot speak broadly.
Does that help?
Hi, I would like to clarify a point since I had the same question. (I am new to fmriprep and working with brain MRI images in general, so apologies for my ignorance.)
Some of the other question/answers you linked to have more complicated workflows which is not something I want to do, is there a way I can just apply the brain mask to the output and use the resulting skull-stripped image? And to do that I should download AFNI or FSL FEAT, there isn’t a way fmriprep does this? (I thought there would be since the html reports displayed the brain mask and then the skull stripped images.)
If you’re using fmriprep as a singularity or docker container you can use the FSL installation inside them.
For example, if I had an fmriprep singularity image named
fmriprep.simg, I could use
fslmaths to mask an image like so:
singularity exec fmriprep.simg fslmaths image_1.nii.gz -mas mask.nii.gz output_image.nii.gz
or if you were using docker you could do something like:
docker run --rm -it -v /path/to/fmriprep/folder:/data --entrypoint /bin/bash poldracklab/fmriprep -c 'fslmaths /data/image_1.nii.gz -mas /data/mask.nii.gz /data/output_image.nii.gz'
(I don’t have a fmriprep docker image readily available, so I cannot test the latter command to ensure it works).
Okay, I’m using docker. I’ll try it out and see if it works. Thanks for helping.