-
Notifications
You must be signed in to change notification settings - Fork 76
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
consider bitmap/contour_visible in logic for top image layer #2818
consider bitmap/contour_visible in logic for top image layer #2818
Conversation
14c39dd
to
4e328c4
Compare
return layer_is_2d(layer) and not layer.meta.get(_wcs_only_label, False) | ||
return layer_is_2d_or_3d(layer) and not layer.meta.get(_wcs_only_label, False) |
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.
Doing a search of the codebase, I don't expect this to have any actual consequences anywhere. For Imviz, there is no ability to load cube data, and for cubeviz whenever we call this we really want to include cubes.
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.
But what about in the future when we want to support "flexible viz" and could possibly have 2D and 3D data both loaded and Imviz also loaded?
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.
we can rename this method if that would help (suggestions welcomed!)... but for now, all uses of it actually mean something that appears like an image on the screen (so either 2d or 3d image data).
4e328c4
to
0810d83
Compare
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.
Great.
layer_is_not_dq(layer.layer) and | ||
(layer.bitmap_visible or layer.contour_visible))] |
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.
Noting here (mostly for myself) that this will conflict with #2817.
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.
LGTM, confirmed it works in both Imviz and Cubeviz.
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
And apply the correct labels and milestones. Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon! Remember to remove the If these instructions are inaccurate, feel free to suggest an improvement. |
…lescope#2818) * consider bitmap/contour_visible in logic for top image layer * consolidate cubeviz/imviz logic
Description
This pull request considers bitmap and contour_visible switches (instead of only the global layer visibility switch from the data menu) in determining the top image layer (used for mouseover). We could also extend this to consider opacity here or in the future.
Screen.Recording.2024-04-19.at.9.27.49.AM.mov
This PR also consolidates some repeated logic between cubeviz and imviz (where the only exception before was allowing for cube data in the cubeviz case which should be able to safely be moved to the more general case).
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.