Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wondering if it's possible to make the video window scrollable in python #78

Open
rapid-18 opened this issue Apr 29, 2024 · 1 comment

Comments

@rapid-18
Copy link

It's easy to make it scrollable in C#, but the video window in the provided python samples is not scollable, I wonder if it's possible to make it scrollable, which is more convenient for users and developer.
For Pyqt interface, simply assign the winId of a scrollable widget to the video by IC_SetHWnd doesn's works (the video window is still not scrollable)

@TIS-Stefan
Copy link
Collaborator

Hello

If I am right, you may need to create a new QWidget with scrolling capabilities and the according event handlers. The handlers must set the window positions like this:

 IC_SetHWnd(hGrabber, hWnd);
 IC_SetDefaultWindowPosition( hGrabber, 0);
 // Show the live video in resized to 160x120. 
 IC_SetWindowPosition( hGrabber, 0,0, 160, 120 );

This is a lot mathematics to align this to your window size. I have no sample code for this.
Unfortunately the port based on tisgrabber.dll is outdated. The newer IC 4 port for Python is better. But... I never made a scrollable window with it.
The documentation can be found at https://www.theimagingsource.com/en-us/documentation/ic4python/index.html
Installation is done by python3 -m pip install imagingcontrol4
You need the according GenTL producer: https://www.theimagingsource.com/en-us/support/download/

Stefan

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

No branches or pull requests

2 participants