ENH: add a vtk.js backend for MNE's 3D renderer (JupyterLite split 3/5) - #14144
Draft
natinew77-creator wants to merge 1 commit into
Draft
ENH: add a vtk.js backend for MNE's 3D renderer (JupyterLite split 3/5)#14144natinew77-creator wants to merge 1 commit into
natinew77-creator wants to merge 1 commit into
Conversation
VTK cannot load in WebAssembly, so the JupyterLite notebooks need a renderer that draws with vtk.js. MNE does its geometry in numpy and only hands the result to a renderer, so replacing that last step leaves the transform maths to MNE.
natinew77-creator
force-pushed
the
lite-browser-runtime
branch
from
August 11, 2026 13:25
c20eae7 to
5a823e2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 3 of the split of #13925. Parts 1 and 2 are #14128 and #14135.
Adds a drawing backend for MNE's 3D renderer that uses vtk.js, since VTK itself cannot load in WebAssembly. MNE's 3D functions do their geometry and coordinate-frame work in numpy and only hand the result to a renderer, so replacing that last step leaves the transform maths with MNE. That matters here, because a subtly wrong head or device transform still produces a plausible-looking picture.
Supported: meshes, surfaces, spheres, tubes and glyphs, which covers the static figures the docs render. Not supported: the interactive
Braintime viewer, which needs dock widgets, and scalar colormaps, which pyvista-js 0.15 does not have.It is a plain string constant, so nothing in the build touches it yet. The setup cell that appends it is #14150.