Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Zoom to fit image in Select Annulus ROI (modal window settings)

I am using the IMAQ Select Annulus ROI VI. I would like the image that is wired to the VI to be displayed in a "Zoom to Fit" format in the modal window that comes up to allow the user to select the annulus. Currently it comes up zoomed in at a very large size (likely full size) and has to be zoomed out manually each time in order to select the correct annulus. I have dug into a couple layers of the IMAQ select annulus VI to the IMAQ Construct ROI but can't see a good place to plug in the Image Control property node "Zoom to Fit Mode" to get the image to display correctly. In fact, I'm not able to see how the front panel of the modal window is constructed at all and am not sure how the Call Library Function Node works on the block diagram.

 

Is there any way I can get this image to fit to the modal window so the user can save some mouse clicks?

 

0 Kudos
Message 1 of 11
(5,524 Views)

Looking at the same VI you're looking at, the Image In gets wired directly to the Image Out.  The CLFN is something I wouldn't suggest messing with.  You'd permanently change the IMAQ VI by doing so. 

 

I'm not seeing an easy way to make that popup with a window already set as Zoom to Fit. 

0 Kudos
Message 2 of 11
(5,502 Views)

Good to know about the CLFN, I'll stay away from that. How about modifying the Image out from that function? if I scaled it down as the output before it goes back to the Select Annulus ROI, would that help, or is the modal windown created and closed within the CLFN, so modifying the output wouldn't make a difference to the user?

 

 

0 Kudos
Message 3 of 11
(5,497 Views)
could you explain more
As i know you can use property node for normal image display
and you can use zoom vi for image windows
so what is problem here ?
0 Kudos
Message 4 of 11
(5,482 Views)

The issue is that the IMAQ Construct VI does not allow you to use any zoom vis or property nodes to adjust how the image comes up in the modal window. The modal window that displays the image is constructed from a CLFN. See the attached image for the block diagram of the IMAQ Construct VI. 

 

Do you know any way to get around this?

0 Kudos
Message 5 of 11
(5,397 Views)

There isn't a way to modify that specifically to do what you want.  If you don't need to retain the larger image, you can run some calculations prior to sending it to that VI to change the image and shrink it down to a size that would fit on the screen.  But, that means you'd not be able to increase it easily afterwards and you'd continue forward with the smaller picture.

0 Kudos
Message 6 of 11
(5,366 Views)

@aroberts wrote:

I am using the IMAQ Select Annulus ROI VI. I would like the image that is wired to the VI to be displayed in a "Zoom to Fit" format in the modal window that comes up to allow the user to select the annulus. Currently it comes up zoomed in at a very large size (likely full size) and has to be zoomed out manually each time in order to select the correct annulus.

...

Is there any way I can get this image to fit to the modal window so the user can save some mouse clicks?

 


If I understood your goal correctly, then you need snippet like this:

 

ConstrainAnnulus.png

The given example will open window 740x580 and fit 4096x4096 image to this window.

 

VI (LV2010) is attached, feel free to use and modify if needed.

 

Hope it helps,

 

Andrey.

0 Kudos
Message 7 of 11
(5,334 Views)

I filed Corrective Action Request #583442 so we can address this usability issue in a future release.

0 Kudos
Message 8 of 11
(5,322 Views)

Was this CAR implemented?

 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 9 of 11
(3,448 Views)

Hello,

 

I was able to look at the CAR you reference and it is still listed as open. It appears there is a workaround solution posted above though.

 

Best,

Jacob C.
Applications Engineering
National Instruments
0 Kudos
Message 10 of 11
(3,416 Views)