Add Daheng camera class and tests#1127
Merged
AdvancedImagingUTSW merged 9 commits intoOct 7, 2025
Merged
Conversation
Collaborator
|
@juhelh - Sorry for the delay. This is one of the first times that someone has integrated such a core device, and I think we were figuring out how best to proceed given that we do not have the device internally. Is it working for you? We may have a few things to ask that you add before merging... Thanks, |
annie-xd-wang
previously approved these changes
Oct 7, 2025
Updated documentation to include setup and configuration instructions for the Daheng MER2-1220-32U3C camera, including warnings and SDK installation notes. Added the camera to the configuration database for device type recognition.
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.
Summary
New
DahengCameraclass indaheng.pyImplements a camera interface class using the SDK
gxipy. It's designed to follow Navigate's architecture.Unit test file
test_daheng.pyIncludes tests for class behavior. Mocks the critical SDK interfaces such as
DeviceManager,FeatureControl, andDataStream.Exception and logging policy followed
Uses
UserVisibleExceptionfor GUI error messages, andlogging.warning()for non-fatal issues.Handles unsupported features with stubs
Some methods such as
get_readout_time,get_line_interval, andset_light_sheet_exposure_timeare included as stubs. This is simply because the MER2-1220-32U3C model does not have the functionality needed, but we don't want anything to break if camera.get_line_interval() e.g. is called somewhere else in the code.gxipy SDK Installation
The Daheng SDK (
gxipy) is not available on PyPI. To use this camera class:gxipyfolder inside the SDK (typically underDevelopment/Samples/Python/)pip install /path/to/gxipy.An
ImportErrormessage has been added to the top of the file to guide users who try to use the class without having installed the SDK.Maybe it would also be useful to add a note in the README about this manual installation step for new users?