Here is a snippet of MATLAB code that may be informative:
>> M = [-1.9945 -0.0499 -0.1399 70.8144
-0.0891 1.9090 0.5896 -63.5382
-0.1188 -0.5942 1.9060 -60.7934
0 0 0 1.0000];
>>
>> sqrt(sum(M(1:3,1:3).^2))
ans =
2.0000 2.0000 2.0000
>> svd(M(1:3,1:3))
ans =
2.0000
2.0000
2.0000
>>
And for figuring out if there is a flip, the following gives the volume of a
voxel:
>> det(M(1:3,1:3))
ans =
-8.0000
Best regards,
-John
On Monday 11 February 2008 06:01, Istvan Akos Morocz wrote:
> dear SPM list,
>
> here a quite silly question: how can one determine the correct voxel
> size in a given MRI volume in SPM5, for example by using spm_vol.m
> (like previously with SPM2). V.mat doesn't lead anymore to the
> desired information., like in the past by computing :
>
> myVox = abs([ V.mat( 1, 1) V.mat( 2, 2) V.mat( 3, 3) ]) ;
>
> for example, i expect to deal with 2x2x2mm, but Y.mat instead gives:
>
> -1.9945 -0.0499 -0.1399 70.8144
> -0.0891 1.9090 0.5896 -63.5382
> -0.1188 -0.5942 1.9060 -60.7934
> 0 0 0 1.0000
>
> that's now after rotation i guess (as no mat files anymore). looked
> through the codes and also in the archives - w/o prevail.
>
>
> thanks in advance, bye,
>
> pisti
>
>
> -----
> www.pistikem.org
> [log in to unmask]
|