Skip to content

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
mne-tools:mainfrom
natinew77-creator:lite-browser-runtime
Draft

ENH: add a vtk.js backend for MNE's 3D renderer (JupyterLite split 3/5)#14144
natinew77-creator wants to merge 1 commit into
mne-tools:mainfrom
natinew77-creator:lite-browser-runtime

Conversation

@natinew77-creator

@natinew77-creator natinew77-creator commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

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 Brain time 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.

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 natinew77-creator changed the title ENH: add the JupyterLite browser runtime (JupyterLite split 3/4) ENH: add a vtk.js backend for MNE's 3D renderer (JupyterLite split 3/5) Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant