feat: add ArrayViewer.stats_updated signal for external listeners#266
Open
tlambert03 wants to merge 19 commits intopyapp-kit:mainfrom
Open
feat: add ArrayViewer.stats_updated signal for external listeners#266tlambert03 wants to merge 19 commits intopyapp-kit:mainfrom
tlambert03 wants to merge 19 commits intopyapp-kit:mainfrom
Conversation
…LogTicker for better tick management
…yGFXHistogramCanvas
…d from ArrayViewer
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (78.37%) is below the target coverage (85.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #266 +/- ##
==========================================
- Coverage 85.85% 85.77% -0.09%
==========================================
Files 50 50
Lines 5853 5876 +23
==========================================
+ Hits 5025 5040 +15
- Misses 828 836 +8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or 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
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.
this PR adds a signal that gets emitted with the result of the image stats each time they are calculated. This allows, for example, an external histogram widget, or anything that wants to use image stats without having to recalculate them:
here's a new example showing a custom histogram
Untitled2.mov
our internal histogram widgets now use this internally.
TODO: for a follow-up PR, I noticed while doing this that, once a histogram is shown, even if it is later hidden, we never disconnect it from requesting stats. so there's a performance improvement waiting to happen if we just destroy the histogram widget each time it is hidden