Add ScaledBrightnessARGBConverter#385
Conversation
This is to enable in BDV a better display control for label images This converter allows for better controling the visibility of ARGB segmentation. The scale value is used to alter the brightness of colors, which is better suited than altering R G and B in bulk. This could be used in the BDV, to finely control the visibility of a segmentation overlay in the shape of an ARGB image.
|
If possible, I would like to avoid the dependency on We could just inline the |
|
I couldn't resist... I think it should be more or less: v := max(r,g,b) and then r' := min(255, r+m) Could you try whether that works? |
This code is adapted from https://www.cs.rit.edu/~ncs/color/t_convert.html with feedback from Claude AI. It improves the previous version by getting rid of the Color dependency and by being thread safe (removing the need for a float[] field).
|
Done! |
|
Could you try what I suggested above: I think this should be exactly the same as via HSB conversion. |
|
I looked at the HSB/RGB math again, and surprise: it comes out exactly to your "simple RGB scaling". However, then we can achieve the same result using the existing This will not slot into the BDV UI as easily, but I think anyway that this is a mis-use of the min/max sliders. (I'll comment more on the BDV PR) |
For context, here's the link, so others reading this don't have to repeat the search I just did 😉: bigdataviewer/bigdataviewer-core#214 |










This is to enable in BDV a better display control for label images
This converter allows for better controling the visibility of ARGB segmentation. The scale value is used to alter the brightness of colors, which is better suited than altering R G and B in bulk.
This could be used in the BDV, to finely control the visibility of a segmentation overlay in the shape of an ARGB image.