I think I should explain it better.
I am creating an atlas is a subset of the ARM atlas. ROIs that do not belong to the frontal lobe, temporal lobe, telecephalon, or diencephalon are removed. A mask covering these regions is created from subbrick 0, and the applied to all subbricks.
This done as follows (note - lateralization is removed earlier, corresponding L & R ROIs have the same codes at this point)
set frontal = 1
set temporal = 138
set telen = 1001
set dien = 1082
3dcalc -overwrite -a ${refatl}'[0]' \
-expr 'amongst(a, '${frontal}', '${temporal}', '${telen}', '${dien}')' \
-prefix ${dir_addatl}/IntBrain_mask
3dcalc -overwrite -a ${refatl} -b ${dir_addatl}/IntBrain_mask+tlrc \
-expr 'ifelse(b, a, 0)' -prefix ${IntBrainUARM}
3drefit -copytables ${refatl} ${IntBrainUARM}+tlrc
3drefit -cmap INT_CMAP ${IntBrainUARM}+tlrc
Because I am copying the tables from the original atlas, this preserves the labels for ROIs that do not exist anymore. So 3dinfo -atlas_points or 3dinfo -labeltable don't work. I would like to obtain the list of ROI codes (and _optionally_ their labels) of the ROIs that the new atlas still contains. Ideally as a simple text file. Is there a way to do it?