Cannot extract ROI labels from aparc.a2009s+aseg_rank_Alnd_Exp

Hello AFNI community,

I am trying to extract Destrieaux ROIs from data that was processed using an older version of AFNI/SUMA. The data has already been processed through suma (i.e. @SUMA_Make_Spec_FS, @SUMA_AlignToExperiment, etc.). When attempting to extract and combine ROIs from aparc.a2009s+aseg_rank_Alnd_Exp, e.g. using 3dcalc, I get the following error:

$ 3dcalc -a aparc.a2009s+aseg_rank_Alnd_Exp::ctx_lh_G_pariet_inf-Angular -b aparc.a2009s+aseg_rank_Alnd_Exp::ctx_lh_G_pariet_inf-Supramar -c aparc.a2009s+aseg_rank_Alnd_Exp::ctx_lh_S_interm_prim-Jensen -expr a + b + c -prefix lh.InferiorParietal.cortical
++ 3dcalc: AFNI version=AFNI_21.1.02 (Apr 16 2021) [64-bit]
++ Authored by: A cast of thousands
*+ WARNING: Proceeding with hope for an impossible miracle...
** FATAL ERROR: can't open dataset aparc.a2009s+aseg_rank_Alnd_Exp::ctx_lh_G_pariet_inf-Angular
** Program compile date = Apr 16 2021

The labels for aparc.a2009s+aseg_rank exist (e.g. they appear when whereami is called from /SUMA). If my goal is to extract ROIs from aparc.a2009s+aseg_rank_Alnd_Exp, how might I go about this?

Thank you so much!


As a preliminary question, what is your AFNI version (“afni -ver”)? I don’t think we have made the arank dsets for a while… In general, we recommend people use the aREN dsets that are made—those have more stable numbering. These are described here as part of the FreeSurfer tutorial:
(Note that selecting by ROI label should actually still be OK even for the rank dsets—but the REN dsets are good to know about/use anyways.)

In terms of your ROI label names, you should be able to use the ROI selector notation in AFNI, putting the list of ROI labels in angle brackets (with quotes):

3dcalc -a aparc.a2009s+aseg_rank_Alnd_Exp+orig.HEAD"<ctx_lh_G_pariet_inf-Angular,ctx_lh_G_pariet_inf-Supramarc,ctx_lh_S_interm_prim-Jensen>" -expr 'a' -prefix lh.InferiorParietal.cortical

That should do what your expression did with the 3 sep ROIs.

If you want to reattach the labeltable (and the automatic use of an ROI-appropriate colorbar in the AFNI GUI) to your new dset:

3drefit -copytables aparc.a2009s+aseg_rank_Alnd_Exp+orig.HEAD    lh.InferiorParietal.cortical+orig
3drefit -cmap INT_CMAP            lh.InferiorParietal.cortical+orig


Thanks for the solution!
We have several afni versions available: the data was processed using AFNI_16.3.08 (we have updated afni binaries I can use).

Using angular bracket notation as you specified successfully generated the ROI!


OK—I would strongly recommend that you use a more uptodate AFNI version than that. There are so many new useful features since then, e.g., the @SSwarper program for nonlinear alignment+skullstripping, the QC HTML that now creates:
… and more.