I am writing a plug-in where the user must place an ROI on the image (live image-feed from a camera on the microscope), and once this ROI is placed, the program must perform an action on this ROI.
I have tried the
new WaitForUserDialog("Please place the Rectangle-ROI to begin, then click OK.").show();
But this requires the user to actually press the OK button after placing the ROI. I want to bypass the pressing of the OK button.
How can I write my code, so that the program asks the user to place the ROI (on the image (live images from a camera acquisition) and as soon as the the ROI is placed, triggers the program to continue (without pressing an OK button).
My objective is to help the user avoid loss of time between placing ROI and pressing the OK button. This is because the image will be live and changing, and by the time the user presses OK, perhaps the ROI is no longer at the place of interest.
Thanks in advance! would be great if someone could point me in the right direction.
Sarala