binder-project / binder

reproducible executable environments
http://mybinder.readthedocs.io
443 stars 38 forks source link

3d interactive viz of brains in Binder #64

Open choldgraf opened 8 years ago

choldgraf commented 8 years ago

I've been working lately with the devs at plotly to optimize their trisurf function in order to make it possible to do interactive 3d plotting in python. Plotly uses WebGL as a backend, so it's generally much smoother and more stable than Mayavi, with the +1 of being able to render in a browser.

With some recent changes to their codebase, I got the plotting time for an fsaverage hemisphere down to about 10 seconds, which isn't too bad. I put together a little proof-of-concept package to do this kind of plotting here:

https://github.com/choldgraf/ecogtools/blob/master/examples/3d_plots.ipynb

I was going to turn that demo into a binder so people could live-demo this, but I'm worried about overloading the memory in the binder instance (I think there might be a memory leak in the plotly JS code somewhere). It basically sends all the contents of a trisurf plot over to javascript, so this can slow things down if there are too many files.

So, I was wondering what kinds of memory / CPU / GPU limitations there are in binder, and if it'd be appropriate to do this kind of thing. Alternatively it'd be awesome if somebody could just demo plotting a brain using the same trisurf code in the example, and tell me if that's too heavy to host on a binder.

(also, any suggestions for optimizing things would be welcome. I've been wanting to plot 3d brains in python for a long time :) )