Voxel level data for specific ROIs

AFNI version info (afni -ver):

Hi everyone, I'm new to AFNI and looking for commands to extract beta values per voxel for specific ROIs. My question might be basic, but I was wondering if this is doable in AFNI. What are the command lines to define a mask for specific ROIs and extract per-voxel beta values?

Howdy-

A couple precursor points:

  • There is a useful set of teaching material for various aspects of MRI/FMRI analysis using AFNI on the AFNI Academy YouTube channel
  • There is the Classified program list of AFNI programs, where we have grouped programs by general functionality. It is one giant page so users can search within it for keywords. We have tried to rank a bit within each topic, putting a 5 by majorly used programs, and decreasing to 1 for more niche ones (or older ones).

Your functionality of interest probably falls under the Get info/stats within ROIs category. If you want each individual value in a set of voxels, you probably want 3dmaskdump. For example for a given map of regions DSET_ROI that has a particular region of interest with integer ROI_VALUE, you can extract all the voxel values from a beta value dataset DSET_BETAS via:

3dmaskdump -mask DSET_ROI"<ROI_VALUE>" DSET_BETAS > dump_file.dat

... and you can choose whether to include coordinates or not.

And this is the AFNI Academy ROIs playlist.

--pt