Print

Print


Dear Tim,

Tim Hahn wrote:
> Dear SPMers,
> I would like to retrieve the betas for an area of which a have a mask. How 
> could I get these betas?
> Additionally: is there a list of which data is stored in which workspace 
> variable in SPM5?

The betas are stored in images in the directory in which you did the
analysis eg. beta_0001.img is an image of the first regression
coefficient.

You can use the display button in SPM, load these images, type in the
relevant co-ordinates and see the beta value ('intensity:').

For lots of voxels you could link to the file from the matlab workspace eg.
 >V=spm_vol('DIRECTORY-PATH\beta_0001');

then create a list of N voxels you want to look at
by specifying their locations in a 3 x N XYZ matrix

eg. XYZ(:,1)=[-20,-20,5)  % first voxel location
XYZ(:,2)=[-20,20,5)  % second voxel location

then get the beta values

 > beta=spm_get_data(V,XYZ)

Using similar principles you could create the XYZ list automatically
by loading in a mask image. Getting all the data from a large range of
voxels, then eliminating those voxels not in the mask. Or perhaps 
someone else has already written this piece of code !

Best,

Will.


> Thanks in advance! 
> Kind regards,
> Tim
> 
> 

-- 
William D. Penny
Wellcome Trust Centre for Neuroimaging
University College London
12 Queen Square
London WC1N 3BG

Tel: 020 7833 7475
FAX: 020 7813 1420
Email: [log in to unmask]
URL: http://www.fil.ion.ucl.ac.uk/~wpenny/