Exact pixel value in the 2-D hover readout - #68
Merged
Conversation
CSSFrancis
force-pushed
the
feat/pixel-readout
branch
from
September 4, 2026 13:20
37f5014 to
66d5c71
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #68 +/- ##
==========================================
- Coverage 90.90% 90.85% -0.05%
==========================================
Files 40 40
Lines 4550 4603 +53
==========================================
+ Hits 4136 4182 +46
- Misses 414 421 +7 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
The hover readout named the physical and pixel coordinates but not the value, which is usually the number a viewer is after. It now shows `v:<value>` for a colourmapped image and `rgb:r,g,b` for a true-colour one. The value is exact rather than inferred from the transferred byte wherever it can be. Integer data whose range fits inside the 256 quantised codes is inverted locally; anything wider is answered by Python once the cursor has dwelled on a pixel (`probe_exact=True` by default, tunable through `Plot2D.set_value_probe`), and the quantised estimate is the fallback when no kernel can answer — which is what a `save_html` page always shows. Zoomed in past a detail tile the value is read from the tile's native pixels rather than the coarser overview underneath, so the readout always names the source actually on screen. The `v` key toggles the on-image pill. `Plot2D.set_readout_visible` hides it from Python while keeping the readout live, so an embedding host can render position and value in its own chrome instead: every update arrives through `mount()`'s `opts.onReadout` and as an `apl:readout` DOM event. 2-D pointer events also carry `img_x`/`img_y` now.
CSSFrancis
force-pushed
the
feat/pixel-readout
branch
from
September 4, 2026 14:37
66d5c71 to
145e0ee
Compare
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.
Exact Pixel Readout.
The 2-D hover readout named the physical and pixel coordinates but not the value. This is a bit of an involved change but good overall.
Implementation
v:<value>for a colourmapped image,rgb:r,g,bfor a true-color one,alongside the existing coordinates.