IC-Imaging-Control-Samples icon indicating copy to clipboard operation
IC-Imaging-Control-Samples copied to clipboard

Creating overlays for Python NET

Open lyang8 opened this issue 3 years ago • 1 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.

lyang8 avatar Jun 05 '22 06:06 lyang8

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

TIS-Stefan avatar Jun 07 '22 07:06 TIS-Stefan