help > Voxel-to-voxel connectivity
Showing 1-9 of 9 posts
Display:
Results per page:
Mar 1, 2020  07:03 PM | Panos Fotiadis
Voxel-to-voxel connectivity
Hello,

I wanted to perform some voxel-to-voxel connectivity analyses, and I had a few questions:

1) Under SETUP -> Basic, the Repetition time refers to the T1 not the fMRI sequence, right?

2) When setting up the preprocessing pipeline, one of the questions are the target resolution for our structural and functional scans. My T1 voxel size is 0.9mm isotropic, whereas my fmri voxel size is 3mm isotropic. Should I input those resolutions as the target resolution in that step, or would you recommend I leave the default values of 1 and 2 mm isotropic, respectively?

More specifically on the voxel-related analyses:

3) I would like to generate voxel-to-voxel functional connectivity matrices for each one of the subjects I'm analyzing. What is the best way to do that? I saw another post about looking into the vvPC_Subject*.matc, converting it to nifti, reshaping this into a matrix B with size [Number-of-voxels/vertices by Number-of-components], and then computing B*B'. In that case:

a) What would each entry in the B*B' matrix correspond to? Is it the Pearson's correlation between the time series of any two corresponding voxels? 

b) What is the difference between the vvPC_Subject*_Condition*.matc and vvPCeig_Subject*_Condition*.matc. Is the latter the same matc but in eigen space (change of basis)?

c) How would I proceed if I wanted to generate functional connectivity matrices for each subject where each entry represents any one of the measures analyzed in the 1st level voxel-to-voxel analyses in CONN (e.g. intrinsic connectivity, global connectivity etc). I ran some of the voxel-to-voxel 1st level analyses but I couldn't find any corresponding output .mat files that would capture this info for each voxel.

4) Is there a way to get a nifti where each voxel is assigned to its corresponding ID as a label? In other words, from the connectivity matrix in (3) each voxel will have been assigned an index. Is there a way to see what voxel each index in the matrix corresponds to?

Thank you in advance for all the help and for this terrific software!!

Best,
Panos
Mar 5, 2020  02:03 PM | Panos Fotiadis
RE: Voxel-to-voxel connectivity
Hello,

Just wanted to re-circulate this, in case someone had some feedback!

Thanks in advance,
Panos
Mar 6, 2020  05:03 PM | Alfonso Nieto-Castanon - Boston University
RE: Voxel-to-voxel connectivity
Hi Panos
Some thoughts on your questions below
Best
Alfonso

1) Under SETUP -> Basic, the Repetition time refers to the T1 not the fMRI sequence, right?


No, TR refers to the sampling period of your functional data (i.e. time difference between every two sequential timepoints in your functional timeseries)


2) When setting up the preprocessing pipeline, one of the questions are the target resolution for our structural and functional scans. My T1 voxel size is 0.9mm isotropic, whereas my fmri voxel size is 3mm isotropic. Should I input those resolutions as the target resolution in that step, or would you recommend I leave the default values of 1 and 2 mm isotropic, respectively?

Default values should be fine here. Typically you would increase your resolution only if the default values are significantly downsampling your original data


3) I would like to generate voxel-to-voxel functional connectivity matrices for each one of the subjects I'm analyzing. What is the best way to do that?

This is going to get complicated very fast. If you are starting out, I would recommend to begin with conventional analyses first (e.g. seed-based connectivity, ROI-to-ROI analyses using whole-brain parcellations, as well as default voxel-to-voxel metrics such as intrinsic connectivity, global and local connectivity, ICA, MVPA, etc.) before jumping into this sort of more complex analyses. That said...

I saw another post about looking into the vvPC_Subject*.matc, converting it to nifti, reshaping this into a matrix B with size [Number-of-voxels/vertices by Number-of-components], and then computing B*B'. In that case:
a) What would each entry in the B*B' matrix correspond to? Is it the Pearson's correlation between the time series of any two corresponding voxels? 

each element of the (huge) matrix B*B' is the pearson correlation coefficient between two voxels

b) What is the difference between the vvPC_Subject*_Condition*.matc and vvPCeig_Subject*_Condition*.matc. Is the latter the same matc but in eigen space (change of basis)?

vvPC_Subject*_Condition contains the eigenvectors (B matrices above) while vvPCeig_* contains eigenvalues and other additional info

c) How would I proceed if I wanted to generate functional connectivity matrices for each subject where each entry represents any one of the measures analyzed in the 1st level voxel-to-voxel analyses in CONN (e.g. intrinsic connectivity, global connectivity etc). I ran some of the voxel-to-voxel 1st level analyses but I couldn't find any corresponding output .mat files that would capture this info for each voxel.

When you run the corresponding first-level analyses in CONN, it will create a series of files named BETA_Subject*_Condition*_Measure*.nii containing those metrics (those are actually single values per voxel, rather than single values per each pair of voxels, like the connectivity matrices above)

4) Is there a way to get a nifti where each voxel is assigned to its corresponding ID as a label? In other words, from the connectivity matrix in (3) each voxel will have been assigned an index. Is there a way to see what voxel each index in the matrix corresponds to?

If you use the following syntax:

   Y1=conn_vol('vvPC_Subject001_Condition001.mat');

the field Y1.voxelsinv will be a 3d matrix (typically with size 91x101x91) containing the ID# of each element in the above B matrices (e.g. 1 indicates the voxel associated with the first row of B, 2 the second row of B, etc.)

If you want to get between i,j.k coordinates in this 3d matrix and x,y,z spatial coordinates of the corresponding voxels, the transformation is:

   xyz = Y1.matdim.mat * [i;j;k;1];

