Something like this will work:
img1=spm_read_vols(spm_vol('file1'));
img2=spm_read_vols(spm_vol('file2'));
[RHO,PVAL] = corr(img1(:),img2(:));
However, you might want to use a mask and only use brain areas, not
the entire image.
mask=spm_read_vols(spm_vol('mask'));
[RHO,PVAL] = corr(img1(mask>0),img2(mask>0));
Best Regards, Donald McLaren
=================
D.G. McLaren, Ph.D.
Research Fellow, Department of Neurology, Massachusetts General Hospital and
Harvard Medical School
Postdoctoral Research Fellow, GRECC, Bedford VA
Website: http://www.martinos.org/~mclaren
Office: (773) 406-2464
=====================
This e-mail contains CONFIDENTIAL INFORMATION which may contain PROTECTED
HEALTHCARE INFORMATION and may also be LEGALLY PRIVILEGED and which is
intended only for the use of the individual or entity named above. If the
reader of the e-mail is not the intended recipient or the employee or agent
responsible for delivering it to the intended recipient, you are hereby
notified that you are in possession of confidential and privileged
information. Any unauthorized use, disclosure, copying or the taking of any
action in reliance on the contents of this information is strictly
prohibited and may be unlawful. If you have received this e-mail
unintentionally, please immediately notify the sender via telephone at (773)
406-2464 or email.
On Mon, Jul 30, 2012 at 8:36 PM, Natalia Yakunina <[log in to unmask]> wrote:
> Hello all,
>
>
> I was wondering how a spatial correlation between two images (say, CSF
> template and a certain activation map) can be performed? Is it possible to
> calculate significance (p values) for it, too?
>
>
> Thank you!
> Regards,
> Natalia
|