Print

Print


Hello! Everyone!

 

I want to compute the volume of gray matter in original images. I found following codes in previous emails from John, but I don’t understand what ‘voxvol = det(V(1).mat)/100^3;’ calculates. Since tot represents the sum of voxel intensities in modulated gray matter images, the total volume should be the sum multiplying by the product of the voxel size. If the modulated image has a voxel size as 1mmx1mmx1mm, is the product of the voxel size is equal to 1?

 

If I’d like to compute the global intracranial volume, shall I do all the same but only replace the modulated gray matter image to the modulated brain image?

 

 

V = spm_vol(spm_get(1,'*.img'))
tot = 0;
for i=1:V(1).dim(3),
        img = spm_slice_vol(V(1),spm_matrix([0 0 i]),V(1).dim(1:2),0);
        tot = tot + sum(img(:));
end;
voxvol = det(V(1).mat)/100^3; % volume of a voxel, in litres
tot    = tot; % integral of voxel intensities
tot*voxvol
 
Many thanks!
 
 

 

 

Dr shan shen

Department of Psychology

University of Surrey

Guildford GU2 7XH

UK