> John, I am so grateful that you are helping me with this. Just one
> more question, as I am so ignorant. Is there any script that sums up
> the values in voxels in the modulated normalized MRIs in SPM5? I am
> not sure where I can get this or it already exists under
> SPM5. Obviously, the voxel size I can get it by using the display (2x2x2).
Try this...
V = spm_vol(spm_select(Inf,'image'));
T = zeros(numel(V),1);
for j=1:numel(V),
tot = 0;
for i=1:V(j).dim(3),
img = spm_slice_vol(V(j),spm_matrix([0 0 i]),V(j).dim(1:2),0);
tot = tot + sum(img(finite(img)));
end;
voxvol = abs(det(V(j).mat))/100^3; % volume of a voxel, in litres
tot = tot*voxvol; % integral of voxel intensities
T(j) = tot;
end;
disp(T)
Best regards,
-John
|