Hope this helps
Alfonso
Mar 16, 2020  06:03 AM | Panos Fotiadis
RE: Voxel-to-voxel connectivity
Hi Alfonso,

That is tremendously helpful, thank you!!

I had two follow-up questions:

1) In addition to the 32 networks that you have set as default, I would also be interested in performing analyses using the 7 Yeo networks. What would be the proper way to load them into CONN? Based on a prior thread, I gathered that I should break the Freesurfer provided liberal Yeo atlas into its 7 components and merge them into a 4d volume, as in:

rex split Yeo2011_7Networks_MNI152_FreeSurferConformed1mm_LiberalMask.nii
spm_file_merge(spm_vol(char(conn_dir('Yeo*.rex.roi.img','-ls'))),'Yeo2011_template.nii');

, then add the Yeo2011_template.nii file as a new "atlas file" under the ROIs tab, and run the denoising and 1st level analyses (without any need to re-run preprocessing). 

a) Is this approach correct? 
b) Do I need to add an associated text file in the same directory in addition to the Yeo2011_template.nii file? If yes, should that text file be the Yeo2011_7Networks_ColorLUT.txt file located under $FREESURFER_HOME/average/Yeo_JNeurophysiol11_MNI152/ or a different txt file that contains the centroids of each ROI such as the networks.txt file under conn/rois?

2) Assuming that I have connectivity results with the Yeo atlas mentioned above, I would be interested in knowing which voxel IDs (identified from question 4 in the previous message) belong to each of the 7 ROIs. I could think of a way to check that using a for loop that goes through each voxel ID and checks whether its xyz coordinates belong to any of the 7 ROIs, but would you happen to know of a less computationally tedious way to do that?

Thanks again,
Panos
Mar 25, 2020  01:03 AM | Panos Fotiadis
RE: Voxel-to-voxel connectivity
Hi Alfonso,

Just wanted to re-circulate this! Feel free to ignore the 1st question, as I saw that you have now included the Yeo atlas in the new CONN distribution (thanks for that!). Still curious about the 2nd question though.

Also, based on your response on (my previous post's) question 4, is the ordering of the voxel IDs of matrix Y1 the same as the ordering of voxels in BETA_Subject*_Condition*_Measure*.nii (if I load it as a matrix in Matlab)? In other words, will the nth index of the BETA matrix and the nth index of the Y1 matrix both correspond to voxel n in the B matrix? 

Thanks again, and hope all is well!

Best,
Panos
Mar 26, 2020  10:03 PM | Alfonso Nieto-Castanon - Boston University
RE: Voxel-to-voxel connectivity
Hi Panos,

Yes, the files BETA_Subject*_Conditions*_Measure*.nii will typically be of the same size as the "Y1.voxelsinv" 3d matrix (e.g. 91x101x91), so the nth voxel in the BETA matrix (e.g. BETA(n)) will correspond to the Y1.voxelsinv(n) row of the B matrix (e.g. B(Y1.voxelsinv(n),:))

Best
Alfonso


Originally posted by Panos Fotiadis:
Hi Alfonso,

Just wanted to re-circulate this! Feel free to ignore the 1st question, as I saw that you have now included the Yeo atlas in the new CONN distribution (thanks for that!). Still curious about the 2nd question though.

Also, based on your response on (my previous post's) question 4, is the ordering of the voxel IDs of matrix Y1 the same as the ordering of voxels in BETA_Subject*_Condition*_Measure*.nii (if I load it as a matrix in Matlab)? In other words, will the nth index of the BETA matrix and the nth index of the Y1 matrix both correspond to voxel n in the B matrix? 

Thanks again, and hope all is well!

Best,
Panos
Mar 26, 2020  10:03 PM | Panos Fotiadis
RE: Voxel-to-voxel connectivity
Awesome, thank you Alfonso!!

One last thing:

Is there a way to know which voxel IDs from the BETA matrix (for instance) correspond to each given atlas region? For example, if I'm using the Yeo atlas, is there a way to find out the voxel IDs that belong to each ROI (1 through 7)? I can think of a tedious for loop to do that that involves checking every voxel index and whether its coordinates belong to each atlas ROI, but was wondering if you had something more elegant in mind.

Thanks again,
Panos
Mar 26, 2020  11:03 PM | Alfonso Nieto-Castanon - Boston University
RE: Voxel-to-voxel connectivity
Sure, something like:

Y = conn_vol('vvPC_Subject001_Condition001.mat');
vol = spm_vol('Yeo2011.nii');

[x,y,z] = ind2sub(Y.matdim.dim, Y.voxels);
xyz = Y.matdim.mat*[x(:) y(:) z(:) ones(numel(x),1)]';
label = spm_get_data(vol, inv(vol.mat)*xyz);

will return a "label" variable with the Yeo network number (from 1 to 7) of each of the rows of the B matrix (or 0 for all voxels outside the Yeo mask; e.g. white matter or subcortical structures)

Best
Alfonso

Originally posted by Panos Fotiadis:
Awesome, thank you Alfonso!!

One last thing:

Is there a way to know which voxel IDs from the BETA matrix (for instance) correspond to each given atlas region? For example, if I'm using the Yeo atlas, is there a way to find out the voxel IDs that belong to each ROI (1 through 7)? I can think of a tedious for loop to do that that involves checking every voxel index and whether its coordinates belong to each atlas ROI, but was wondering if you had something more elegant in mind.

Thanks again,
Panos
Mar 26, 2020  11:03 PM | Panos Fotiadis
RE: Voxel-to-voxel connectivity
That looks great, thank you!

Best,
Panos