help
help > RE: Pairwise time-series correlations in a mask
Oct 2, 2020 01:10 AM | Alfonso Nieto-Castanon - Boston University
RE: Pairwise time-series correlations in a mask
Hi Tamir,
Sorry that cannot be done simply from the GUI, but you could compute those average-correlation measures using something like:
Maskfile = '/data/mymask.nii'; % ROI mask; this file should containing 0/1 values with same dimensions as functional data (e.g. [91 109 91])
AvgR = [];
MASK = spm_read_vols(spm_vol(Maskfile));
for nsub=1:conn_module('get','Setup.nsubjects')
a = conn_vol(fullfile(conn_prepend('',conn_module('get','filename'),''), 'results','preprocessing',sprintf('vvPC_Subject%03d_Condition001.mat',nsub)));
b = conn_get_volume(a);
AvgR(nsub) = norm(b*MASK(a.voxels))^2/nnz(MASK(a.voxels))^2;
end
where the variable AvgR will be a vector (one value per subject) with the average correlation among all voxels specified by the mask file (like Global Correlation, but within a mask).
Hope this helps
Alfonso
Originally posted by Tamir Eisenstein:
Sorry that cannot be done simply from the GUI, but you could compute those average-correlation measures using something like:
Maskfile = '/data/mymask.nii'; % ROI mask; this file should containing 0/1 values with same dimensions as functional data (e.g. [91 109 91])
AvgR = [];
MASK = spm_read_vols(spm_vol(Maskfile));
for nsub=1:conn_module('get','Setup.nsubjects')
a = conn_vol(fullfile(conn_prepend('',conn_module('get','filename'),''), 'results','preprocessing',sprintf('vvPC_Subject%03d_Condition001.mat',nsub)));
b = conn_get_volume(a);
AvgR(nsub) = norm(b*MASK(a.voxels))^2/nnz(MASK(a.voxels))^2;
end
where the variable AvgR will be a vector (one value per subject) with the average correlation among all voxels specified by the mask file (like Global Correlation, but within a mask).
Hope this helps
Alfonso
Originally posted by Tamir Eisenstein:
Hi CONN experts,
I would like to compute the average of all pairwise correlations between the time-series of all the voxels in a specfic mask for each subject - is it something I can get using the GUI? or does it needs to be implemented directly in MATLAB?
Thanks!
Tamir
I would like to compute the average of all pairwise correlations between the time-series of all the voxels in a specfic mask for each subject - is it something I can get using the GUI? or does it needs to be implemented directly in MATLAB?
Thanks!
Tamir
Threaded View
| Title | Author | Date |
|---|---|---|
| Tamir Eisenstein | Sep 26, 2020 | |
| Samantha Baldi | Jun 18, 2024 | |
| Alfonso Nieto-Castanon | Oct 2, 2020 | |
| Samantha Baldi | Jun 7, 2024 | |
| Tamir Eisenstein | Oct 2, 2020 | |
| Tamir Eisenstein | Oct 2, 2020 | |
