03-28-2021 09:44 AM
Hello.
I would like to allow the user to correct a polygon ROI drawn on an image viewer while still drawing the ROI. More specifically, the user should be able to make a right click to remove the last drawn point from the polygon ROI and add additional points with further left clicks until he finishes the ROI with a double click.
 
Currently I don't see any way to access the ROI while the user is still drawing it. Only after the ROI is finished with a double click I can access it via the ROI property of the image viewer.
Does anyone know of a solution to this problem?
03-29-2021 03:38 AM
I was going to suggest to add an option for the user to remove a point by customizing the shortcut menu. It seems however this would remove some functionality of that menu: https://forums.ni.com/t5/Machine-Vision/Image-Run-Time-Shortcut-Menu/m-p/3335129#M48232
03-29-2021 03:43 PM
I do not see how your suggestion would solve the problem that the ROI data is not accessible while the ROI is still drawn. So how can I modify the polygon ROI and remove, for example, the last point before the user ends the drawing operation with a double click.
03-30-2021 08:15 AM - edited 03-30-2021 08:15 AM
@mprantl wrote:
I do not see how your suggestion would solve the problem that the ROI data is not accessible while the ROI is still drawn. So how can I modify the polygon ROI and remove, for example, the last point before the user ends the drawing operation with a double click.
It doesn't. As you said the ROI is only accessible until after the double click and I don't see NI changing this behavior.
I was suggesting you could let the user remove a point after creating the polygon. It seems it's either that or starting over.
03-30-2021 10:12 AM
Ok. I misunderstood your first answer. I was just hoping that maybe one can access the ROI under construction in a DLL call but I couldn't find anything.