Display Functions

NI Vision for LabWindows/CVI Function

Display Functions

Display functions allow you to display images in image windows.

The following table lists the Display functions. The functions in the Display class are grouped according to the types of operations they perform. The first column contains the name of the class. The second column contains names of function subclasses. The third column contains names of individual function panels. Each Display function panel represents one function.

Class Subclass LabWindows/CVI Equivalent Function Name
DisplayAre Tools Context SensitiveimaqAreToolsContextSensitive
DisplayClose WindowimaqCloseWindow
DisplayDisplay ImageimaqDisplayImage
DisplayGet Last KeyimaqGetLastKey
DisplayGet System Window HandleimaqGetSystemWindowHandle
DisplayGet Window Center PosimaqGetWindowCenterPos
DisplaySet Tool Context SensitivityimaqSetToolContextSensitivity
DisplayShow WindowimaqShowWindow

Tool Window Functions

Tool Windows functions allow you to manage the tool palette, which you use to select areas of an image in an image window.

Class Subclass LabWindows/CVI Equivalent Function Name
DisplayTool WindowClose Tool WindowimaqCloseToolWindow
DisplayTool WindowGet Current ToolimaqGetCurrentTool
DisplayTool WindowGet Last EventimaqGetLastEvent
DisplayTool WindowGet Tool Window HandleimaqGetToolWindowHandle
DisplayTool WindowGet Tool Window PositionimaqGetToolWindowPos
DisplayTool WindowIs Tool Window VisibleimaqIsToolWindowVisible
DisplayTool WindowMove Tool WindowimaqMoveToolWindow
DisplayTool WindowSet Current ToolimaqSetCurrentTool
DisplayTool WindowSet Event CallbackimaqSetEventCallback
DisplayTool WindowSet Tool ColorimaqSetToolColor
DisplayTool WindowSetup Tool WindowimaqSetupToolWindow
DisplayTool WindowShow Tool WindowimaqShowToolWindow

Window Management Functions

Window Management functions allow you to configure, move, and resize image windows. You can control up to 16 image windows at a time.

Class Subclass LabWindows/CVI Equivalent Function Name
DisplayWindow ManagementAre Scrollbars VisibleimaqAreScrollbarsVisible
DisplayWindow ManagementBring Window To TopimaqBringWindowToTop
DisplayWindow ManagementGet Mouse PositionimaqGetMousePos
DisplayWindow ManagementGet Window BackgroundimaqGetWindowBackground
DisplayWindow ManagementGet Display MappingimaqGetWindowDisplayMapping
DisplayWindow ManagementGet Window GridimaqGetWindowGrid
DisplayWindow ManagementGet Window HandleimaqGetWindowHandle
DisplayWindow ManagementGet Window PositionimaqGetWindowPos
DisplayWindow ManagementGet Window SizeimaqGetWindowSize
DisplayWindow ManagementGet Window TitleimaqGetWindowTitle
DisplayWindow ManagementGet Window Zoom 2imaqGetWindowZoom2
DisplayWindow ManagementIs Window Non-TearingimaqIsWindowNonTearing
DisplayWindow ManagementIs Window VisibleimaqIsWindowVisible
DisplayWindow ManagementMove WindowimaqMoveWindow
DisplayWindow ManagementSetup WindowimaqSetupWindow
DisplayWindow ManagementSet Window BackgroundimaqSetWindowBackground
DisplayWindow ManagementSet Display MappingimaqSetWindowDisplayMapping
DisplayWindow ManagementSet Window GridimaqSetWindowGrid
DisplayWindow ManagementSet Window Max Contour CountimaqSetWindowMaxContourCount
DisplayWindow ManagementSet Window Non-TearingimaqSetWindowNonTearing
DisplayWindow ManagementSet Window PaletteimaqSetWindowPalette
DisplayWindow ManagementSet Window SizeimaqSetWindowSize
DisplayWindow ManagementSet Window Thread PolicyimaqSetWindowThreadPolicy
DisplayWindow ManagementSet Window TitleimaqSetWindowTitle
DisplayWindow ManagementSet Window Zoom to FitimaqSetWindowZoomToFit
DisplayWindow ManagementShow ScrollbarsimaqShowScrollbars
DisplayWindow ManagementZoom Window 2imaqZoomWindow2

Tool Window

The examples of the tool palette in the following figure have four icons per line. The tool palette on the left automatically transforms to the palette on the right when you manipulate a region tool in an image window.

1  Pixel Intensity   4  Anchoring Coordinates of a region  
2  Image-Type Indicator (8-bit, 16-bit, RGB)   5  Size of an Active Region  
3  Coordinates of the Mouse on the Active Window   6  Length and Horizontal Displacement Angle of a Line Region   

Tips for Using the Tool Window

The following are tips you can apply when using the tool window:

  • Use imaqGetLastEvent() or register a callback with imaqSetEventCallback() to retrieve the draw events on a window and find the coordinates of a selected region.
  • Alter the functionality of region tools by pressing certain keyboard keys while using the tool:
    • To constrain the x and y dimensions of an ROI, hold down the <Shift> key while drawing. This forces rectangles into squares, ellipses into circles, and line segments into horizontal or vertical segments.
    • To add an ROI without erasing the previous ROI elements, hold down the <Ctrl> key when you click. The previous elements are erased if you do not use <Ctrl> when starting a new element.
    • To produce the last point of a polygon or broken line, double-click while drawing.
  • Use the selection tool to select an existing ROI by clicking its border. Once you select an ROI, you can manipulate it in the following ways:
    • To erase an ROI in an image window, select it and press the <Delete> key.
    • To resize a rectangle or ellipse, click in a grab handle and drag it to a new location.
    • To reposition a vertex in a line, broken line, or polygon, click in a grab handle and move it to a new location.
    • To reposition a rectangle or ellipse, click in the interior and drag it to a new location.
    • To reposition a point, click on it and drag it to a new location.
    • To reposition lines, broken lines, and polygons, click on any segment and drag it to a new location.
    • To reposition freehand lines and closed freehand lines, click anywhere on the line and drag it to a new location.
    • To rotate a rotated rectangle, click the interior handle bars and drag the rectangle. You can reposition and resize a rotated rectangle just as you would a normal rectangle.
    • To resize the interior or external radii of an annulus, click the internal or external edge, respectively, and drag it to a new location. You can reposition an annulus by clicking on the center of the annulus or the center of the annular region and drag it to a new location.
  • You can also achieve the selection tool functionality without using the selection tool by turning on context sensitivity using the imaqSetToolContextSensitivity() function.