Passing the header is what I initially did, i.e. Vhdr = spm_vol(conImgFile); beta = spm_get_data(Vhdr,coords); but I'm getting zero betas. This is the original thread I was referring to, in case it got lost: https://www.jiscmail.ac.uk/cgi-bin/webadmin?A2=ind1108&L=spm&D=0&P=310056 I'm sure it's something obvious I'm missing -- perhaps someone could point out some obvious checks I should do? Thanks a lot! g On 06/08/2015 05:17 AM, MCLAREN, Donald wrote: > You should pass either Vhdr or a list of filenames to spm_get_data, > rather than V. > > The beginning of spm_get_data describes the inputs. > > 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 Sun, Jun 7, 2015 at 8:42 AM, gj <[log in to unmask] > <mailto:[log in to unmask]>> wrote: > > Hi, > > I'm piggybacking on this message as I'm trying to use exactly > spm_get_data to extract gPPI estimates from individual subject con > image files at specific peak coordinates (generated from 1st-level > gPPI). I scripted something similar to Daehyun's code, but I am also > getting zero values. However, when I include the call to spm_read_vols > V=spm_read_vols(Vhdr); > > and pass V and specific coordinates to spm_get_data, spm_get_data > tries to read V like a structure of file handles (and hence I get an > error). Where am I going wrong? > > Thanks in advance for any pointers! > g > >