The aim of the
ipysurfer project is to improve interactive, 3-D visualization of brain surfaces using MNE and the Jupyter Notebook. It can be regarded as an alternative to
PySurfer-based human brain visualization, and is built on top of other open source tools such as
During the GSOC period, the initial concept of how cortical surfaces can be visualized in Jupyter Notebook was transformed into the
ipysurfer package. Two related packages,
PySurfer, were used as the guiding lines during the development process. As a result, I have used similar or the same naming conventions for code styling, classes, methods and parameter names. Most of the original features supported by
PySurfer are now implemented in
All code is available in a public GitHub repository.
Below are the major features that this project has created in
ipysurfer or added to
- plotting of cortex meshes in Jupyter Notebook using
ipysurfer.Brainclass should be used for this purpose. A user can plot the left or right hemisphere alone, both hemispheres on the same plot or on separate plots. Check in Binder
- displaying of activity patterns as surface color variations of a mesh, a user should apply
ipysurfer.Brain.add_datamethod for this purpose. Visual controls over color map used for data visualization are provided by the same method. Check in Binder
- plotting activation data as dependency over time with visual controls, for further information look at
ipysurfer.TimeViewerclass. Check in Binder
- creation of a function for plotting
MNEobjects data, instead of raw data, see
ipysurfer.plot_source_estimates. This function can be integrated into
MNE. It is built with classes mentioned above, so a user can display color map controls or time viewer effortlessly. Check in Binder
- creation of a stand-alone package that combines code for the above mentioned features, i. e.
- Examples of the package usage and code documentation were added as well.
ipyvolume is a package for visualizing 3-D data in the Jupyter Notebook.
ipysurfer utilized this package heavily, and several improvements were made to
ipyvolume as a part of this GSOC project.
- addition of alpha blending support to
ipyvolume, see #139, #145.
- code styling improvements and unit testing configuration changes, see #146, #142.
- a partial fix of problems with camera orientation changes in
ipyvolume, see the problem #156 and the corresponding pull request #158.
What’s left to do
Several things that should be tackled after the end of the program:
- integration of
- improvement of animation performance, corresponding issue.
- full solution for the problems with displaying different views in
ipysurfershould be found, see issues #31 and #156.
- improve support for other visualization parameters used in
PySurferpackages, see #14, #28 and #30.
Examples of possible ipysurfer usage can be found via this link. You can also see a presentation below that shows major features. This presentation was generated from
ipysurfer sample notebooks, and can be found here.
Thanks and credits
I would like to thank my mentors Jean-Rémi King, Eric Larson and Chris Holdgraf; Alexandre Gramfort, Maarten Breddels and other MNE-Python, ipyvolume and bqplot developers for helping me during my work on this project.