Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

using IMAQ ConstructROI in IMAQ Vision

When I using IMAQ ConstructROI.vi,there will be two bottons,'OK'&'CANCEL',in the following image.How can I delete these two bottons?
0 Kudos
Message 1 of 2
(3,714 Views)
The IMAQ ConstructROI VI is a high level function that allows you to easily obtain a region of interest from the user - as such you will not be able to remove the OK/Cancel buttons as they are "hard-coded" into the VI.

An alternative method would be to replicate the process found in this VI in your application as this would allow you to simply display the image window and from that extract the ROI once the user has drawn on the window. The process would be as follows:

1. Display image
2. Select ROI tool (either show tools palette or force user to use a particular tool e.g. rectangle using IMAQ WindToolsSelect
3. Wait for the user to draw on the image - there is a function that will wait until a user event (such as draw) is generated - IMAQ WindLastEvent

4. Get ROI from image window using IMAQ WindGetROI
5. Use the ROI as part of your image processing algorithm.

The IMAQ Vision Reference manual has more detailed help regarding the use of these VIs - some of the "older" examples i.e. prior to IMAQ Vision 6.0 show this approach being used. Some of these examples may still exist so I would suggest browsing through the examples for some sample code.

Jeremy
Message 2 of 2
(3,714 Views)