Skip to content

fix: Use cropped image dimensions for NDViewer configuration#498

Merged
Alpaca233 merged 2 commits into
Cephla-Lab:masterfrom
Alpaca233:fix/ndviewer-crop-dimensions
Feb 27, 2026
Merged

fix: Use cropped image dimensions for NDViewer configuration#498
Alpaca233 merged 2 commits into
Cephla-Lab:masterfrom
Alpaca233:fix/ndviewer-crop-dimensions

Conversation

@Alpaca233
Copy link
Copy Markdown
Collaborator

@Alpaca233 Alpaca233 commented Feb 27, 2026

Summary

  • Fix NDViewer dimension mismatch when software crop is configured
  • Uses get_crop_size() instead of get_resolution() to get actual image dimensions after cropping

Problem

NDViewer was being configured with camera resolution from get_resolution(), but actual images are cropped via get_crop_size() in _process_raw_frame(). This caused the viewer to expect larger images than what was actually saved, resulting in display issues.

Test plan

  • Run acquisition with software crop configured
  • Verify NDViewer displays images correctly with matching dimensions

🤖 Generated with Claude Code

NDViewer was being configured with camera resolution from get_resolution(),
but actual images are cropped via get_crop_size() in _process_raw_frame().
This caused a dimension mismatch where the viewer expected larger images
than what was actually saved.

Now uses get_crop_size() to get the actual image dimensions after software
cropping, falling back to get_resolution() only if no crop is configured.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Alpaca233 Alpaca233 force-pushed the fix/ndviewer-crop-dimensions branch from 84ea598 to 214a52b Compare February 27, 2026 19:24
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Alpaca233 Alpaca233 merged commit 623c201 into Cephla-Lab:master Feb 27, 2026
1 of 2 checks passed
@Alpaca233 Alpaca233 deleted the fix/ndviewer-crop-dimensions branch February 27, 2026 19:31
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