mne-python: What are some blockers for 3D javascript surfaces?
I know this isn’t an MNE problem, but I’ve been keeping an eye on the javascript threejs bridges out there (in particular pythreejs and ipyvolume) and I think they’re close to having what we’d need for surface plots.
Can we put together a list of features we’d need that are blocking on whether we’d incorporate something like this into MNE (or I suppose pysurfer if that’d make more sense)
Right now ipyvolume supports trisurf functionality…e.g. see this tweet (apologies for obnoxiously self-linking). It’s got a bit of bugginess in the camera perspective but I bet that can get worked out relatively quickly. For any kind of plots where you just need to change the color of the triangles, that should already be good to go. For plots that have other stuff plotted on top of brains, that might be trickier (e.g., contour plots).
So, what else would we need to see for this to be useful for MNE?
Todo:
- get transparent color
- improve computation speed by
downsampling meshpassing upsampling matrix and downsampled data to JavaScript and upsampling there - change the controller to show actual timing
- improve the viewing controls (in mayavi, we can use shift ctrl etc in cmbination with the mouse to better move the camera)
- pass/compute normals for the surface
- remove axes box
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 22 (22 by maintainers)
My 2 cents, there’s enough value-added for something like ipyvolume that we could build some simple viz on top of it 😃
@GuillaumeFavelier is working on (several) solutions for this so I don’t think we need to track it here
do you think it’s possible to have something like:
brain = stc.plot(backend=‘ipyvolume’)
that works similarly to pysurfer when in the notebook?
(in other words, dont downsample the mesh, which will look terrible, stay in high-res space but be smart about passing data)
@larsoner I have some demo code set up here:
http://beta.mybinder.org/v2/gh/choldgraf/mne3d/master
that’s got the surface data + curvature…is there labels in the same folder in MNE?
re: two-way interaction w/o IPython, that will be tricky for sure. This is all using
ipywidgetsunder the hood. Maarten and I were playing around with getting this to work usingchrome-headlessso you could run this as a proper script that would just save PNGs etc, and that seemed promising