Skip to content

feat(live-view): toggleable center crosshair - #629

Open
jsschwrz wants to merge 1 commit into
Cephla-Lab:masterfrom
jsschwrz:feat/live-view-crosshair
Open

feat(live-view): toggleable center crosshair#629
jsschwrz wants to merge 1 commit into
Cephla-Lab:masterfrom
jsschwrz:feat/live-view-crosshair

Conversation

@jsschwrz

@jsschwrz jsschwrz commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

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

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant