Skip to content

feat: throttled live preview during Record + Z-Stack acquisitions#592

Draft
hongquanli wants to merge 4 commits into
feat/record-zstack-acquisitionfrom
feat/record-zstack-live-preview
Draft

feat: throttled live preview during Record + Z-Stack acquisitions#592
hongquanli wants to merge 4 commits into
feat/record-zstack-acquisitionfrom
feat/record-zstack-live-preview

Conversation

@hongquanli

Copy link
Copy Markdown
Contributor

Stacked on #564 (merges after it; rebase onto master if #564 lands squashed).

Shows frames in the live display during Record + Z-Stack acquisitions, which were previously display-blind:

  • Recording phase: throttled tap in StreamingCapture (display_fn + display_fps), first frame always shown, then at RECORD_ZSTACK_DISPLAY_FPS (default 3 fps, _def.py/INI; 0 disables preview for both phases).
  • Z-stack phase: the inherited per-plane signal_new_image callback (previously wired to a no-op) now emits each captured plane.
  • Both paths funnel into QtRecordZStackController.image_to_display, connected to the same display slots as multipointController.image_to_display in every display config (no double-fire — verified against updateNapariConnections's napariLiveWidget skip).
  • No Qt in acquisition code: streaming_capture.py / record_zstack_worker.py / record_zstack_controller.py gain only plain callables/floats; Signal appears only in gui_hcs.py. Headless path unchanged (defaults None/0).
  • Preview can never harm a recording: a failing display callable logs once and disables preview for that capture; emitted count and zarr sealing are untouched (test-pinned).

Testing

  • 7 new tests (3 StreamingCapture throttle/error/off, 2 worker integration incl. pinning the per-plane callback at exactly planes×channels calls, 2 GUI funnel/zero-fps) — 154 tests green across the four affected suites (QT_API=pyqt5).
  • Per-task + whole-branch code review: no Critical/Important findings.
  • Sim-GUI E2E: real acquisition at Current Position, 1.5 s @ 10 fps → 4 preview frames reached the display signal (expected ~4 at 3 fps).

Design: AI-docs/Squid/to-do/2026-07-06-record-zstack-live-preview-design.md

🤖 Generated with Claude Code

hongquanli and others added 4 commits July 12, 2026 01:13
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…orker

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…STACK_DISPLAY_FPS

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ings

Review findings (sub-threshold but real): the _def.py comment said z-stack
planes 'always display' while the next sentence says 0 disables both phases;
and _on_frame's 'route + enqueue only' prose predated the preview tap.

Co-Authored-By: Claude Fable 5 <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