ENH: New interface for Brain
See original GitHub issue⚠️ Requires pyvista>=0.24 ⚠️
This PR summarizes the ideas to implement in Brain, previously called _TimeViewer (suggested in https://github.com/mne-tools/mne-python/pull/7153#issuecomment-569378110):
Milestone 0.20
- Get it working for VectorSourceEstimates (added in #7060)
- Improve the color cycle of point picking to allow point color re-use (#7516)
- Check that the latest version 0.24 of pyvista is used (added in https://github.com/mne-tools/mne-python/pull/7506)
- Put
time_viewer='auto'andshow_traces='auto'as the default forstc.plot/plot_source_estimates(added in https://github.com/mne-tools/mne-python/pull/7380) - Use the latest version 0.24 of pyvista (added in https://github.com/mne-tools/mne-python/pull/7458)
- Use interpolation
nearestas the default (suggested in https://github.com/mne-tools/mne-python/pull/7247#issuecomment-589447242, added in https://github.com/mne-tools/mne-python/pull/7257, reverted in 95ad0eec8a2e1e9c7c74e25852157e650aea7df0, added in https://github.com/mne-tools/mne-python/pull/7469) - Improve performance of interpolation (added in https://github.com/mne-tools/mne-python/pull/7257, reverted in 95ad0eec8a2e1e9c7c74e25852157e650aea7df0, added in https://github.com/mne-tools/mne-python/pull/7469)
- Display current time with a line in
MplCanvas(suggested in https://github.com/mne-tools/mne-python/pull/7247#issuecomment-582899553, added in https://github.com/mne-tools/mne-python/pull/7423) - Link the time plot of
MplCanvaswith the time slider (suggested in https://github.com/mne-tools/mne-python/pull/7247#issuecomment-582899553, added in https://github.com/mne-tools/mne-python/pull/7423) - Add a way to clear all the added points in
show_traces=Truemode (added in #7386)
Milestone 0.21
- Set PyVista as the default 3d backend (done in https://github.com/mne-tools/mne-python/pull/8220)
- Add reset key that resets camera all views and time to what they were at the beginning / viz init (suggested in https://github.com/mne-tools/mne-python/pull/8082#issuecomment-672948671, done in https://github.com/mne-tools/mne-python/pull/8125)
- Link brains picking infos (suggested in https://github.com/mne-tools/mne-python/issues/7959, done in https://github.com/mne-tools/mne-python/pull/8112)
- Link brains colorbar (suggested in https://github.com/mne-tools/mne-python/pull/7227#issuecomment-577361561, done in https://github.com/mne-tools/mne-python/pull/8126)
- Link brains camera (suggested in https://github.com/mne-tools/mne-python/issues/7959, done in https://github.com/mne-tools/mne-python/pull/7962)
- Remove
_MNE_BRAIN_TRACES_AUTO=falseand build the frontpage after https://github.com/mne-tools/mne-python/pull/7927 and https://github.com/mne-tools/mne-python/pull/7791 (suggested in https://github.com/mne-tools/mne-python/pull/7925#issuecomment-649584156; in progress in #7927) - Scrape traces (done in #7927)
- Get picking infos with
get_picked_points()(suggested in https://github.com/mne-tools/mne-python/issues/7959, done in https://github.com/mne-tools/mne-python/pull/7963) - Add
remove_labels(suggested in https://github.com/mne-tools/mne-python/issues/7959, done in https://github.com/mne-tools/mne-python/pull/7964) - Add support for pinch-to-zoom (suggested in https://github.com/mne-tools/mne-python/issues/7162#issuecomment-604403711; done in https://github.com/pyvista/pyvistaqt/pull/26)
- Fix sizing when TimeViewer is present (added in #7775)
- Add
mne.surfacein thepublic_modules(suggested in https://github.com/mne-tools/mne-python/pull/7289#discussion_r375273059, added in https://github.com/mne-tools/mne-python/pull/7930) - Make the internal matplotlib figure to match
foreground/backgroundcolors with the render view (suggested in https://github.com/mne-tools/mne-python/pull/7843#issuecomment-635384571; done in #7925) - Remove PySurfer from CircleCI (probably after changing
plot_parcellation.pyto just iterate over labels, see #7275, added in https://github.com/mne-tools/mne-python/pull/7659, https://github.com/mne-tools/mne-python/pull/7695, https://github.com/mne-tools/mne-python/pull/7702) - Improve toolbar icon consistency and resolution (suggested in https://github.com/mne-tools/mne-python/pull/7612#issuecomment-614703740, added in https://github.com/mne-tools/mne-python/pull/7698)
- Use button widgets (suggested in https://github.com/mne-tools/mne-python/pull/7153#issuecomment-569346780, merged upstream, proof of concept in https://github.com/mne-tools/mne-python/pull/7200, limitations encountered in https://github.com/mne-tools/mne-python/pull/7200#issuecomment-574273958) or
vtkPlaybackWidgetfor Play/Pause control of the playback, added in https://github.com/mne-tools/mne-python/pull/7589) - Add a way to create a movie/GIF (added in https://github.com/mne-tools/mne-python/pull/7257, reverted in 95ad0eec8a2e1e9c7c74e25852157e650aea7df0, added in https://github.com/mne-tools/mne-python/pull/7574)
- Update
latest.incandplot_visualize_stcto mentionsave_movie()(suggested in https://github.com/mne-tools/mne-python/pull/7257#pullrequestreview-374179244, added in https://github.com/mne-tools/mne-python/pull/7257, reverted in 95ad0eec8a2e1e9c7c74e25852157e650aea7df0, added in in https://github.com/mne-tools/mne-python/pull/7574) - Use a progress bar during movie saving (suggested in https://github.com/mne-tools/mne-python/pull/7257#discussion_r389260208, added in https://github.com/mne-tools/mne-python/pull/7257, reverted in 95ad0eec8a2e1e9c7c74e25852157e650aea7df0, added in https://github.com/mne-tools/mne-python/pull/7612)
- Improve performance by using directly the widget representation instead of widget name or use
pass_widgetoption to widget callback (added in https://github.com/mne-tools/mne-python/pull/7227)
Milestone 0.22
- Fix colorbar representation with
transparent=True, should alpha blend fmin->fmid withbrain_color(added in https://github.com/mne-tools/mne-python/pull/8643) - Fix memory problems (#8399, #8379, #8427, #8575)
- Merge “_TimeViewer” with
_Brain(added in https://github.com/mne-tools/mne-python/pull/8352)
Milestone 0.23
- Get jupyter notebook integration working properly with multi-views and time course plotting/clicking (partially solved by https://github.com/mne-tools/mne-python/pull/7758, added in in https://github.com/mne-tools/mne-python/pull/8503)
- Add brain silhouette (added in https://github.com/mne-tools/mne-python/pull/8771)
- Add better intructions to integrate in
Report(added in https://github.com/mne-tools/mne-python/pull/8730) - Add shorcuts to rotate the camera and shift time (added in https://github.com/mne-tools/mne-python/pull/8792)
- Widget migration from VTK to Qt/Jupyter Widgets (added in https://github.com/mne-tools/mne-python/pull/8862)
- Light/Dark theme switcher (suggested in https://github.com/mne-tools/mne-python/pull/9000#issuecomment-791557878, added in https://github.com/mne-tools/mne-python/pull/9149)
Milestone 1.0
Milestone 1.1
- add a
colorparameter toadd_sensors()to set channels color (suggested in mne.discourse.group) - Interactive sensor-level field patterns browser (suggested in https://github.com/mne-tools/mne-python/issues/8382#event-3892037680, work in progress in https://github.com/mne-tools/mne-python/pull/8803)
- Interface for drawing ROIs using the mouse
- Move the vertexId/MNI from the legend to the status bar (suggested in https://github.com/mne-tools/mne-python/pull/8792#issuecomment-767898353)
- Fix ctrl-C pressing during generation of movies – should abort generation, currently sometimes just stops a given VTK render (caught by vtkRenderWindowInteractor) sometimes stops the screenshot generation at our end but still saves a movie, etc.
- Fix multi-window memory problems (#8241, #8808), macos failures (https://github.com/mne-tools/mne-python/pull/8611#issuecomment-739806982, #8619)
- Change the theme with
QEvent.PaletteChange(suggested in https://github.com/mne-tools/mne-python/issues/9182) - Add support for shadows (suggested in https://github.com/mne-tools/mne-python/issues/7162#issuecomment-813504371)
Done
- Unnecessary updates of Brain (reported in https://github.com/mne-tools/mne-python/issues/8986; fixed in #8246)
- Reduce pyvista viz test time (suggested in https://github.com/mne-tools/mne-python/pull/7726#issuecomment-624046382, https://github.com/mne-tools/mne-python/issues/8242; done in #8246)
- Lower the CPU usage (done in #7517)
- Refresh slider style (done in https://github.com/mne-tools/mne-python/pull/7509)
- Avoid the confusion between the default pyvista cell picking and the in
_TimeViewer(suggested in https://github.com/mne-tools/mne-python/pull/7247#issuecomment-589599734) - Vertex picking -> time course (suggested in #7235, added in #7247)
- Tag a stable version of PyVista to use with
_TimeViewer(added in https://github.com/mne-tools/mne-python/pull/7318)) - Add a legend/help (suggested in https://github.com/mne-tools/mne-python/issues/7268#issuecomment-580158431, added in https://github.com/mne-tools/mne-python/pull/7305)
- Switch from
time_actortotime_slider_titleto allow scaling with the window (added in https://github.com/mne-tools/mne-python/pull/7263) - Use a
contextmanagerfor tests using widgets (suggested in https://github.com/mne-tools/mne-python/pull/7276#issuecomment-581346281, added in #7280) - Improve documentation about
hemi(suggested in https://github.com/mne-tools/mne-python/issues/7250#issuecomment-578122285, added in https://github.com/mne-tools/mne-python/pull/7256) - Allow fmin, fmid, and fmax to take on all data values, and bump the scalar range while interacting with the slider as necessary (suggested in https://github.com/mne-tools/mne-python/pull/7153#issuecomment-571636885, added in https://github.com/mne-tools/mne-python/pull/7188)
- Add a
fscaleslider (suggested in https://github.com/mne-tools/mne-python/pull/7153#issuecomment-569002405, added in 068654f5a4967d9505163f480792cf5ee5022709) - Add support for
smoothing=nearest(suggested in https://github.com/mne-tools/mne-python/pull/7153#issuecomment-569455048, added in https://github.com/mne-tools/mne-python/pull/7191) - Use vertical orientation for the scalarbar (suggested in https://github.com/mne-tools/mne-python/pull/7153#issuecomment-568758879, added in 3bbc6c29f67f70e594b8fbbf8a0be2f0a30fc9bd)
- Use text slider widget (merged upstream, added in https://github.com/mne-tools/mne-python/pull/7186)
- Use PySurfer-like time dilation (suggested in https://github.com/mne-tools/mne-python/pull/7153#issuecomment-569346365, added in https://github.com/mne-tools/mne-python/pull/7200)
- Bring colorbar values auto-scaling (suggested in https://github.com/mne-tools/mne-python/pull/7153#issuecomment-569261106, added in https://github.com/mne-tools/mne-python/pull/7218, fixed in https://github.com/mne-tools/mne-python/pull/7226)
- Add support for
hemi=split(suggested in https://github.com/mne-tools/mne-python/pull/7153#issuecomment-569346365, added in https://github.com/mne-tools/mne-python/pull/7219) - Link brains timeline (suggested in https://github.com/mne-tools/mne-python/pull/7153#issuecomment-569415964, added in https://github.com/mne-tools/mne-python/pull/7227)
Bug
- The window title bar does not follow the theme (reported in https://github.com/mne-tools/mne-python/issues/9182)
- Unexpected behaviour with shortcuts (reported in https://github.com/mne-tools/mne-python/pull/8792#issuecomment-770160715)
- The main window opens in the background in
jupyter qtconsole(reported in https://github.com/mne-tools/mne-python/pull/7305#issuecomment-585748906, https://github.com/mne-tools/mne-python/issues/7162#issuecomment-585889205) - Detect no-opengl to avoid crash (reported in https://github.com/mne-tools/mne-python/issues/9333, fixed in https://github.com/pyvista/pyvista/pull/2250)
- Fix off-by-one in
screenshot(time_viewer=True)(reported in https://github.com/mne-tools/mne-python/issues/9336, https://github.com/mne-tools/mne-python/pull/9351) - Flatmap are not compatible with
hemi=both(reported in https://github.com/mne-tools/mne-python/issues/9306, #9315) - Unify sliders and combo boxes to use period instead of comma (reported in https://github.com/mne-tools/mne-python/pull/9126#issuecomment-801725029, fixed in https://github.com/mne-tools/mne-python/pull/9179)
- Wrong color with
add_label(reported in https://github.com/mne-tools/mne-python/issues/8815#issue-797593479, fixed in https://github.com/mne-tools/mne-python/pull/8820) - There are visual artifacts on overlapping surfaces on the brain (reported in https://github.com/mne-tools/mne-python/issues/7599, fixed in https://github.com/mne-tools/mne-python/pull/8576)
- The camera is reset too often causing the brain to “bounce” (fixed by https://github.com/mne-tools/mne-python/pull/8572)
- The glyphs colormap are not updated interactively (reported in https://github.com/mne-tools/mne-python/pull/7843#issuecomment-635395395; done in #7934)
- The parameter
foregroundis not supported in_Brain(reported in https://github.com/mne-tools/mne-python/issues/7842; done in https://github.com/mne-tools/mne-python/pull/7843) - There is an unnecessary window title decoration bar on macOS (reported in https://github.com/mne-tools/mne-python/issues/7316)
- The
focalpointwhenhemi=bothshould be between the hemispheres (suggested in https://github.com/mne-tools/mne-python/pull/7247#issuecomment-582899553, added in https://github.com/mne-tools/mne-python/pull/7390) - The
titleparameter is not taken into account (reported in https://github.com/mne-tools/mne-python/issues/7162#issuecomment-594536145, fixed in https://github.com/mne-tools/mne-python/pull/7382 and https://github.com/mne-tools/mne-python/pull/7396) - The slider handles when
hemi=bothoverlap (reported in https://github.com/mne-tools/mne-python/pull/7247#issuecomment-588279423, fixed in https://github.com/mne-tools/mne-python/pull/7383) - The
initial_timeis not taken into account (reported in https://github.com/mne-tools/mne-python/issues/7379 added in https://github.com/mne-tools/mne-python/pull/7381) -
dorsalview causes the_Brainobject to disappear (reported in https://github.com/mne-tools/mne-python/pull/7153#issuecomment-568735444, fixed in https://github.com/mne-tools/mne-python/pull/7187) - The colorbar labels are not updated when the range is modified (fixed in a70b992f4a1b1de0a753f7e36bd9656d1ea4f1df)
HARD
- Use slider with multiple handles (suggested in https://github.com/mne-tools/mne-python/pull/7153#issuecomment-571665347 and https://github.com/mne-tools/mne-python/pull/7153#issuecomment-571667909, prototype available on gist)
- Improve help window UX (suggested in https://github.com/mne-tools/mne-python/pull/7305#issuecomment-585814805)
- Put label of the orientation slider above the bar (suggested in https://github.com/mne-tools/mne-python/pull/7153#issuecomment-572004994, prototype available on https://github.com/mne-tools/mne-python/pull/7211)
Progress
From plot_visualize_stc.py:









Issue Analytics
- State:
- Created 4 years ago
- Reactions:9
- Comments:28 (27 by maintainers)
Top Results From Across the Web
Who is Neuralink's brain-computer interface for?
Neuralink is one of multiple companies developing BCI devices. Neuralink's approach has been to create both a new type of electrode—a neural “ ......
Read more >The present and future of neural interfaces - Frontiers
Novel brain-computer interfaces (BCIs) have been proposed to tackle a variety of enhancement and therapeutic challenges, from improving decision-making to ...
Read more >Brain to cloud interface: A new perspective for human ...
Brain to cloud interface : A new perspective for human enhancement ... Learn new skills like play the piano, learn martial arts and...
Read more >7 Leading Brain-Computer Interface Companies and their ...
Their Kernel Flow debuted in 2021 and is the world's first wearable full-head coverage TD-fNIRS system that maintains or improves on the performance...
Read more >Implantable brain machine interfaces: first-in-human studies ...
First-in-human successes have demonstrated the ability to decode highly dexterous motor skills such as handwriting, and speech from human ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found


@GuillaumeFavelier can you update the top comment with what you want to do for 0.24 and then for 1.0 based on your conversations with @agramfort ? Let’s leave this as milestoned for 0.24 until all 0.24 boxes are ticked (or bumped to 1.0) so we don’t forget anything
I’m going to work on getting the PR working, but after that I’ll work on getting multi-pass working according to MultiPass Rendering.