Hi Tamir,
[color=#000000]Sorry that cannot be done simply from the GUI, but you could compute those average-correlation measures using something like:[/color]
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 [b]AvgR[/b] 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
[i]Originally posted by Tamir Eisenstein:[/i][quote]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[/quote]
[color=#000000]Sorry that cannot be done simply from the GUI, but you could compute those average-correlation measures using something like:[/color]
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 [b]AvgR[/b] 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
[i]Originally posted by Tamir Eisenstein:[/i][quote]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[/quote]