Image calculator group image temporal correlation error

Submitted by David on

Hi,

I'm getting an error when trying to calculate the temporal correlation corr(g1,g2,'temporal') between two groups (95 nifti images each):

Error using DPABI_CALCULATOR_TOOL>ComputeButton_Callback (line 339)
Expression Error
 
Error in gui_mainfcn (line 95)
        feval(varargin{:});
 
Error in DPABI_CALCULATOR_TOOL (line 42)
    gui_mainfcn(gui_State, varargin{:});
 
Error in @(hObject,eventdata)DPABI_CALCULATOR_TOOL('ComputeButton_Callback',hObject,eventdata,guidata(hObject))
 
 
Error while evaluating uicontrol Callback

I'm using the latest version of dpabi, windows 7 and spm12. What could be the problem? Spatial correlation works fine.

 

 

YAN Chao-Gan

Wed, 11/04/2015 - 08:41

Hi David,

Thanks for your report!

This is a bug.

Please revise Line 422 in Utilities/DPABI_CALCULATOR_TOOL.m

from 

V(i, 1)=corr(V1(i,:)', V2(i,:));

to

V(i, 1)=corr(V1(i,:)', V2(i,:)');

Best,

Chao-Gan

Glad I could be of help :). Works fine now, thanks!

One question though: How is the temporal correlation calculated? I'm not sure I understood the description in the help correctly. For example when having two groups of 50 people. What does "time course" mean? Does it generate a "timecourse" from the 50 seperate values of each persons nifti and correlates it with the generated timecourse from the other group for each voxel? In other words, does order matter?

Same with spatial correlation, what exactly does "time point" mean? That is, how is the correlation between two images calculated? It gives me a txt-file with e.g. 50 values in contrast to a nifti in the spatial correlation.

Not sure I understand what the difference is between them and hope you can explain it a little more. Thanks!

Hi David,

It doesn't' mean "Time course", but a series of numbers. I don't quite understand why you want to correlate two groups of people in such a way. It could be used in such a situation, you have 50 ALFF maps for 50 subjects, and you also have 50 ReHo maps for them. For each voxel, the correlation between 50 ALFF values and 50 ReHo values are calculated. The order doesn't matter.

Here, for each subject, the spatial correlation between ALFF map and ReHo map is calculated.

Best,

Chao-Gan