-
Notifications
You must be signed in to change notification settings - Fork 74
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
stretch histogram support multi-select #2582
stretch histogram support multi-select #2582
Conversation
4ca3d82
to
8123f0e
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #2582 +/- ##
==========================================
+ Coverage 91.47% 91.48% +0.01%
==========================================
Files 160 160
Lines 19514 19517 +3
==========================================
+ Hits 17851 17856 +5
+ Misses 1663 1661 -2 ☔ View full report in Codecov by Sentry. |
If I change the color of a layer in Imviz while multiple layers are selected and then turn multiselect off, the histogram color is still the previous color. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Only question I had is what is the expected histogram behavior when a layer is selected in multiple viewers if it also has different colors? Currently the histogram just picks one of the colors and that's fine, just making sure that is on our radar.
Let's kick that down the road a bit (🐱), I think the colorbar still provides some helpful information. It would be nice if all aspects (the stretch curve, vmin/vmax, colorbar, etc) would have some way of representing when they're in mixed state. The alternative would be to not show the histogram at all (or at least disable the curve, vmin/vmax, colorbar) if any of them are mixed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to work as advertised. I do think it would be useful to enable the histogram for multiple layers, in case a user wants to compare two different images on the same scale. In that case we could do the auto-scaling based on the min across all images and the max across all images. That can be a future discussion/enhancement though.
Yep, but then we'd need multiple histograms/colorscales and need to figure out what to do with stretch inputs/representation 🤔 |
I meant a single histogram, where the stretch parameters get applied to multiple layers. I guess there's an additional complication of which layer to use for the histogram bars themselves (or maybe combine all data to generate the histogram). Anyway, discussion for elsewhere. |
Description
This pull request generalizes and approves the stretch histogram's support for the new separate multiselect modes introduced in #2574 - the stretch curve and colorbar now works correctly regardless of whether the viewer and/or layer are in multiselect mode, supports multiple viewers selected (in which case vmin/vmax lines are currently shown based on the first entry - we could eventually somehow represent mixed state here somehow, but it isn't clear if that is necessary yet). Note that the entire histogram is hidden if the select layer is a subset OR if multiple layers are chosen.
Change log entry
CHANGES.rst
? If you want to avoid merge conflicts,list the proposed change log here for review and add to
CHANGES.rst
before merge. If no, maintainershould add a
no-changelog-entry-needed
label.Checklist for package maintainer(s)
This checklist is meant to remind the package maintainer(s) who will review this pull request of some common things to look for. This list is not exhaustive.
trivial
label.