07-30-2012 09:57 AM
Using LV2011 with an image control and "selection tool", I programatically create ROIs (Regions of Interest) in the image. The ROIs may need to be adjusted on the image but I don't want them to be able to resize them. Is there a way to disable the user's ability to resize image Regions-of-Interest?
Thanks.
07-31-2012 02:27 AM - edited 07-31-2012 02:28 AM
@SJT wrote:
... The ROIs may need to be adjusted on the image but I don't want them to be able to resize them...
So please tell me what is the difference between adjusting a ROI or resizing it?
Do you want to move the ROIs position, but keep the size? So just change offsets?
Christian
07-31-2012 05:26 AM
Christian - That's right. When the "selector" ROI tool is used for an image, the ROI can be adjusted by resizing or translating. I don't want users to be able to resize but they can translate, if necessary. So in the attached picture, the cross cursor would stay available but the resizing nodes on the ROI would be gone or disabled. Thanks for your help. This problem is not a show-stopper but it would make the program more robust to user errors.
07-31-2012 09:21 AM
So what I would suggest is to create a SubVI which comes up and lets the user interactively select a new ROI. From that ROI you just use the Top and Left values from the Global Rect to specifiy the position of the new ROI with the same form and size as the old one.
Another way I could think of is to use a Mouse Down Event on the Image display to specify the new coordinates of the ROI. You could take the Coords of the Mous Down Event to calculate the new coordinates for the ROI's center.
I'm sorry I don't have examples for that.
Christian
04-22-2020 01:18 AM
I have the same need. Did you figure out any workaround to do this?