scalableminds / webknossos

Visualize, share and annotate your large 3D images online
https://webknossos.org
GNU Affero General Public License v3.0
126 stars 23 forks source link

Thumbnail generation for segmentation #3489

Closed philippotto closed 5 years ago

philippotto commented 5 years ago

It would be super cool, if hovering over a dataset with segmentation in the gallery view would switch the image to the colorful thumbnail.

I'd hope the effort for this is not very high. Maybe something for @youri-k or @rschwanhold, if @fm3 agrees regarding implementation effort?

fm3 commented 5 years ago

Right now when you select the segmentation layer in the datastore’s thumbnail api, the image will be grayscale, because of some byte conversions in ImageCreator.scala. That would have to be adapted. Also, jpeg will not be the right format, if we want to alpha-blend the segmentation over the color-layer thumbnails. Related issue: https://github.com/scalableminds/webknossos/issues/3491 Also, for alpha-blending, the zoom value should be identical to the color-layer thumbnail.

So this is definitely not a one-liner, but that doesn’t mean it can’t or shouldn’t be attempted :) Feel free to self-assign, @youri-k @rschwanhold

philippotto commented 5 years ago

Also, jpeg will not be the right format, if we want to alpha-blend the segmentation over the color-layer thumbnails.

Couldn't the front-end blend the two jpegs via css opacity?

philippotto commented 5 years ago

Feel free to unassign.

fm3 commented 5 years ago

Couldn't the front-end blend the two jpegs via css opacity?

It could, but the segmentation layers use zeroes to encode “no cell here, render fully transparent”. In jpeg, this would become black.