-
Notifications
You must be signed in to change notification settings - Fork 3
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
Extend blitting to speed up atlas label editing and image pan/zoom #335
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add a data class with fields for key images used during registration to allow iterating over them and to identify the interpolation required for certain image types.
…image to level Require either an image path or prefix to specify the output file location.
Add `kwargs` argument to pass additional arguments from mixin figure save wrapper to the underlying module function.
Move many statements that are output during app startup. Move most statements to debugging and the rest to warning output.
We introduced the motion filter setting to reduce label display updates, which could overwhelm web backends. This filtering had the side-effect of making pan and zoom controls less responsive, however. Change the threshold setting to apply only to these label updates, whereas pan and zoom use a threshold of 0 to filter out only movements within the same pixel. The web backend does not appear to be overwhelmed with these events, perhaps because they use full idle redraws instead of blitting.
Use `np.inf` as motion threshold flag to ignore motion events for region label updates and respond to left-click instead. Any provided coordinate update function will take precedence for clicks.
Applying blitting for mouse motion caused a regression where label editing did not update the canvas. Fix by extending blitting to label editing. - Add the circle paint indicator and labels axes image to the blitter as animated artists - Continue to update motion events by the blitter rather than redraws if the blitter is present
Allow pan/zoom threshold to be titrated similarly to label motion.
Enable blitting for the axes images displayed in the Plot Editor, which improves performance of panning and zooming.
Employing blitting for axes image display improves display speed, but adding too many images slows down the entire blitting system. To reduce the number of artists managed by the blitter, dynamically add and remove images during the necessary action. - Add the atlas labels image to the blitter during edit mode, removing the image once the mode is turned off - Change the edit mode attribute to a property to manage the artist in a setter - Add all axes images to the blitter at the start of navigation events and remove them afterward
Add a library function to flatten a list with arbitrary levels of nesting, including irregular nesting.
Refactor to use library function.
yoda-vid
force-pushed
the
reg_img_dataclass
branch
from
December 12, 2022 09:27
5d3bbb2
to
97b92ee
Compare
Add a parameter to specify the index of the artist added to the blitter so that artists can be positioned behind other blitted artists instead of always being added above existing artists.
yoda-vid
changed the title
Extend blitting to speed up atlas label editing
Extend blitting to speed up atlas label editing and image pan/zoom
Dec 14, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR #317 applied blitting to improve performance of displaying region labels so that hovering over labels is more responsive. This update broke atlas label editing, however, as the plot does not update. This PR fixes this label editing while also extending blitting to the paint controls and pan/zoom controls to improve their interactivity.
One side-effect is that the edited colors appear somewhat muted when first drawn but subsequently brighten to full intensity when initiating another edit or figure redraw.
This RP also bundles a few other changes:
register.RegImgs
data class to manage related images during image registration tasks