Repository navigation
CameraBase: ROI buttons with a status LED, and the image size follows the ROI - #14
Merged
Merged
Conversation
…age size updated Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tdiso1u1ZhikSutj2Qs5Cg
Contributor
Author
|
All jobs pass except Generated by Claude Code |
…nd released undoes it Pressed: blue LED while the change is done, green when it is, orange on error (the button is released). Released: grey LED; 'Update' stops following the ROI of the viewer, 'Apply' goes back to the full sensor. The LED states are the Status workflow. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tdiso1u1ZhikSutj2Qs5Cg
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tdiso1u1ZhikSutj2Qs5Cg
…kable button, limits of the LEDs) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tdiso1u1ZhikSutj2Qs5Cg
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tdiso1u1ZhikSutj2Qs5Cg
…rted to pixels The ROI of the viewer is given in the values of its axes. Truncating them to integers before dividing by the pixel size was wrong for calibrated axes (um). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Tdiso1u1ZhikSutj2Qs5Cg
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.
Before: the Update ROI from Viewer and Apply ROI
led_pushofCameraBaseonly reacted to a change of the ROI in the viewer: clicking Update did not take the ROI already drawn, and the Image width / Image height were not recomputed when a ROI was applied. The LEDs only said on / off.After: both are
action_ledparameters (a button and a LED with the PyMoDAQ status colors): grey when not activated, blue while the ROI is applied, green when activated, orange on error (no ROI in the viewer, ROI outside the sensor, the camera refuses it).color_conversionhas a default value ('None'): with OpenCV installed and no default, the conversion looked forcv2.COLOR_None. This made 7 tests oftest_camera_base.pyfail wherecv2is installed (they failed on5.0.xtoo).How:
CameraBaseconnectssigActivatedof the two parameters, which needs PyMoDAQ/PyMoDAQ#1431 (the activation of a button reaches the plugin thread); until it is released the buttons do nothing in the application, and thepymodaqfloor of this package has to be raised to the release that contains it. Tests (test_camera_base.py, activation done withParameter.activate()on the plugin parameter): LED states in each case, the ROI taken from the viewer on click, the image size, the ROI outside the sensor, a camera that refuses the ROI, following the viewer until cleared. 53 passed with PyMoDAQ #1431 from source;test_plugin_package_structurefails locally because the package is not installed. Not tested with a real camera or a GUI click.Generated by Claude Code