rsagroup / rsatoolbox_matlab

A Matlab toolbox for representational similarity analysis
40 stars 49 forks source link

Query about RSA defineSearchlight function #46

Open jdiedrichsen opened 3 years ago

jdiedrichsen commented 3 years ago

Forwarded request:

Hi, I study multisensory integration. I have been trying to use your RSA toolbox on Matlab for performing some representational similarity analysis. It has some wonderful set of functionalities.

I have a query about defining the search space for the analysis. What I want to do is define an ROI (let us say the posterior superior temporal gyrus: pSTG) and then use this ROI as a mask in the defineSearchlight function. I have specific ROIs from freesurfer parcellations.and I am able to run the analysis and get meaningful results from this ROI.

The next thing I want to do is that instead of defining the radius of the search and voxels in the form [R C] in order to use maximum radius R to find approximately C voxels, I want to use the entire ROI as a single voxel so that I get a single RDM measure for that specific ROI. Is there any way I can specify this in the defineSearchlight function? I have tried a few options, but I don't think I am doing it right.

jdiedrichsen commented 3 years ago

Not sure what you are trying to do. If you want to run a searchlight analysis WITHIN an ROI, just pass the ROI image as "Mask" to the function - defineSearchlight will only use voxels within the mask If you want to get a single measure for ALL VOXELS within the ROI, you don't need defineSearchlight - just extract the data for the ROI and calculate the distances. There are many ROI toolboxes to do this - ours is diedrichsenlab/regions

J