Print

Print


Your missing a line of code, the code should be:
Vhdr=spm_vol('con_0001.img');
V=spm_read_vols(Vhdr);
XYZ(:,1)=[-26, 0, -18];
beta=spm_get_data(V,XYZ)

This will give you a single point value for the contrast value of contrast 1
at the specified location. If you want the beta values, then you need to
load the beta images. If this is a second level model and you are wanting
the input image values, then you need to load the input image values. In
this case, you will want to look at my VOI tool (see previous posts /
www.martinos.org/~mclaren/ftp/Utilities_DGM/ and download All*tar).

Best Regards, Donald McLaren
=================
D.G. McLaren, Ph.D.
Postdoctoral Research Fellow, GRECC, Bedford VA
Research Fellow, Department of Neurology, Massachusetts General Hospital and

Harvard Medical School
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 Fri, Aug 12, 2011 at 9:17 AM, Daehyun Jung <[log in to unmask]>wrote:

> Dear SPMers,
>
> I've used marsbar to extract beta values.
>
> The problem is that  I cannot extract beta value from con_0001.img.
>
> Marsbar only allow to read SPM.mat. So I cannot read the com image
> directly.
>
> Is there any way  to extract beta value by reading the con image?
>
> I have tried to use
>
> V=spm_vol('con_0001.img')
> XYZ(:,1)=[-26, 0, -18]
> beta=spm_get_data(V,XYZ)
>
>
> I got "zero" beta value.
>
>
> Best regards,
>
>