We are running into an issue where the functional brain mask looks like it is missing parts of the medial and lateral temporal lobes. There is signal dropout in these areas although there is presumably some small signal there we would like to keep included. This is an issue in all of our preprocessed subjects (n=10).
Is there anyway to modify the fMRIprep command so that the brain mask is not cut off?
Thank you,
Catherine
Files
Here is an image of the functional brain mask generated from fMRIprep overlaid on the prepreprocessed BOLD data for one subject.
Do you have Freesurfer outputs you can use? I see you’ve added the –fs-no-reconall flag. With FreeSurfer outputs you can get some good boundary based registration to align BOLD and T1.
Does the original or preprocessed BOLD signal look like there is signal dropout in those areas?
Are you doing any susceptibility distortion correction? I see you are ignoring fieldmaps, so I would guess not. This could also help. If you do not have fieldmaps, you can try the fieldmap-less method (--use-syn).
I believe version 21.0.2. improved BOLD masking workflows.
Do you have Freesurfer outputs you can use? I see you’ve added the –fs-no-reconall flag. With FreeSurfer outputs you can get some good boundary based registration to align BOLD and T1.
Yes we had previously run Freesurfer so I will move those data to our output folder.
Does the original or preprocessed BOLD signal look like there is signal dropout in those areas?
Unfortunately yes, there is signal dropout in those areas in both the original and preprocessed data. We were hoping there was some way to preserve the signal there in the brain mask despite it being small.
Are you doing any susceptibility distortion correction? I see you are ignoring fieldmaps, so I would guess not. This could also help. If you do not have fieldmaps, you can try the fieldmap-less method (--use-syn).
Yes, our data were PURE corrected on the scanner therefore those files have been passed as the “original” data to fMRIprep
.
I believe version 21.0.2. improved BOLD masking workflows.
Thank you again for your guidance. I pointed fmriprep to our processed freesurfer data and did see a slight improvement in the brain mask around the MTL (red = freesurfer output included, blue = original). Unfortunately, we are still missing part of the MTL which is critical for our study. There is also some additional pia matter in the mask. I am waiting for the newest version of fmriprep to become available on the server I am working on, therefore I have not tried running fmriprep again using that.
In the meantime, is there a way to pass along a precomputed brain mask to fmriprep, similar to passing along a brain-extracted T1?
I’m facing a similar issue with the functional brain masks in our current dataset. See an example below and the html report here: ZI Cloud
password: mz2WrvfZ4QGG
As you can see I added the fieldmap-less option and freesurfer reconstruction, but the results weren’t better when running without it. Unfortunately, I have this issue in most subjects of that dataset.
Fmriprep 22.1.0 (recently released) includes a new version of SDC flows which may help. Please try upgrading and if you still get poor results, open a new thread under the “software support” category, making sure to fill in the template that is provided.
thanks for your quick response! I was waiting for our server admin to install 22.1.0 after his well deserved holiday. I ran tests on the original and one additional subject using the exact same code, but with the new version (22.1.0).
With the original subject I’m running in a node/resampling error. I’ve put the html report and the terminal output here: ZI Cloud
PW: oTkcskeyO6pQ
Another subject ran fine, but showed similar problems with the functional brain masks as before: ZI Cloud
PW: f1yeeM4OKB6V
Dear @Steven,
Do you have any suggestions? Or is there a way to pass on masks from other sources as @ctallman suggested?
Thanks for your advice!
Best,
Martin
Why don’t you use the anatomical brain mask calculated from fmriprep resample to your functional resolution? That way you are sure that even the area not present in the original functional brain mask due to dropout will be included in the brain mask for your functional analysis.
thanks a lot for your response! Could you elaborate a little on how you would do that practically? I believe, for “resampling” the anatomical and functional images would have to be aligned already, just not in the same space, right? Do you mean something like:
registering the anatomical brain mask to the raw EPI space, using e.g. FLIRT
I was thinking at something simpler: fmriprep projects the T1w and the functional data in the same spaces (after correcting the functional data and aligning it to the T1w) but usually at different resolutions.
For example you could use different tools: (FSLeyes - resample, FLIRT (with -applyxfm), niftyreg/reg_resample, AFNI 3dresample, … ) to resample the image : anat/sub-SUB_ses-SES_space-MNI152NLin2009cAsym_desc-brain_mask.nii.gz
into func/sub-SUB_ses-SES_task-TASK_run-RUN_space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz resolution.
Thank you Catherine and @jsein !
I would like to ask if another solution is also viable:
Does it also make sense to define a higher signal loss threshold in the level-1 design template, so that low values will not be masked out? And if so, does it make sense to do that even if I don’t do motion correction in fsl (because I already did that in fmriprep) and if I don’t have fieldmaps?
I think this approach is valid, it is what is called an “implicit” mask, while providing a pre-calculated mask is called an “explicit” mask. You will have to be careful to adjust the threshold to your needs.
Indeed, you should not do any other preprocessing (except smoothing which is not done in fmriprep) if you plan on using fmriprep derivatives, for which all the common preprocessing steps are already done on the data.
thank you! unfortunately it seems that changing this threshold (in any direction) doesn’t change anything in the output, but I will continue to check this option.
What tool do you use, which uses this kind of threshold? Personally (but not an fmri analysis expert) I am more confortable with an explicit mask, which can be constructed and visualized up front.
EDIT: I saw your other post. Hopefully you will get useful suggestions there.