Hi everyone,
I want to compute intracranial volumes (ICV) on T1 images.
I use the "New segment" procedure and then apply the following script that I found on this forum:
V = spm_vol(spm_select(Inf,'Image'));
Vols = zeros(numel(V),1);
for j=1:numel(V),
tot = 0;
for i=1:V(1).dim(3),
img = spm_slice_vol(V(j),spm_matrix(...
[0 0 i]),V(j).dim(1:2),0);
img = img(isfinite(img)); % <-- exclude non-finite values
tot = tot + sum(img(:));
end;
voxvol = abs(det(V(j).mat))/100^3; % volume of a voxel, in litres
Vols(j) = tot*voxvol;
end
I do not understand why but I sometimes have slightly different results if I put only one image there (e.g. one c1 image), or the images of 6 subjects at one
As an example, for the c1 volumes, I get these volumes for 6 subjects (only c1 images) if I put them all together:
0,748791232277067
0,566458297542124
0,694005878830069
0,804684337578292
0,497836206898500
0,813398758282534
But if I put only the 5th one alone, I get this volume
0,541700962208066
Any idea why ?
Thanks a lot,
Josselin Houenou
|