Hi,
I found out something that I do not understand when I was trying to create rotation matrix from scratch. I have used two methods and hope they will give me the same results.
1st method---form matrix from cross product as described in http://nifti.nimh.nih.gov/nifti-1/documentation/nifti1fields/nifti1fields_pa...
for example:
-0.9994 0 0.0343 0.0153 -0.8953 0.4451 0.0307 0.4454 0.8948
I use formed rotation matrix * D (voxel size) --- I got exactly same affine matrix (1:3) as the one in nifti header.
However, I tried another method since I would like to use normal vector if there is no row and col vector directly available in DICOM header.
2nd method --- form matrix from vox2ras_rsolveAA.m
I got the matrix has the wrong signs although the numbers are exactly same. It cannot be simply apply some (making sensed) unity matrix for the correction (I have already correct normal vector for the sake of the requirement in 1st method ---- reverse the sign for the first 2 row in normal vector, if I do not correct it, the matrix is still not same).
For example:
0.9994 -0.0000 0.0343 -0.0153 -0.8953 0.4451 -0.0307 0.4454 0.8948
I was wondering if you would know the reason for it.
Thanks,
Jun
Probably the AA matlab file is using dicom coordinates which are LPS whereas my software uses RAS.
On Thu, 15 Jul 2010, Xu, Jun wrote:
Hi,
I found out something that I do not understand when I was trying to create rotation matrix from scratch. I have used two methods and hope they will give me the same results.
1st method---form matrix from cross product as described in http://nifti.nimh.nih.gov/nifti-1/documentation/nifti1fields/nifti1fields_pa...
for example:
-0.9994 0 0.0343 0.0153 -0.8953 0.4451 0.0307 0.4454 0.8948
I use formed rotation matrix * D (voxel size) --- I got exactly same affine matrix (1:3) as the one in nifti header.
However, I tried another method since I would like to use normal vector if there is no row and col vector directly available in DICOM header.
2nd method --- form matrix from vox2ras_rsolveAA.m
I got the matrix has the wrong signs although the numbers are exactly same. It cannot be simply apply some (making sensed) unity matrix for the correction (I have already correct normal vector for the sake of the requirement in 1st method ---- reverse the sign for the first 2 row in normal vector, if I do not correct it, the matrix is still not same).
For example:
0.9994 -0.0000 0.0343 -0.0153 -0.8953 0.4451 -0.0307 0.4454 0.8948
I was wondering if you would know the reason for it.
Thanks,
Jun
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
freesurfer@nmr.mgh.harvard.edu