|Download Help (Windows Only)|
You can display images in LabVIEW using two methods. You can display an image in an external window using the external display VIs on the External Display function palette. You can also display an image directly on the front panel using the Image Display control on the Vision control palette.
Display an image in an external window using the IMAQ WindDraw VI. You can display images in up to 16 different external windows. Use the IMAQ WindSetup VI to configure the appearance of each external window. For example, you can decide if the window has scroll bars, is resizable, or has a title bar. You also can use the IMAQ WindMove VI to position the external image window at a particular location on the monitor.
|Note External image windows are not LabVIEW panels. They are managed directly by NI Vision.|
You can use a color palette to display grayscale images by applying a color palette to the window. You can use the IMAQ GetPalette VI to obtain predefined color palettes. For example, if you need to display a binary image—an image containing particle regions with pixel values of 1 and a background region with pixel values of 0—apply the predefined binary palette. Refer to the Display section of the NI Vision Concepts Help for more information about color palettes.
|Note At the end of your application, you must close all open external windows using the IMAQ WindClose VI.|
Use the Image Display control to display an image on the LabVIEW front panel, as shown in the following figure. You can access the Image Display control by right-clicking the front panel and selecting Vision.
|1 Display Area||3 ROI Tools Template|
|2 Image Information Indicator||4 Scrollbars|
To display an image, wire the image output of an NI Vision VI into the Image Display terminal on the block diagram, as shown in the following figure.
The Image Display control contains the following elements:
During design time, you can customize the appearance of the control by rearranging the control elements, configuring properties through the shortcut menu, or selecting the control and clicking Edit»Customize Control.
During run time, you can customize many parts of the control using property nodes.
|Note Not all functionality available during design time is available at run time.|
To create a property node, right-click the control and select Create»Property Node. Click the Property Node once to see the properties you can configure. Properties specific to the Image Display control appear at the end of the list.
The following list describes a subset of the properties available for the Image Display control:
|Note To cause the Image Display control to refresh the image immediately, use the Refresh Image method. To create a method, right-click the control, and select Create»Invoke Node. Click the Invoke Node once to see the available methods. Methods specific to the Image Display control appear at the end of the shortcut menu.|
The Image Display control also includes the following methods: