Correlation matrix of all voxels between two ROI's

Hi everyone,

I was hoping to create a functional connectivity matrix using nilearn, where each index of the matrix corresponds to the correlation strength between a pair of voxels between two ROI’s. So, I have ROI 1 (i/e PFC) and ROI 2 (i/e PPC) and each voxel would correspond to the correlation strength between each possible pair of voxels between the two ROI’s.

Would it be easiest to combine the two ROI’s (so a PFC + PPC ROI) and a connectivity matrix of all the voxels within the ROI?

Any tips to go about this? Thanks so much!


Hi,
You can extract the voxel-level time courses for each of the ROIs with a NiftiMasker object, which will give you a set of time courses per ROI. You can then input these time courses to the ConnectomeMeasure that is relevant to you. You probably want to use a concatenation of all the time courses to compute the cross-ROI connectivity term.
Does that answer your question ?
Best,
Bertrand