Running Python, I have an image and some data calculated for different ROIs (regions of interest).
I would like to display that image, and have a tooltip pop up whenever I am over one of those regions of interest.
This is mainly for debugging purposes – so I don’t care that things will be very pretty, or integrate into any other sort of GUI – just that I can easily understand what value I calculated for each part of the image.
Also – I don’t mind which imaging/display library to use for that purpose. I normally work with PIL, or directly with numpy arrays – but other libraries are just as good for me.
Thanks!
If it’s for debugging you can simply get the position of mouse clicks and print the value for the corresponding ROI. I would use OpenCV as it has SetMouseCallback() and you can define ROIs by polygons and then test what polygon gets the click, see this example. If you’ve never used OpenCV before then maybe this is not the best option.