I used the T1w anatomical mask from fmriprep as an explicit mask for a GLM - should I have used the func mask?

Good morning/afternoon/evening to everybody in your various time zones!

My question is as stated in the title :slight_smile: I know the BOLD and the T1w images are in the same space, but the masks clearly cover different regions of the brain, at least on the extremities (see the image posted below). The top mask is the T1w from the ‘anat’ folder, while the bottom is the BOLD mask from ‘func’ - the func mask clearly extends past the anat mask.

Without thinking I generated some first level models using the T1w mask as an explicit mask, but in hindsight, it seems as though the functional BOLD mask might have been more appropriate. I want to make the right choice!

I’m at this very moment attempting to comb through some papers and see what others have done, but mask parameters do not seem to be commonly reported, and doing an outright internet search isn’t returning much either. Any thoughts are appreciated!!!

As always, I appreciate the support I’ve gotten from this community, and I value the time you take to respond (I know it’s finite).

Kade

I can think of two points of view:

  • if you want to analyze that particular individual and only that one, I’d take the most liberal mask: it costs you basically nothing to be a bit more generous.
  • but most often you deal with different subjects, and in that case, I advise not to use subject-specific masks: this makes inter-subject comparison/analysis much harder. Using a standard MNI-space brain mask is reasonable, or some statistical consensus among the individually defined masks.
    HTH
1 Like

I think that is normal. Functional mask may not be well regenerated. We usually refined it with anatomical mask which is always very good.

1 Like

Thank you for your response! I appreciate getting multiple points of view on how to address the issue.

We’ll be conducting a searchlight analysis on individuals, then averaging those accuracy maps at the group level for statistical testing. It sounds like, since we plan to go to the group level, a standard MNI mask would be more appropriate?

When you say “statistical consensus” do you mean something like an average anatomical mask?

It sounds like, since we plan to go to the group level, a standard MNI mask would be more appropriate?
-> Yes

When you say “statistical consensus” do you mean something like an average anatomical mask?
-> Yes. Nilear has a routine for that.
http://nilearn.github.io/modules/generated/nilearn.masking.compute_multi_epi_mask.html
http://nilearn.github.io/modules/generated/nilearn.masking.intersect_masks.html

Best,
Bertrand

1 Like

Thank you again, Bertrand!

I think I will likely use a mask from the standard MNI template everybody was warped to, as it seems to map to the individual subject data pretty accurately when I overlay them. It is good to know about those Nilearn routines, though, so I appreciate the advice on that!

Hi all! I have the same question, but in my case the MNI mask is not an option since my data are and will remain in native space. I want to run trialwise GLMs for an RSA. For this purpose I want to use an explicit mask on a subject-specific level. As mentioned by k_g_j, there is a mask created by fMRIprep in the anat folder, but the edges seem to conservative, but indeed as a3sha2 mentioned the ones created in the func folder are not good because of signal dropout (e.g. vmPFC). Is there another way to create a mask that is a bit bigger than the one created by fMRIprep in the anat folder so it is noot too restrictive?
Here is the resliced mask from the anat folder overlayed on top of an unsmoothed functional task image in T1 space, (red), so I hope it is clear what I mean. I don’t know if that is relevant, but the T1 was acquired on a different day (3 weeks earlier) than the functional scans.

Hi @Liswizz ,

Indeed the anatomical mask created by fmriprep is quite tight as it cuts the brain right at the pial surface. What you can use is the first mask created by fmriprep processing and saved only in the temporary folder of this type:

temp_data/fmriprep_wf/single_subject_${sub}_wf/anat_preproc_wf/brain_extraction_wf/atropos_wf/msk_conform/09_relabel_wm_mask.nii.gz

or you could recreate it yourself with the command:

	bash ${ANTSPATH}/antsBrainExtraction.sh \
  		-d 3 \
  		-a $IN_DIR/$sub/anat/${sub}_desc-preproc_T1w.nii.gz\
  		-e $TEMPLATE_DIR/tpl-${space}/tpl-${space}_res-01_T1w.nii.gz \
  		-m $TEMPLATE_DIR/tpl-${space}/tpl-${space}_res-01_label-brain_probseg.nii.gz \
  		-o $IN_DIR/$sub/anat/${sub}_desc-preproc_T1w_desc-brainANTs.nii.gz

Example:

FMRIPREP mask (quite tight) in red and the “antsBrainExtraction” mask in blue:

Hi @jsein

Thanks so much for your response, that is a great suggestion!
I was wondering, if I am only interested in certain ROIs that I define using freesurfer for my RSA, those will be based on the same segmentation. So all voxels within those ROIs will be within the anatomical mask created by fmriprep anyways right? In that case it would be fine to use that rather tight mask as explicit mask? And sorry for the question that may be obvious to many: should I reslice the brainmask to match the dimensions of my task-related functional images and use that resliced brainmask in my 1st-level GLMs?
Thanks again for your help,I appreciate it!