fury-gl / fury

FURY - Free Unified Rendering in pYthon.
https://fury.gl
Other
245 stars 182 forks source link

Jupyter notebook support #331

Open weningerleon opened 4 years ago

weningerleon commented 4 years ago

I'm currently visualizing diffusion streamlines with fury&dipy, and would like to use it in jupyter notebooks. When running jupyter on a local machine, the visualizations seem to pop up in a separate window, e.g., not in the browser. However, we would like to offer some visualizations of diffusion data in a remote teaching course at our university, meaning the jupyter notebooks would run on a server.

Is there a possibility to visualize fury scenes in jupyter notebooks, or some other tricks when running on remote machines? The only workaround I found so far is to save the scenes as static images on the harddrive, and then load these files. But this is of course quite slow, and not very interactive.

skoudoro commented 4 years ago

Hi @weningerleon,

Thank you for the request.

We are working on it. We should have something for the release v0.8.0 in December. there is an experimental test (python server with a custom client) in the following link: http://fury.grg.sice.indiana.edu/sdf (if the connection close, just hard refresh)

weningerleon commented 4 years ago

Very cool, thanks for the info!

denphi commented 3 years ago

Since fury is based on VTK, an easy option is to use ipyvtk, this maps a vtkRenderWindow as a Jupyter canvas widget and enable user interactions.

Screen Shot 2021-01-14 at 1 53 23 PM
skoudoro commented 3 years ago

Thank you for your feedback @denphi.

Indeed, we have a branch using ipyvtk (which is a nice extension) and I think we will add it to FURY soon. This is a good option.

However, We are not totally satisfied with the interaction, it doesn't work well with our UI element. This is why it is not done yet. We are exploring how to improve that.

denphi commented 3 years ago

FYI @skoudoro, there was a problem with ipyvtk <= 0.1.3, mouse events didn't work as expected on Firefox browsers. I don't know if that is your case, but this problem is fixed on 0.1.4.

skoudoro commented 3 years ago

Good to know, Thank you for this info @denphi! I will look into this update later in the day.

anushka17agarwal commented 3 years ago

Is this issue still open, I wanna contribute to it.