

vols = spm_vol(spm_get(Inf,'*.img',...
							  'Please select roi volumes mask images to work on'));

for i = 1:length(vols)
  vol = vols(i);
  sz_vox  = [vol.mat(1,1),vol.mat(2,2),vol.mat(3,3)];
  num_vox = length(find(spm_read_vols(vol)));
  vol_roi = prod(sz_vox)*num_vox / (10^3);    % size of roi in cm^3
  fprintf('%s\t%g cm^3\n',vol.fname,vol_roi);
end

  


