vanvalenlab / deepcell-label

Cloud-based data annotation tools for biological images
https://label.deepcell.org
Other
73 stars 14 forks source link

More efficient color map handling for cell types #499

Open ykevu opened 1 year ago

ykevu commented 1 year ago

Right now, the color map that is used to determine which cells are colored what based on cell types is completely recalculated after certain events are fired in the cellTypes state machine; however, this can be made more efficient in terms of how much is recalculated and when/how often the recalculations are made.

This is likely why pulling the opacity sliders around can cause some lag; a workaround for this in addition can be to only perform the calculation once the user releases the slider instead of continuously updating it, but that might look a little jank with the canvas.