Closed
Description
As identified in mne-tools/mne-python#3281,
nibabel.freesurfer.io.write_geometry
doesn't seem to write in the correct coordinate system.
Weirdly, this is visible in freeviewer, but not in the python viz
functions we use in mne-python.
To reproduce the error (you have to copy/paste subjects/sample
into subjects/sample_test
since it modifies the files):
import os.path as op
from nibabel.freesurfer.io import read_geometry, write_geometry
# I'm not sure where nibabel example is stored, so I'm using MNE.
from mne.datasets import sample
data_path = sample.data_path()
# The paths to freesurfer reconstructions
subjects_dir = data_path + '/subjects'
subject = 'sample_test'
fname = op.join(subjects_dir, subject, 'bem', 'inner_skull.surf')
coord, faces = read_geometry(fname)
write_geometry(fname, coord, faces)
in freeview
, we now see a misalignment:
Weirdly, it doesn't appear when plotting in in python:
mne.viz.plot_bem
plots as expected:
Metadata
Metadata
Assignees
Labels
No labels