Skip to content

Use the ScaledBrightnessARGBConverter to display ARGB image in the BDV#214

Closed
tinevez wants to merge 2 commits into
masterfrom
argb-converter
Closed

Use the ScaledBrightnessARGBConverter to display ARGB image in the BDV#214
tinevez wants to merge 2 commits into
masterfrom
argb-converter

Conversation

@tinevez
Copy link
Copy Markdown
Contributor

@tinevez tinevez commented Nov 29, 2025

With this converter, the control slider of ARGB sources controls the brightness of the display. This is better suited for segmentation overlays in the shape of label images. For instance:

Screenshot 2025-11-29 at 16 58 56 Screenshot 2025-11-29 at 16 59 01 Screenshot 2025-11-29 at 16 59 04

With this converter, the control slider of ARGB sources
controls the brightness of the display. This is better suited
for segmentation overlays in the shape of label images.
@tinevez tinevez changed the title Argb converter Use the ScaledBrightnessARGBConverter to display ARGB image in the BDV Nov 29, 2025
@tinevez tinevez marked this pull request as ready for review November 29, 2025 16:01
@tinevez
Copy link
Copy Markdown
Contributor Author

tinevez commented Nov 29, 2025

This requires the PR argb converter in the imglib2 repo

@tpietzsch
Copy link
Copy Markdown
Member

I see that this is convenient, but it breaks the semantics of the min/max slider:
The slider "min" is not used to offset brightness as for the other converters.
The intensities are scaled by "255/(max-min)" which is exactly the opposite as for the other converters.
This is in particular problematic because these sliders will manipulate multiple sources at the same time (if multiple sources are selected) and would have opposite effects on ARGB sources and other sources.

So I don't think this is how it should be done.

I would rather have a separate way from min/max sliders. Maybe have contrast and brightness (or rather scale and offset) sliders, where contrast would directly control the scaling factor. This can be converted to min/max values (except contrast=0 would mean max=∞, but close enough). So wouldn't need to change much under the hood. Basically just a UI toggle of whether you want the min/max or scale/offset sliders.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants