Does anyone have code available for reading the vox2ras-tkr transform from
.mgz files? I am working on implementing the transform outlined on the
Freesurfer wiki:

MNI305RAS = TalXFM*Norig*inv(Torig)*[tkrR tkrA tkrS 1]'

TalXFM: subject/orig/transforms/talairach.xfm
Norig: mri_info --vox2ras orig.mgz
Torig: mri_info --vox2ras-tkr orig.mgz

I can get vox2ras-tkr (a.k.a., Torig) using mri_info, but it would be
better if they were available in the python package nibabel for use in
mne-python (for easy conversion from surface to MNI coordinates). nibabel
already supports reading the --vox2ras transform, but I need to code the
other one in order to avoid a dependecy in our code. Does anyone have code
to extract that information? MATLAB, Python, C code, or heck, even
pseudocode would help. If not, if anyone has helpful information on the
specs on the .mgz specification, maybe it won't be too difficult to code
from scratch...

Eric
_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
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.

Reply via email to