mne-tools / mne-tools/mne-python

MEP001 - Integrating NiiVue as plotting backend for visualization requiring meshes and volumes

Open
#12,030 9 comments 0 reactions 4 assignees View on GitHub

@wmvanvliet is already working on this.

Since Oct 1, 2023.

ENH
Dominant language
Python
Stars
3.5k
Forks
1.6k
Avg merge
1d 6h
Merged PRs (30d)
100

Description

Describe the new feature or enhancement

Following a discussion with @larsoner, I am proposing this "MNE-Python Enhancement Proposal" for discussion. The implementation of this work would be driven and supported by a 2-year supplement to a current NIH-R01 (#1RF1MH133701-01; PI: Chris Rorden). The submission deadline for the supplement is November 30th.

The parent R01 is on the NiiVue project and its Python wrapper IPyNiiVue. A crude first version of the objectives of the supplement (these may shift as the writing of the proposal progresses) is:

  • Aim 1: Improve MNE-BIDS and EEGNET to support derivatives BIDS datasets of EEG/MEG source data.
  • Aim 2: Integrate NiiVue as a backend for MNE-Python plotting functions.
  • Aim 3: Integrate NiiVue as a Plotly Dash component for easy reuse in Python web dashboards.

Directly relevant to this MEP, is the aim 2. I provide the full list of three aims just because they may end up interacting with aim 2.

Describe your proposed implementation

In short, through this MEP, I would like to propose better integrating the NiiVue visualizer with MNE-Python for EEG/MEG processing by adding it to the supported backend for the plotting functions working with volumes and meshes. I think this viewer will have multiple advantages, the main one for me being its integration with web technologies, freeing MNE plotting functions from dependencies on C++ bindings (e.g., QT) which often causes installation issues.

Describe possible alternatives

NiiVue could be integrated using the already established plotting backend abstraction layer (mne/viz/backends/*.py) and the IPyNiiVue approach. Alternatively, it could also be first wrapped as a plotly component, and plotly support could be more thoroughly integrated. A small demo of Plotly integration was provided a while back https://mne.tools/mne-dash/. I think we pushed this concept much further with the Quality Control Review board we coded for PyLossless. I think these efforts can be synergized to offer much better dashboard capability in MNE-Python.

A measure of success would be the ability to easily plot (i.e., not with 20 lines of codes loading volumes, meshes, co-registering them, and all, but with something like a one-liner) source results in virtualized environments like the Google Colab. This would make teaching, training, and research with MNE-Python significantly easier.

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.