3dROIMaker -only_conn_top

Hi all,

I am using AFNI (AFNI_21.2.04 'Nerva') to identify 5 contiguous voxels with the highest signal within a region of interest in an anatomical dataset. To do this, I ran the following:

3dROIMaker -overwrite -inset roi_with_vals.nii.gz -prefix contig_5vox -only_conn_top 5 -nifti

Could you please clarify how -only_conn_top identifies contiguous voxels? It is clear how the first and second voxels are selected from the help description (e.g., start the ROI with the peak voxel; search the ROI's neighbors for the highest value; add that voxel to the ROI). However, to add the third voxel, does it then search the nearest neighbors of just the second voxel identified or of the total ROI (e.g., both voxels 1 and 2)?


Hi, Jenna-

The max voxel is found, then the max neighbor to that, then the max neighbor to that collective blob or assemblage, and so forth. I think the question is: does the 4th voxel have to be touching the third one, or any of the 1st, 2nd or 3rd? It is the latter scenario.


Thank you, Paul! I need the latter (4th voxel can be a neighbor of any [1st, 2nd, or 3rd]), so it is a perfect fit. Thank you for clarifying.