feat(live-view): toggleable center crosshair - #629
Open
jsschwrz wants to merge 1 commit into
Open
Conversation
Adds a fixed crosshair at the center of the Live View image, switched on and off by a new button in the image status bar alongside Show Well Selector and Line Profiler. Intended for centering a feature in the FOV, which previously had to be judged by eye against the frame edges. The feature is opt-in per ImageDisplayWindow via enable_crosshair (default False), so only the Live View instances get it and the laser-AF focus camera view is unchanged. Implementation notes: - The two InfiniteLines are created lazily on first toggle and added through the existing _active_view() helper, which already resolves the show_LUT vs non-LUT ViewBox difference used by the line profiler. - movable=False so the lines never intercept clicks meant for the line profiler's click-to-draw or for click-to-move. - ignoreBounds=True keeps them out of auto-range, so toggling the crosshair never changes the current zoom. - display_image runs at frame rate, so repositioning is guarded by a cached frame shape and is a no-op unless the frame size changes. Tests cover the opt-out case, enable gating, lazy creation and toggling, centering on a non-square frame, recentering, the frame-rate guard, and the show_LUT=True configuration the Live View actually uses. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Adds a fixed crosshair at the center of the Live View image, switched on and
off by a new button in the image status bar alongside Show Well Selector and
Line Profiler. Intended for centering a feature in the FOV, which previously
had to be judged by eye against the frame edges.
The feature is opt-in per ImageDisplayWindow via enable_crosshair (default
False), so only the Live View instances get it and the laser-AF focus camera
view is unchanged.
Implementation notes:
the existing _active_view() helper, which already resolves the show_LUT vs
non-LUT ViewBox difference used by the line profiler.
profiler's click-to-draw or for click-to-move.
never changes the current zoom.
frame shape and is a no-op unless the frame size changes.
Tests cover the opt-out case, enable gating, lazy creation and toggling,
centering on a non-square frame, recentering, the frame-rate guard, and the
show_LUT=True configuration the Live View actually uses.
Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com