Skip to content

Add motor-position stacking and stitching pipeline#88

Closed
FIrgolitsch wants to merge 3 commits intomainfrom
pr-4-motor-stacking
Closed

Add motor-position stacking and stitching pipeline#88
FIrgolitsch wants to merge 3 commits intomainfrom
pr-4-motor-stacking

Conversation

@FIrgolitsch
Copy link
Copy Markdown
Contributor

Summary

Provides a fast, registration-free stitching and stacking path that uses motor/stage positions recorded during acquisition as the sole source of tile placement — plus an optional refinement step using image registration.

Key Changes

New linumpy/stitching/motor.py:

  • compute_motor_positions: ideal grid positions from scale/rotation parameters
  • compute_registration_refinements: phase-correlation seam refinement
  • apply_blend_shift_refinement: blend shift corrections
  • compare_motor_vs_registration: diagnostic comparison utility

New linumpy/stitching/stacking.py:

  • find_z_overlap: cross-correlation Z-overlap search
  • compute_z_offsets: per-slice Z-offset calculation
  • stack_slices_with_shifts: full stacking with optional re-homing correction

New scripts:

  • linum_stitch_motor_only.py — fast 2D stitching baseline, no phase correlation
  • linum_stitch_3d_refined.py — motor initialisation + registration refinement
  • linum_stack_motor_only.py — stack slices using only motor positions
  • linum_stack_slices_motor.py — full-featured motor + registration stacking with Z-overlap detection, per-slice normalisation, optional accumulation

New tests: linumpy/tests/test_stitching_motor.py and test_stitching_stacking.py

Dependencies

Depends on PR #85 (thread config module).


Merge order: Merge after PR #85.

Introduces stitching/motor.py (ideal grid positions, seam refinement)
and stitching/stacking.py (Z-overlap detection, cross-slice stacking).
New scripts: linum_stack_motor_only.py, linum_stack_slices_motor.py,
linum_stitch_motor_only.py (fast baseline) and linum_stitch_3d_refined.py
(motor + registration refinement). Includes unit tests for both modules.
@FIrgolitsch
Copy link
Copy Markdown
Contributor Author

Closing in favour of #98 (recreated with squashed commits as part of the PR split plan refresh).

@FIrgolitsch FIrgolitsch closed this Apr 1, 2026
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