Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use 0.01 increment for channel sliders #468

Merged

Conversation

will-moore
Copy link
Member

@will-moore will-moore commented Jun 8, 2022

Fixes #467.

To test - see https://merge-ci.openmicroscopy.org/web/figure/file/95252 for example figure and images (user-3)

  • Channel sliders should now have an increment of 0.01 allowing greater control, particularly with floating-point images with small ranges
  • When you type values into the start/end input fields, they are no-longer forced to be Integers:

Screenshot 2022-06-10 at 10 59 33

@dominikl
Copy link
Member

It works. But a downside is that it also applies to int type images.

@will-moore
Copy link
Member Author

Since we don't store pixel-type info for images in figure, I've used the maximum pixel value of the range slider to determine if the slider increments should be small 0.01 or integers. The current threshold is 100. Below this we use 0.01 for slider increment.
I think this mostly behaves OK. It means you can have different behaviour for different channels of an Image, but if one channel is quite dark, that's probably OK.

@dominikl
Copy link
Member

👍 Looks good to me.

@jburel
Copy link
Member

jburel commented Jun 25, 2022

@will-moore is it possible to make the textbox a bit bigger to avoid the truncation?

@will-moore
Copy link
Member Author

@jburel When are you seeing this truncation? I can't reproduce, since we only allow non-integer values in the text boxes if the max intensity is less than 100, and then it's formatted to 2 decimal places, so a max of 4 characters, which looks OK:

Screenshot 2022-07-01 at 13 44 18

@will-moore
Copy link
Member Author

In discussion with @jburel, the truncation he was seeing was in the first screenshot above, before 5f0bf0f added the formatting of those text inputs. So I think this is good to merge?

@will-moore will-moore merged commit 5e4c5f8 into ome:master Aug 8, 2022
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.

Fractional LUT range entries for float pixel values
3 participants