Hello SPMers
there is also a script written by John Ashburner to compute volumes in SPM5
(see attachment)
best regards
Juergen
----------------------------------------------
Juergen Haenggi, Ph.D. student
Neuropsychology and Imaging
Division of Psychiatry Research
Psychiatric University Hospital
University of Zurich, Switzerland
P.O. Box 1931
Lenggstrasse 31, 8032 Zurich
0041 44 384 26 10 (office phone)
0041 76 445 86 84 (mobile phone)
0041 44 384 26 86 (fax)
H 115 (office room number)
[log in to unmask] (division email)
http://www.dpr.unizh.ch/ (division website)
http://www.juergenhaenggi.ch (private website)
----------------------------------------------
> -----Ursprüngliche Nachricht-----
> Von: SPM (Statistical Parametric Mapping)
> [mailto:[log in to unmask]] Im Auftrag von Jiansong Xu
> Gesendet: Donnerstag, 3. August 2006 01:21
> An: [log in to unmask]
> Betreff: [SPM] volume of whole brain
>
> Dear Friends:
>
> How to measure the volume of the whole brain?
>
> Thanks
>
> Jiansong
>
P = spm_select(Inf,'image','Select images');
for j=1:size(P,1),
V = spm_vol(deblank(P(j,:)));
vol = 0;
for i=1:V.dim(3),
img = spm_slice_vol(V,spm_matrix([0 0 i]),V.dim(1:2),0);
img = img(finite(img));
vol = vol + sum(img(:));
end;
voxvol = abs(det(V.mat(1:3,1:3)))*1e-6;
fprintf('%g voxels, %g litres\n', vol, vol*voxvol);
end;
|