In the previous post I shared R code to perform a searchlight analysis on a sample dataset; this post describes R code to perform a ROI-based analysis on the dataset. In addition to the code and dataset files linked in the previous sentence, the code requires a ROI mask, shown at left.
This code is essentially a simpler version of the searchlight code: instead of reading out which voxels to classify from the lookup and 3d files it gets the voxel coordinates from the ROI mask. The key part of this code is that the ROI mask and functional data must be fully aligned - as the images are read into R. This can easily go awry; I strongly suggest you spot-check several voxels in R and an outside program (such as MRIcroN) to make sure the laterality of all images agree.
No comments:
Post a Comment