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_pages/quatern.html > > 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 > [email protected] > https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer > > > -- Douglas N. Greve, Ph.D. MGH-NMR Center [email protected] Phone Number: 617-724-2358 Fax: 617-726-7422 Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting FileDrop: www.nmr.mgh.harvard.edu/facility/filedrop/index.html _______________________________________________ Freesurfer mailing list [email protected] https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.
