Jump to content

ROI change event on image display control


Recommended Posts

QUOTE (shoneill @ Feb 6 2009, 01:15 PM)

The mouse up event works fine for me unless you want to do some work WHILE resizing the ROI.

Shane.

Well, that's also what I did, but it turns out that customer really complain about that because if you release the mouse button when the pointer is not over the image display, there is no event although the ROI has changed.

I also tried to with a mouse up event on the pane instead of the image display control but then again when you release the mouse button with the pointer out of the pane.. no mouse up event, but the ROI yes have changed !

Link to comment

QUOTE (Antoine Châlons @ Feb 6 2009, 07:46 AM)

Well, that's also what I did, but it turns out that customer really complain about that because if you release the mouse button when the pointer is not over the image display, there is no event although the ROI has changed.

I also tried to with a mouse up event on the pane instead of the image display control but then again when you release the mouse button with the pointer out of the pane.. no mouse up event, but the ROI yes have changed !

I just realized that my application has the same "bug". It's pretty obvious that it didn't work - because I automatically popup a dialog when the ROI change event occurs - but to a new user this could be confusing.

Bruce

Link to comment

QUOTE (bmoyer @ Feb 6 2009, 01:59 PM)

I just realized that my application has the same "bug". It's pretty obvious that it didn't work - because I automatically popup a dialog when the ROI change event occurs - but to a new user this could be confusing.

Bruce

In the same kind of feedback from customers, there is the slide control that will fire a value change event BEFORE you release the mouse button !

Here again the mouse up event will only work if the pointer is still over the slide when you release it , and add to that that if the slide in on "2", move it without releasing, bring it back to "2" and release, the event is fired...

I can't remember exactly how but someone from NI showed me a workaround to that one. For the ROI change, I'm still looking.

Link to comment

QUOTE (shoneill @ Feb 6 2009, 02:23 PM)

What version of LV (or is it Vision?) has the "ROI Change Event"? I'm using 8.2 at the moment and I don't seem to be able to find it.....

Sounds like a neat idea, but if it doesn't work then..... :headbang:

Shane.

Well.. This is the "Wish List" forum.. As far as I know there is no "ROI change" event in any version, that's why I'm asking for it !

Link to comment

QUOTE (Antoine Châlons @ Feb 6 2009, 02:27 PM)

Well.. This is the "Wish List" forum.. As far as I know there is no "ROI change" event in any version, that's why I'm asking for it !

Ah Ok. I see where I misinterpreted this.

The "mouse up" event problem when the mouse has left the control is a general problem, not just for this application. I really wish there was an easier way to manage this.

It's a real pain to try to compensate for. Some functionality is basically impossible to implement (forcing a "mouse up" event to fire in LV.

Shane.

Link to comment

QUOTE (Antoine Châlons @ Feb 6 2009, 01:46 PM)

Well, that's also what I did, but it turns out that customer really complain about that because if you release the mouse button when the pointer is not over the image display, there is no event although the ROI has changed.

I also tried to with a mouse up event on the pane instead of the image display control but then again when you release the mouse button with the pointer out of the pane.. no mouse up event, but the ROI yes have changed !

Hi Antoine,

what about using the "Mouse Leave" event? If the mouse button was down as the mouse left the image control, then it is likely the ROI was being modified.

Just my thoughts on your issue...

A+

BaB.

Link to comment

There are generic workarounds for handling continuous events. You can see a couple in this thread (Ton's post followed by mine).

In the CCT, we used a separate loop with a notifier. The event loop sent a notification with each event firing. The processing loop had an explicit wait (which forces the loop to wait) and a wait on the notifier (to get the current data):

LoopRateLimiter.png

The other option is doing the actual work in the timeout event and passing the actual timeout in a shift register.

Link to comment

QUOTE (Bab @ Feb 6 2009, 10:40 PM)

Hi Antoine,

what about using the "Mouse Leave" event? If the mouse button was down as the mouse left the image control, then it is likely the ROI was being modified.

Just my thoughts on your issue...

A+

BaB.

Doesn't the ROI continue to be modified after the mouse has "left the building" so to speak?

This prevents being able to use the "Mouse leave" as an interaction termination.

Shane.

Link to comment

QUOTE (shoneill @ Feb 8 2009, 12:41 PM)

Doesn't the ROI continue to be modified after the mouse has "left the building" so to speak?

This prevents being able to use the "Mouse leave" as an interaction termination.

Shane.

Indeed !

And that's something to think about because the global rectangle (left, top, right, bottom) can have values "outside of the image" I mean.. when the image display control is displaying a 1000*1000 image, you can set a ROI with negative top and left, and right and bottom can be greater than 1000.

That's something to know about to avoid problems.

Link to comment

I ran into the same problem this morning and I investigated the "Get Last Event" Method for the image control. I need to poll repeatedly to get the last event fired (but at 25Hz I don't think I'll have a problem for user clicking too fast!).

I monitor the "Draw Event". The method returns the tool used (rectangle, circle, etc.) and the coordinates.

If you don't use it to actually allow the user to DRAW something, then I think it could work for you.

post-10515-1234281573.png?width=400

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.