You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to use orig.mgz files to transform surface vertex locations to MNI coordinates, two pieces of information must be extracted from orig.mgz. The first is the vox2ras transformation, accessible via $ mri_info --vox2ras orig.mgz using Freesurfer or in nibabel:
import nibabel as nib
img = nib.load('orig.mgz')
img.get_affine()
# or
img.get_header().get_vox2ras()
However, the second necessary piece of information stored in orig.mgz is the vox2ras-tkr matrix, accessible via $ mri_info --vox2ras-tkr orig.mgz. There is currently no way (that I know of) to get this information in nibabel. It would be great if this info could be added so that Freesurfer command-line dependencies could be removed (e.g., mne-tools/mne-python#524).
In order to use
orig.mgz
files to transform surface vertex locations to MNI coordinates, two pieces of information must be extracted fromorig.mgz
. The first is thevox2ras
transformation, accessible via$ mri_info --vox2ras orig.mgz
using Freesurfer or innibabel
:However, the second necessary piece of information stored in
orig.mgz
is thevox2ras-tkr
matrix, accessible via$ mri_info --vox2ras-tkr orig.mgz
. There is currently no way (that I know of) to get this information innibabel
. It would be great if this info could be added so that Freesurfer command-line dependencies could be removed (e.g., mne-tools/mne-python#524).For reference in the associated transform, see the
MNI305RAS
conversion:http://surfer.nmr.mgh.harvard.edu/fswiki/CoordinateSystems
The text was updated successfully, but these errors were encountered: