Thank you!
I was able to get the first answer (what part of the ROI belongs to this and that atlas area) bu using whoami with -bmask or -omask, even if the output is not very machine readable.
Intersection of ROI (all non-zero values) with atlas ARM (sb3):
31.0 % overlap with CR_area_24, code 506
29.7 % overlap with CR_rostral_dlPFC
[CR_rostral_dorsolateral_prefrontal_cortex], code 559
12.1 % overlap with CR_area_8B, code 555
9.9 % overlap with CR_SMA/preSMA
[CR_medial_supplementary_motor_areas], code 587
4.2 % overlap with CR_MCC
[CR_midcingulate_cortex], code 511
3.2 % overlap with CR_rostral_vlPFC
[CR_rostral_ventrolateral_prefrontal_cortex], code 565
1.3 % overlap with CR_area_32, code 504
0.1 % overlap with CR_area_10
[CR_frontal_pole], code 518
I can't find a way though to do the opposite, i.e. for each atlas area that intersects with the ROI, what percentage of that atlas area is covered by the ROI. Can this be done with whereami?
Also am I right that there is no way to limit this to specific subbricks of a multi-brick atlas like ARM?
Thank you for telling me a BrikLoad(), I found an old copy online and I'll experiment with it in case I decide to go the Matlab way after all.