ROI analysis often means averaging over all the voxels within a mask - either the average parameter, or the average timeseries. For most researchers this is all they need.
Whether or not that applies to you as well, I would like to talk about one more type of ROI analysis: extracting data from each voxel. Most researchers use this analysis to extract the timeseries for each voxel in the brain, although you can extract whatever data you like - parameter estimates, timeseries, and anything else contained in your voxels.
The best tool for this analysis is AFNI's 3dmaskdump. Using the command is simple: the only arguments it requires are an image containing the data you wish to extract, and a mask indicating which voxels to extract from. I prefer to use the options -noijk (to turn off reporting the ijk coordinates) and -xyz (to report the coordinates of each voxel in the image's space, whether it's still in its native space, or whether it has been normalized to Talairach or MNI).
Let's say that you have a mask, mask.nii, and an image, image.nii. Imagine that there are 3 voxels in your mask, and that your image has 5 volumes. If you use the command:
3dmaskdump -noijk -xyz -mask mask.nii image.nii > myFile.txt
You will get output that looks like this:
0 30 30 100.1 99.8 99.5 102.3 100.5
0 30 31 99.7 99.9 100.3 100.2 97.5
0 30 32 103.4 98.7 99.5 100.7 101.3
There are 3 rows, one for each voxel in your mask. Within each row, the first three numbers are the x-, y-, and z-coordinates of the voxel, and the next 5 numbers are the values within each volume of the image. If you would prefer not to have the coordinates for each voxel, remove the -xyz option.
I recommend using 3dmaskdump for this analysis regardless of which software you used to process your data. 3dmaskdump be used with any NIFTI image, and NIFTI images are output by the current versions of SPM and FSL. If you find yourself dealing with older data types, such as ANALYZE, it may work with that as well; be advised however that the orientation in ANALYZE files is different than NIFTI, and so the coordinates output by 3dmaskdump may be wrong.
No matter which software you use, you should begin to see how the concepts of masks and data extraction are the same across the packages. The more you practice using these tools, the more fluently you will be able to use them and talk about them - in sum, the easier it will be to do your research. And what are these tools for, if not to make our research easier?
