@SUMA_Make_Spec_FS update; and new @SUMA_renumber_FS

Some new FreeSurfer-related functionality to be aware of in the New Year (starting from AFNI version 16.3.20): new files being output, including tissue-maps.

Old functionality
The function (written by ZSS) for bringing default output from FreeSurfer’s “recon-all” is called @SUMA_Make_Spec_FS. While it was translating things correctly previously, we have made some changes for how the volumetric files aparc+aseg.nii.gz (the “2000” atlas) and aparc.a2009s+aseg.nii.gz (the “2009” atlas) files are brought into the AFNI realm in order to simplify consistent ROI selection across a group(s) of processed subjects.

Previously, each of those atlases was renumbered to have smaller ROI values, and a labeltable of FreeSurfer-nomenclature tags was attached-- the created file was called either aparc+aseg_rank.nii.gz or aparc.a2009s+aseg_rank.nii.gz (as the renumbering was done by ‘rank ordering’ regions). Anyways, while the correct tags were stuck onto numbers, we note that the same region might have different numbers, because FreeSurfer doesn’t always find and output every ROI it looks for. Thus, if one were using 3dcalc commands to select a rankfile ROI by number, then one might get different physiological regions in different subjects.

New functionality
Therefore, we have come up with a (hopefully) better system for renumbering the FreeSurfer atlas files (the renumbering happens mainly for colorbar-related reasons; we might change how colorbars in AFNI work at some point, so that renumbering wouldn’t be necessary). This numbering is a predetermined mapping, so that the same region should always be matched with the same integer value-- thus, selection across a group could be done by either tag or integer. These newly renumbered atlas files are called:
aparc+aseg_REN_all.nii.gz and aparc.a2009s+aseg_REN_all.nii.gz,
and each has labeltables with the same prefix attached.

Additionally, @SUMA_Make_Spec_FS will also output maps of ROIs of a given tissue type (NB: not binary maps, but having the renumbered integers, plus the same string labels). We have put together these maps using some information from FreeSurfer’s mri_binarize function and also by looking at ROI names, but as a caveat we note that we haven’t gotten definite confirmation from the FreeSurfer authors that they agree with this segmentation/organization. We are still hoping for feedback on this point, and would welcome suggestions by users.

Each tissue map has a similar prefix to its respective renumbered atlas, ending in file name “REN_[tissue abbreviation].nii.gz”.
The current master lists of regions are contained in afni_fstxt files in the binary directory; users can grep for the key words "tiss__" listed here:
tiss__gm: gray matter
tiss__wmat: white matter
tiss__csf: CSF
tiss__vent: ventricle + choroid plexus
tiss__othr: optic chiasm, non-WM hypoint, etc.
tiss__unkn: FS-defined ‘unknown’

If you want to have such renumbering and tissue maps in data that you have already run @SUMA_Make_Spec_FS on, then you can just use the new function @SUMA_renumber_FS (which is what is called by @SUMA_Make*FS); see its ‘-help’ for usage instructions, but it basically just needs to know where the SUMA/ directory is.

Hope that helps everyone’s New Year off to a good start (it’s almost as good at Giroud’s goal against Palace today, for anyone who has read this far and/or cares).


hi there paul-

just wondering if these new changes apply also to the FS 6.0 that was just officially released?


That would involve me downloading the new FS, copying the files, running more data sets… Sounds like work.

But, yes, sigh, unfortunately it’s on my to-do list to check. Comparing the FS look-up table, there are some new entries in v6.0 that weren’t in 5.*, so I’ll do some digging.


… and, pursuant to the preceding grumbling about forced manual labor, the @SUMA_renumber_FS script has been checked for FS 6.0. This task was made infinitely easier by he-who-asked-the-question providing some processed anatomical data to check with-- in the end, one more pair of L- and R- labelled regions had to be accounted for (though it is possible that could also be due the high resolution nature of the data set that was being used).

So, in general, as of AFNI 17.0.05, the @SUMA_renumber_FS should be compatible with FS 6.0 output.

Note that the script does already check to see if there are any FS-generated ROIs which it hasn’t accounted for, so if it produces error messages, please let me know so I can investigate further.

Thanks (and thanks again Sam for the data to check with),