Can be napari embeded to html

Hi,

So far loving it! Do you think I can embed napari in plotly.dash or html()?

2 Likes

Hi @jmbruges, that’s great that you’re enjoying napari. Unfortunately our frontend is written in Qt and leverages openGL. While that means that we’ve got great performance running locally, it means we can’t embed in plotly.dash or html.

Maybe there’s something else we can do to help you do what you want to do?

2 Likes

Thanks, @sofroniewn for the answer.
Well, basically on my research basis I like to keep my results under a Flask environment so I can access from any pc or share it with non-pythonians. It is basically that.

Performance-wise and the possibility to use my imaging system locally with this tool is just amazing, more because right now I work with a multivariate optical system (RGB channels + polarization information, more or less 6 dof) plus angular distribution. So when using apart, it is really smooth to observe the datasets and play with the dimensionality.
I will update you in case I come with some other use, but for the time now I think it does serve to my main purpose to understanding my dataset.

@jmbruges very cool! I have two points to add:

  • if your data is in a flask server, you should be able to “stack it” into a dask array that is like a virtual numpy array that reads data from the flask as it becomes available. See this code for a rather complicated example that you can build from.
  • We’ve discussed allowing complex input that can be converted to phase and intensity and displayed with a circular colormap such as twilight. If this is something that might make sense for your data, we’d love your contribution at https://github.com/napari/napari!

Also, a gif/mov of your use of napari would be super nice! =) We are working on a gallery to showcase uses of napari, but posts on this forum will do for now. =D

Hola @jni. I will try and let you know.

Is there any possibility to export the generated images from the napari gui? I would like also to have the possibility to get it uncompressed so I can use it in my articles (eps, pdf or pgfplot if possible).

I will post a gif/mov from my data soon!
/Javier

I found the command viewer.to_svg that just do what I need. It works great for my purpose!
First time working in ipython. Also, thanks for adding the console!

Maybe this should be added to the documentation. :slight_smile:

Hola Javier! Fantastic! Great that you found it. There is also viewer.screenshot for an image version.

Maybe this should be in the documentation

You’re absolutely right! Honestly our docs need a lot of love. Have you ever contributed code using GitHub? If not, we would be very happy to guide you through a contribution! This is probably the best page to put it in:

There are also development API docs but they are quite cluttered:

https://napari.github.io/dev/napari.components.html#napari.components.viewer_model.ViewerModel

We need to clean that page up, and provide the API docs through napari.org, too. We’re working on it!

1 Like