Python implementation of mne_morph_labels?

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

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