nipy / PySurfer

Cortical neuroimaging visualization in Python
https://pysurfer.github.io/
BSD 3-Clause "New" or "Revised" License
239 stars 98 forks source link

Embed pysurfer brain in PyQt5 #296

Closed EhsanTadayon closed 4 years ago

EhsanTadayon commented 4 years ago

Hi, Is there an easy way to embed pysurfer brain within PyQt dialog? I appreciate any suggestion.

Thank you!

larsoner commented 4 years ago

@EhsanTadayon PySurfer Brain objects take a Figure argument which is a Mayavi figure/scene. So you should be able to follow something like this first to get a figure embedded in the window:

https://docs.enthought.com/mayavi/mayavi/auto/example_qt_embedding.html

In that example the mayavi_widget.visualization.scene.mayavi_scene is what you'd want to pass to Brain as the figure argument (I think).