TheImagingSource / IC-Imaging-Control-Samples

Windows Sample in C#, C++, Python, LabVIEW and Java

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Creating overlays for Python NET

lyang8 opened this issue · comments

Based on qt5-imageprocessing.py and Display Image Processing Result in Overlay for C# I figured that overlays might be added to the buffer through the similar function calls,

Overlay = ic.OverlayBitmapAtPath[TIS.Imaging.PathPositions.Display]
Overlay.Enable = True
Overlay.DrawText(Color.Red, 10, 10, "TEST")

and the path to add the overlay,

ic.OverlayBitmapPosition = TIS.Imaging.PathPositions.Display

So far adding these lines to qt5-imageprocessing.py did not give errors, but the overlays are not copied to the display buffer either.
I tried to edit the image with QPainter in DisplayBuffer.Copy(), but that caused the application to crash.

How can I add overlays like coordinate planes described in the .NET User's Guide to the Python NET app?
Thank you in advance for the support.

Dear User!
I am very sorry, but for legal reasons, I must ask you to fill out the contact form at https://www.theimagingsource.com/company/contact/ first. Only then I may process your problem.
Thank you for your understanding.

However, the answer is:
ic.OverlayBitmapPosition = TIS.Imaging.PathPositions.Display can not work, because there is no display path. You must draw on the QPainter somehow.

Best regards
Stefan