Hi,
> For more general matrices, I think I've seen both of the following in
> various places (I'm not sure which is correct -- they do seem to
> differ for arbitrary matrices... any comments John?):
> vox = sqrt(sum(V.mat(1:3,1:3).^2))
Can I suggest something like
function vox = spm_vox(V)
% return voxel dimensions from spm_vol or transformation matrix
if isstruct(V)
V = V.mat
end
vox = sqrt(sum(V(1:3,1:3).^2));
as a helpful addition to the updates at some point?
Best,
Matthew
|