Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Lock ROI tools to Vision Image Container?

Hi -

 

I have a VI front panel with multiple panes.  In one of the panes is the Vision image container with the ROI tools palette.  When I pull on the loewr right-hand corner of the pane with the image container to enlarge the image (scale object to pane option is checked), sometimes the tools palette also moves vertically downward from its default position at the upper left-hand corner of the container.  Is there a way to lock the tools palette so that is does not move?  Does this have anything to do with the property "autosize tools palette?"

 

Thanks,

 

Don

0 Kudos
Message 1 of 11
(4,898 Views)

Don,

 

What version of LabVIEW and Vision Development Module are you using?  Would you be able to post your code?

 

 

 

Regards,

Isaac S.

Regards,
Isaac S.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 11
(4,886 Views)

Version is 2011 (64-bit).  The code overall is complicated.  I would have to make a simplified version.  But I think it would be easy for you to duplicate something similar with the attached screenshot which shows where I have the panes. The bigger image is where I mostly see the tools move up and down when I resize the front panel by pulling on the lower right hand corner.  The thing is is that it does not always happen.  So have not figured it out.

 

screen.PNG

0 Kudos
Message 3 of 11
(4,883 Views)

If the issue is occurring when you resize the front panel window, then you may need to scale the front panel objects with the window size.  You can find this under File>>VI Properties select Window Size category.  There should be an option that allows you to scale front panel objects.  This solution is discussed in the following knowledge base article:

 

 

How Do I Scale All of the Objects of My Front Panel with the Window Size?:  http://digital.ni.com/public.nsf/allkb/048C31D73E8EC91286256E440063E1BB?OpenDocument

 

 

Regards,

Isaac S.

Regards,
Isaac S.
Applications Engineer
National Instruments
0 Kudos
Message 4 of 11
(4,876 Views)
The image does scale with the pane (that was one of the points of creating the front panel with panes - leaving other controls and indicators in their own pane(s) and thus unaffected by pulling on lower right corner of FP in order to resize the image.
0 Kudos
Message 5 of 11
(4,874 Views)

I have not been able to reproduce this behavior in LabVIEW 2012 so if it is a bug it may have been fixed already.  I wrote a simple set up with 4 panes and an image display scaled to its pane.   How often is the shifted tool bar ocurring?  I will try this out on 64 bit machine with 2011 and see it is specific to 2011 or maybe the 64 bit version.

 

 

Regards,

Isaac S

Regards,
Isaac S.
Applications Engineer
National Instruments
0 Kudos
Message 6 of 11
(4,863 Views)
Yes. It is frustratingly intermittent.

Also, we have seen it in the built .exe. Can you build an .exe and try?

I appreciate your time. It is a very annoying problem.
0 Kudos
Message 7 of 11
(4,861 Views)

I was able to reproduce the error in both LabVIEW 2011 and 2012.  It seems it only occurs when the ROI Tools Palette is moved from its default position on top of the image display.  Similar behavior can sometimes be exhibited by the image information box as well, however if positioned as shown in your screen shot only the tools box  shifts down.  This seems like a bug fix that I will need to be filed for later versions.  As of now the one of the only workarounds is to leave the tools palette and information box in their default locations as they seem to lock fine there.  Another option is to right click on the image display and under Visible Items>>ROI Tools set the palette visibility to hidden, use WindTools Palette.  This causes the ROI tools to disappear and you would need to use the IMAQ WindTools function palette on the block diagram to programatically manipulate the tools visibility and location using VIs such as IMAQ WindToolsShow and WindToolsMove.  This function palette will open up the tools window not the tools bar on the side of the display.  It is a less eloquent workaround.

Regards,
Isaac S.
Applications Engineer
National Instruments
0 Kudos
Message 8 of 11
(4,854 Views)
How do I get the tools back to default location?
Should I just replace with another image container?

I was going to mention that we have also seen this with the information bar also.

Your second workaround is definitely NOT an option for me.

Thanks,

Don
0 Kudos
Message 9 of 11
(4,850 Views)

Yes replacing the image display restores the default position.  It seems once the palette and information box are "unlocked" the bug occurs and simply placing them back to their original positions still leaves them open for the bug to occur.

Regards,
Isaac S.
Applications Engineer
National Instruments
Message 10 of 11
(4,840 Views)