LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Andrey_Dmitriev

Vision: Get ROI's Index in Get Last Event

Status: Declined

Any idea that has received less than 3 kudos within 3 years after posting will be automatically declined.

Problem statement

 

At this moment is impossible to get index of the Region Of Interest - which one was selected by user. The only width, heigth and bounding box is returned, but in some cases is impossible to get index of ROI programmatically, because different ROIs may have same bounding box:

 

ROIS-01.png

 

For example, the following code will return exactly the same events for two different ROIs shown above:

 

ROIS-02.png

 

Suggestion

 

Add ROI's index output into Get Last Event Method for Vision Display (and into IMAQ WindLastEvent SubVI for external Display):

 

ROI_Index_Suggestion Copy.png

This index should return index of the selected ROI (from 0 to n-1) or "-1" if no ROI selected (for example, user has clicked outside of ROI)

4 Comments
X.
Trusted Enthusiast
Trusted Enthusiast

Comment: if you have selected the rectangle in your example and you wanted that, great. If not, how would you go about selecting the diamond :-? My point is that you have other problems in this situation than just knowing which ROI has been selected!

If you are not in this (problematic, in my opinion) situation, as you mentioned, there is a simple way to find out which ROI has been selected... 

Moreover, if you are using a draw event, the "selected" ROI is the last, by definition.

Andrey_Dmitriev
Trusted Enthusiast

Hi, X.,

 

In general in this situation no problem to select square or diamond:

See Video

 

The problem is how to determine - which one is selected. In real live such situation (when two ROIs have exactly the same bounding box) is rare. But what I have seen - sometimes bounding box is +/- 1 pixel differ from ROI's bounding box which is selected. So, determination by bounding box not always work as expected. In addition - if we have ROI type Point or Annulus - then its really painful to determine which one is selected. Try this.

 

And you're right - there are some other troubles with ROIs in Vision.

- when ROI is selected, then Draw event is fired. Actually nothing drawn on the image.

- when we need to add multiple ROIs, then Ctrl key should be pressed. If you forgot to press it, then all ROIs disappeared. This can be useful when you working with single ROIs, but if you need to add 20-30 ROIs, then its painful.

- ROI cannot be selected programmatically

- No way to select multiple ROIs (with Shift button, for example)

etc

 

I have develop workarounds for such situations, but "embedded" usability can be much better, sure.

Darren
Proven Zealot
Status changed to: Declined

Any idea that has received less than 3 kudos within 3 years after posting will be automatically declined.

X.
Trusted Enthusiast
Trusted Enthusiast

Too bad it is declined, this is a good idea.

The main problem is that Vision Toolkit users might not be the most frequent users to the forum and even though they might be wishing such a feature, there is little chance they will ever come her and vote for a feature.

Not mentioning that it will have disappeared in oblivion after a couple of days due to the disastrous presentation mode of ideas on this forum.