BMCV / galaxy-image-analysis

Galaxy tools for image analysis
MIT License
15 stars 17 forks source link

overlay_images for segmentation masks should output png #75

Closed thawn closed 8 months ago

thawn commented 1 year ago

currently, when I use overlay_images to overlay an image with a segmentation mask, the output is tiff. This means I cannot view the result in the browser without converting it to png first.

since overlays of masks and images are only used for visualization, it would make sense to output png instead of tiff by default

bgruening commented 1 year ago

@thawn do you know about any lightweight JS-only visualization that can display tiff?

thawn commented 1 year ago

I just found geotiffs. Looks promising. haven't tried it myself, though.

kostrykin commented 1 year ago

I think that PNG is the more appropriate format for visualization purposes, since it is more widely supported by presentation media (web browsers, so in case you want to put the image on a web site, you can use it directly, text document editing systems like LaTeX, etc.). In that sense, it also is more appropriate for segmentation overlays.

But having the ability to view Tiffs directly in the web browser (I think where this was pointing to) would still be hugely convenient. How about automatic conversion of Tiffs (to, e.g., PNG) on server-side, would that be too much of an overhead?

bgruening commented 1 year ago

Galaxy has a concept of "data providers" that can convert, and stream data to a visualization. But I guess its not needed if we integrate geotiffs into Galaxy. Which should be doable. See examples:

kostrykin commented 12 months ago

Thanks for the examples.

In Galaxy, PNGs can be viewed directly by clicking the "eye" icon of a history item. As far as I see, the FITS visualizer as well as the 3D PCA visualizer work differently, they must be invoked through the "Visualize" tab of Galaxy (I couldn't deduce how the OpenLayers visualization works). This is a detour, and I'm not sure what the UX paradigm in Galaxy is, but to me it seems more natural to visualize TIFFs more directly, like PNGs, just by clicking the eye icon (also to be more consistent in that regard).

In the case that we agree on this, does that mean that data providers are the road to take, or can this still be accomplished using JS?

bgruening commented 12 months ago

That it is functioning currently only with the visualize button and not via the eye icon does not mean that it needs to stay like that. We have discussed several times that the default visualisation (the one via the eye icon) should be configurable per datasets and it would be possible to invoke e.g. the PDB-3D viewer directly via the eye icon. For ITs we are already doing this.

I think we should work towards this direction, offering fancy Vis via the eye icon and offering options to opt-out and show the boring text visualisations (in the case of PDB).

kostrykin commented 8 months ago

I think discussion is obsolete now that we have https://github.com/galaxyproject/galaxy/pull/17553 and https://github.com/galaxyproject/galaxy/pull/17554.