Hi, Austin-
The SSW reference templates are special, multivolume datasets. The [0]th volume is a skull-less anatomical dset, and the other 4 volumes have more information used in various parts of the @SSwarper program. You can see these a bit more here:
[
afni.nimh.nih.gov]
The [4]th volume is (from the help):
[4] = binary mask for gray matter plus some CSF (slightly dilated)
++ this volume is not used in this script
++ it is intended for use in restricting FMRI analyses
to the 'interesting' parts of the brain
++ this mask should be resampled to your EPI spatial
resolution (see program 3dfractionize), and then
combined with a mask from your experiment reflecting
your EPI brain coverage (see program 3dmask_tool).
So, this is the closest to being a GM mask, but it isn't pure GM.
To your specific questions:
1) "when you run SSwarper on a subject do I need to input any specific command for it to produce a GM mask in the output?"
---> there isn't such. In the animal-MRI processing world, the @animal_warper program (similar-ish to @SSwarper, but different, too) does allow one to put in other standard space maps and have those sent along the estimated transforms to subject space, or vice versa. But @SSwarper at present doesn't.
2) "can this mask be used during for a single participants processing to restrict analysis to the GM only? Or is that only done during group analysis?"
---> This program is not the way to generate a GM mask (but see below for a pretty good way to generate such a beast).
3) "can a single mask generated from SSwarper be used for group analysis considering its warped to a specific template or would I still want to average each subjects together to try and create a better fit?"
---> SSwarper works to mask your input anatomical, but that is a whole brain (WB) mask, not a GM/tissue mask.
------------
In order to generate a group level whole brain mask, what we might recommend if you are using afni_proc.py to process your subjects:
+ take the individual masks from single subject processing, and make a new mask based on where 70% or more of them overlap
+ the "70%" is just an empirically kinda useful value---a lot of overlap, but some flexibility
+ for the single subject masks to use, with afni_proc.py outputs, these would likely be the mask_epi_anat*.HEAD dsets (the combination of EPI and anatomical coverage per subj)
+ The explicit AFNI command to do this could look like the following, globbing over each mask in each "results" directory output by afni_proc.py:
3dmask_tool -input GROUP/*.results/mask_epi_anat*.HEAD \
-prefix group_mask.7 -frac 0.7
This step, and a a lot of these processing choices and rationales we recommend for processing (with specific details on afni_proc.py) are described here:
[
www.biorxiv.org]
In terms of getting a GM-specific group mask: if you have all your data in standard space, there might be a GM tissue mask associated with that template; perhaps you could just take that and intersect it with you new WB mask. Though, in practice, and depending on your specific purpose, you might want to inflate *that* slightly, because while nonlinear alignment can be quite good, it is not perfect. Or, if you ran FreeSurfer's recon-all on all of your subjects, you could pass the individually-estimated GM masks from that into afni_proc.py as well, having those sent along to your final EPI space, and then you could merge them in some fashion across your entire group. Again, what to do about a GM mask in standard space depends on your specific goal.
Hope there are some useful tidbits in this long and windy reply.
--pt