Hi-
There is discussion of this in the AFNI Bootcamp data/talks. In AFNI_demos/AFNI_pamenc/AFNI_02_pamenc/, there is a script called: global_process_outline.txt, and this contains some start-to-finish ideas for processing a (task) FMRI set, including things to run before afni_proc.py, running afni_proc.py itself and then doing "post-analysis QC and group prep". One of the steps in the latter section involves combine individual masks to make a group mask.
It is worth checking out the whole script and comments, but some ideas for making a group mask are looking for, say, 70% overlap (something that seems reasonable) or going for strict intersection (reasonable also, but smaller):
# generate 70% group mask and related (or intersection mask)
3dmask_tool -input sub*/*.results/mask_epi_anat*.HEAD \
-prefix QC/group_mask.7 -frac 0.7
3dmask_tool -input sub*/*.results/mask_epi_anat*.HEAD \
-prefix QC/group_mask.inter -frac 1.0
... and see section A-2 here for some comments about making a group mask:
[
www.biorxiv.org]
--pt