We refer to this operation as "conforming". This page might help https://surfer.nmr.mgh.harvard.edu/fswiki/FsAnat-to-NativeAnat
On 7/4/2021 4:39 PM, Alexander Rockhill wrote:
External Email - Use Caution
Hello,
I am trying to replicate the processing steps that occur between when a T1 is given as input to recon-all and the T1.mgz that is stored in the $SUBJECTS_DIR/$SUBJECT/mri directory for mne-bids and dealing with mne's internal dependency on the surface RAS coordinate frame.
It is my impression that 1) the image is resampled to 256 x 256 x 256 and then 2) the image is reoriented to head-first supine aka LIA aka scanner space. But when I replicate these steps using nibabel, the affine is off by a rotation and translation:
T1.mgz
[[ -1. , -0.00000015, -0.00000003, 132.77600098], [ 0.00000003, 0.00000001, 1. , -94.00223541], [ -0.00000002, -1.00000012, -0.00000001, 149.55487061], [ 0. , 0. , 0. , 1. ]]
orig resampled and translated
[[ -0.99995208, -0.00905184, 0.00373623, 164.44344257], [ 0.00337327, 0.03978604, 0.99920255, -98.49012464], [ 0.00919327, -0.9991672 , 0.03975359, 141.93864847], [ 0. , 0. , 0. , 1. ]]
orig to T1.mgz transform affine
[[ 0.99995203, -0.00337331, -0.00919312, -30.68693093], [ 0.0037362 , 0.99920251, 0.03975359, -1.8476189 ], [ 0.00905186, -0.03978605, 0.99916736, 2.32735433], [ 0. , 0. , 0. , 1. ]]
Since there are off-diagonal entries in the last affine, I assume there is some kind of rotation, and since there are non-zero entries in the last column, I assume there is some kind of translation as well. I am not sure what either of those would be from so any advice or help would be appreciated.
Alex Rockhill PhD Candidate University of Oregon
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer