function voxsize = GetVoxSize(V)
% This is a little utility to get the vox size in an image
if nargin<1
    V=spm_vol(spm_get(Inf,'*.img','Select files'));
end
if ~isstruct(V)
    error('input must be an spm_vol struct')
end
spm_defaults;
global defaults
voxsize=[];
for i=1:length(V)
    tmp      = spm_imatrix(V(i).mat);
    voxsize  = [voxsize;tmp(7:9)];
end
