Masking functional images using fslmaths

Hi everyone,

I recently tried to run a paired T-test in SPM on a repeated measures dataset with fMRI data. When I looked at the contrasts, it showed activation in regions outside the brain, which suggested to me that there was a masking issue. I tried to mask the images using fslmaths -mas, but when I re-ran the analysis, I got the exact same results, which suggested I didn’t properly mask the data. I want to mask the functional data to an MNI brain.

I ran this command with fsl: fslmaths ‘path to original functional image’ -mas ‘path to MNI brain’ ‘name for new masked file’

When I did so, it created a a file called -mas.nii, which is not the name I wanted for this file.

Any help would be appreciated!

Hi, you may use an explicit mask for your analysis, calculated for instance from the union of WM, GM an CSF of the segmentation results in the correct space. This explicit mask can be prescribed in SPM in the “fMRI model specification” batch.