example code about overlaying .w file on the inflated brain surface.

Hi MNEers,

I can overlay a .w file on the inflated brain surface in classical MNE-analyze GUI.
Now I try to use mne-python.

Anyone have a quick code about how to load a .w file and overlaying it on the inflated brain surface?
The expected results should look like this,

If you can not see above pic, please open the attachment to have a look.
Thanks in advance.

Best,
Junpeng
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20130321/04f11898/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 121695 bytes
Desc: not available
Url : http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20130321/04f11898/attachment.jpe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: brain_surface.jpg
Type: application/octet-stream
Size: 121695 bytes
Desc: not available
Url : http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20130321/04f11898/attachment.obj

I used mri_surf2surf(freesurfer) to convert w file to mgz file, mgz worked
with mne-python

I used mri_surf2surf(freesurfer) to convert w file to mgz file, mgz worked
  with mne-python

As far as I know, MNE-Python cannot read .mgz surface files. To show a
.w file on an inflated surface you can do (assuming you have
activity-lh.w and activity-rh.w):

stc = mne.read_source_estimate('activity')
stc.plot(subject=subject, subjects_dir=subjects_dir, hemi='lh')

The first call will read both .w files and the second will show the
activity on the left hemisphere. Note you need MNE-Python 0.6 or newer
for this.

I hope this helps,

Martin

atleast brain.add_contour_overlay support mgz which I used.