how to split a cluster into pieces

hello again afni experts:

after the group analysis, afni clusterized the activations, but there is, for example, this cluster which includes over 20’000 voxels and covers plenty different brain regions. now i have to split it into smaller clusters. can i do it with afni and what exactly should i do?


Yuan, the conventional approach is to fully rely on statistical inferences, which usually don’t take into consideration the anatomical structure in the brain. If you can a priori define a list of ROIs based on parcellations, atlas, or previous studies, you may consider an alternative approach:,157054,157054#msg-157054

If you want to split a cluster up, you need to decide what is the basis for splitting it. “Clusterizing” is simply applying voxelwise thresholding and then keeping contiguous regions larger than a certain volume. What other information do you have that you want to use to break them up-- how do you even know there should be more, smaller ones, based on your experiment? There are probably lots of other ‘rules’ or conditions you could apply (stricter voxelwise thresholding, anatomical information/masking, existing parcellations), but you would have to decide what is appropriate and meaningful and in what manner…


sorry i didn’t express myself clearly. i don’t really want to split the cluster. i just want to know which regions are under the cluster. for the small ones i just jump to the peak point and ask afni “where am i”. for the huge clusters which obviously cover some different brain regions, i just don’t know how to do, then. so are there any tools in afni that can do that sort of thing, reporting which regions are under an activation?
thank you so much for all your aids!

That makes more sense…

You might want to use “whereami” on the command line with your cluster maps. See the whereami help:
… and this Bootcamp presentation, esp. from page 32 and on:


yes i know what that is, but after i ran “whereami -omask” or clicked the “WamI” in the “AFNI Cluster Results” window, what i got is like:

++ **** voxels in ROI
++ 0 voxels in atlas-resampled mask
Intersection of ROI (value *) with atlas MNI_VmPFC (sub0):

0.0 % of cluster accounted for.

why is that happening

Please paste your exact command that you are using.

And have you overlayed/underlayed that atlas with your cluster in question-- and are you sure that they do actually overlap?


i’m really sorry for being not so sure about the answer of your question because i’m really just starting. and thank you for your patience!
i haven’t used any command to report the clusters yet, because i thought clicking the afni GUI should be able to meet my demands, for now.

to figure out what could be wrong, i want to tell you all my moves i took to analysis these datasets first, if it’s not too bothering:

  1. i used to do the individual analysis, with “-tlrc_base MNI152_T1_2009c+tlrc”.
  2. i took all the “stats.sub*_REML+tlrc” files in result folders and a “mask_group+tlrc” file (which exists in each result folder, all the same, fits well with the MNI152_T1_2009c atlas. i’m not sure if i could use this as the mask in group analysis) in to the “GA” folder to do the group analysis (i used 3dMVM).
  3. i underlayed “MNI152_T1_2009c”, and overlayed “output.masked_BI.test+tlrc”, which is the result of group analysis. they just do actually overlap perfectly in my eyes. is that enough or do i need to do something more?

and here’s a picture (see the attachments, please) with

  1. the cluster results report
  2. after i clicked the “WamI” button, the command line created by the afni GUI.
  3. the result of that command line.

here’re the questions:

  1. like i said, i used the “mask_group+tlrc” file as the mask in group analysis. that file exists in result folders of every subject, and i just used one of them because i found them all the same. they seems to be made just from the atlas i used. is that ok?
  2. when i see the group analysis result, i don’t really know which sub-brick to choose as olay and thr. for example, if i want to see the ttest result of “M6_W6”, like the picture, i have “#17 M6_W6” and “#18 M6_W6 t”. which should i choose as the olay and thr?
  3. why is my cluster report like that, especially why they processed the clusters with atlas MNI_VmPFC? i never used, or even took a look at that atlas, for once. i just used “-tlrc_base MNI152_T1_2009c+tlrc” in and i underlayed the MNI152_T1_2009c when i check all the results.

sorry for bothering!

It is great to visually check your data thoroughly, indeed. If you want to see whether your clusters overlap an atlas, why don’t you underlay that atlas in the GUI? YOu can turn down the transparency of the overlay to see if they overlap, or toggle the overlay on/off in different slices.

Note that I will again recommend looking at what I sent you, because it is relevant. While clicking on the data to look at it is useful, having a script to do it and make files: 1) makes it possible for you to repeat your steps quickly; 2) makes it exactly clear what you are doing (for yourself to repeat, and for asking questions of others); and 3) provides a basis for questions to be answered more explicitly by others (e.g., on the Message Board).

Your processing steps sound good. Since I don’t have your exact processing steps, I am not 100% sure of what mask you should be using. While some different masks are made along the way wtih processing, they are only applied at the group stage, when they matter for delineating a volume within which to search for things. I would encourage you to look at the “s.nimh_group_level_02_mema_bisided.tcsh” script here:
with its accompanying article here:
though the actual processing discussion is from here:
That script (and the second bioRxiv article, in point [A-2]) describes how a group mask can be generated for stats+clustering stuff.

Importantly, that script also has a 3dClusterize command example you can use to generate a file. Using that, you can overlay your clusters with your chosen atlas and see if they overlap. You can even use 3dcalc to test that definitely, rather than scrolling through slices; e.g.:

3dcalc -a CLUSTERSET -b ATLASSET -expr 'step(b)*step(abs(a))' -prefix OVERLAPMASK

… and if OVERLAPMASK has nonzero values, then you have overlap; if not, then you don’t.

Your questions:

  1. See above my comments on masking, using the linked script and section [A-2] in the bioRxiv article << FMRI processing with AFNI: Some comments and corrections on “Exploring the Impact of Analysis Software on Task fMRI Results” >> for a command to generate a better group mask.

  2. We strongly recommend:

  • using the “coef” brick as the olay-- it is the effect estimate, the thing that should have real using like %BOLD change if you have scaled your data and any BLOCK regressors appropriately; it is good validation for your analysis+model if the coef values are in a reasonable range (very roughly: a few percent in the strongest areas of activation, and down to 1 or less in less focal points);
  • using the “stat” brick as thr-- it is the thing we usually test for ‘significance’, and the voxelwise p-value can be converted into a stat directly; the statistic answers a different question than the coef, but it is useful for thresholding.
    FOr the above reasons, GLT results are usuallly put into output volumes with the coef and its associated stat in neighboring subbricks.
  1. I don’t understand this question.
    Note the difference between a “template” (the whole brain, anatomical structure, usually scalar-float valued, with bumps and wiggles of sulci and gyri that shows the underlying anatomical structure/curvature/folding/tissues/etc.) and an “atlas” (a map of specific regions, maybe with partial or whole coverage of the brain, usually integer valued with each integer showing the location of a given ROI perhaps with an attached string label). You would use a template for registration purposes, and an atlas for ROI-identifying purposes.