Print

Print


Hi there,:
>
> /Dear all,/
>
> /Considering previous posts on this issue, it seems that the best way 
> to calculate the total intracranial volume is to use the script below 
> (and SPM5 for a more accurate estimation of CSF volume), including a 
> thresholding process of the images (> 0.5, although other values 
> should also be ok). What is still unclear for us is whether input 
> images should be modulated or not. The use of modulated data, as 
> recommended to extract volumetric measures (in mm3), makes sense to 
> calculate the TIV. /
>
> /However, using a >0.5 threshold seems meaningful when considering 
> unmodulated data (ie selecting voxels according to their probability 
> to be GM, WM, or CSF), but less when considering modulated MRI (as far 
> as we understand, this would correspond to sum up only values > 0.5mm3 
>  considering voxels of 1 mm3)? Is there anything wrong with this 
> interpretation? Can anyone confirm that the use of this script (and 
> the >0.5 threshold) on modulated MRI is correct?/
>
> /Thanks a lot/
>
> /Best regards./
>
no threshold and just use modulated images
you can get a function doing that on my website or just copy and past
the code bellow (compare with you own code)

best
cyril

function varargout = Easy_Volume
%
% return the nb of voxels and the volume of segmented modulated 3D volumes
% save that in a .mat file named by the type of img: grey white csf
% thanks to J. Ashburner
% Cyril Pernet June 2006

clear all

% get the volumes
P   = spm_select(Inf,'.img$','Select images');

% make a loop to compute for each volume
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;
   vollitre = vol*voxvol;
   fprintf('%g voxels, %g litres\n', vol, vollitre);
   volume{j}=vollitre;
end;

% save this stuff
% image type
name = questdlg('were the images','image type','grey matter','white matter','CSF','grey matter');
% where to save
save_dir = uigetdir('save directory');
if save_dir == 0
    return
end
cd (save_dir);
% save
save ([name], 'volume');