system
(system)
July 11, 2017, 5:36pm
1
Hi,
Is there a Python implementation of the mne_morph_labels function that
morphs labels from individual subjects' brains onto the average subject's
brain?
Thanks and Best Regards,
Gladia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20170711/eb773dea/attachment.html
system
(system)
July 11, 2017, 5:43pm
2
Yes!!
Some sample code
import mne
import glob
labels_fname = glob.glob(op.join(data_path, 'labels', '*.label'))
labels = [mne.read_label(label, subject='fsaverageSK', color='r')
for label in labels_fname]
for index, label in enumerate(labels):
label.values.fill(1.0)
labels[index] = label
labels = [label.morph('fsaverageSK', subject, subjects_dir=subjects_dir)
for label in labels]
HTH