I have some pre-processed fMRI data in Nifti file format and I want to access the BOLD values associated with a specific brain region e.g. Right Anterior Insula. I know there are lots of functions out there to import data from nifti files, but I want to make sure that the BOLD values literally represents the activity in the region of interest since I want to do some classification based on that.
Is there any good and efficient method for doing that, preferably some SPM-related functions?
Best How To :
I'm not aware of a simple existing Matlab function/toolbox that directly does what you want, but all the elements are there and you should be able to program something like that yourself.
The information which voxel in an image belongs to which anatomical brain region is provided by so-called atlases, basically look-up tables. One such atlas is contained in the popular AAL extension for SPM (up to version 8). The purpose of the AAL toolbox is to translate from given voxel coordinates to anatomical labels – which is not what you need.
However, underlying this is a nifti image "ROI_MNI_V4.nii" which contains integer codes in each voxel, and an accompanying text file "ROI_MNI_V4.txt" which translates between these integer codes and anatomical labels. The right insula for example has the code 3002. So you look up in the nifti image all the voxels that contain the code 3002, and you get a mask that marks all the voxels in the right insula.
You have to be aware though that in order to have voxel-by-voxel matching, your data file needs to have the same resolution and alignment as the atlas image. Moreover, the atlas is calibrated to MNI standard space, which means you will have to normalize your data to an MNI template, or better: apply the inverse normalization transform to the atlas. If you don't know what I'm talking about here, you should read the sections about spatial normalization in the SPM manual. Another problem might be that the AAL parcellation is not sufficiently fine-grained for you; for example, there is no special code for the anterior right insula. But there are other atlases out there, and one of them might provide what you need.
If you start implementing this approach to your problem and you get stuck, feel free to post another question with the specific issue and point me to it via a comment here.