MRG: Prototype of notebook viz (ipyvtk)#8503
MRG: Prototype of notebook viz (ipyvtk)#8503GuillaumeFavelier merged 34 commits intomne-tools:masterfrom
Conversation
|
😍😍😍 |
|
Update after 4d9b63a: I think we could use I started by working directly on |
|
Update after dcaff44: |
|
Lots of Anything else left to do here? @christianhacker is this more like what you want to use? |
I guess one thing from seeing what you've shown so far would be making sure that |
After digging into https://github.com/Kitware/ipyvtk-simple/blob/master/ipyvtk_simple/viewer.py#L163-L171 I can confirm this indeed. JPEG though :)
I don't think so... |
|
Update after ec0d265: |
mne/viz/_brain/mplcanvas.py
Outdated
| self.axes = self.fig.add_subplot(111) | ||
| self.notebook = notebook | ||
| if self.notebook: | ||
| self.fig, self.axes = plt.subplots() |
There was a problem hiding this comment.
if you set the figsize and dpi and such it will even be the right size! Not 100% sure how you get it to show up below the brain plot, probably has to do with when each is instantiated which seems like it could be a pain to manage
There was a problem hiding this comment.
I don't know where to get correct values for dpi. We were using Qt for that before
There was a problem hiding this comment.
I would try just setting it to 100. I don't know if it will matter. If it does we can figure out the right thing to do. One reason you need it is because there figsize is in inches, so you need to know the DPI to get from the pixel width to the figsize.
|
It's beautiful... I'll test it out when I have more time, but this looks very good. Thank you for your hard work. |
|
For shortcuts I'm not sure where to look. I'd see how For toolbar I'd also look at how |
|
Update after c254d79: The matplotlib figure events are now connected correctly. Supported shortcuts:
Not supported (yet):
|
|
please update what's new page and then +1 for MRG when CIs are green |
|
ok to merge for you @larsoner ? |
Co-authored-by: Eric Larson <larson.eric.d@gmail.com>
larsoner
left a comment
There was a problem hiding this comment.
LGTM +1 for merge once CIs are happy
|
🍻 🍾 🎉 !!! @GuillaumeFavelier can you tweet a screenshot movie of this? |
|
Unfortunately, I'm not on Twitter 😅 I can still prepare a video though 👍 |
|
Here is a simple MP4 demo : output.mp4 |
I think you mean fortunately I'm not on twitter :) |
|
that will do it thanks !
… |
* upstream/master: MAINT: Actually use all caches (mne-tools#8702) MRG: Prototype of notebook viz (ipyvtk) (mne-tools#8503) MRG: Use caching in Github Actions and Azure Pipelines (mne-tools#8695)
* Deploy basic version * Update prototype [skip ci] * Update _Renderer [skip ci] * Update picking [skip ci] * Fix disp * Add shortcuts [skip ci] * Update tests * Add ipyvtk_simple * Fix style * Update tests * Refactor shortcuts * Improve tests * Remove cruft * Remove cruft * Reorder figures * Add tool bar * Reorder figures * Fix visibility * Improve coverage * Fix ratio and layout * Update changes * Do not import pyplot * Update mne/viz/_brain/_brain.py Co-authored-by: Eric Larson <larson.eric.d@gmail.com> * Use _add_action * Use icon + tooltip * Fix qt func * Reorder actions * Switch to icon + description Co-authored-by: Eric Larson <larson.eric.d@gmail.com>




This PR updates the current
notebook3d backend to useipyvtk. It allows native support for widgets, 3d render view and intuitive camera interactions. It could also support google colab and jupyter lab? More test is needed.It's still a work in progress:
code