Closed geneva-miller closed 3 years ago
Changed brush color to red until we get it to match the value being edited.
Segmented masks and user-added edit annotations are now uniformly transparent in edit mode. Brush has also been made transparent by lowering ctx.globalAlpha right before drawing brush view on top of cells/annotations.
For setting the color of the brush, I think we may need to send the colormap in the payload. (I don't think it would necessarily be the linear colormap version of it--just some way to have get the RGB value from colormap[label].) Then, when adjusting the brush value, the color would get set to colormap[new_value]. Even if we could base some of the colors off of what's in the image, I think we'd run into problems when setting the brush value to something not currently in the image.
I probably won't be working on this particular aspect of it, if you want to give this a try.
Re: adjustable transparency, I think I'm going to have that be a variable that can be modified by scrolling. This would only take effect in edit mode and when not drawing raw (so that the contrast of the raw image can still be adjusted while in edit mode). I will probably take a stab at this in the near future.
Changing direction with this. Brush now has transparent white interior and red or white solid outline to indicate status of eraser. Transparency of brush unlikely to change but adjustable opacity of annotations overlaid in edit mode is still a stretch goal (it will likely become its own issue).
Miscellaneous small improvements would give the pixel-editing mode a nicer feel. These include:
[ ] color of brush preview should match color of cell that is being annotated
[x] brush should be somewhat transparent
[x] annotations currently are composited on top of image, making them difficult to see against dim background. Maybe some combination of compositing and adjusting alpha?
[ ] (bonus) it would be awesome if the transparency of brush/annotations could be adjusted by the user. the simplest version of this could be toggling the overlay on/off (this is implemented in desktop caliban) but a nicer version would perhaps include a slider that corresponds to the alpha value when drawing the overlays