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 |
---|---|---|---|
Display | — | Are Tools Context Sensitive | imaqAreToolsContextSensitive |
Display | — | Close Window | imaqCloseWindow |
Display | — | Display Image | imaqDisplayImage |
Display | — | Get Last Key | imaqGetLastKey |
Display | — | Get System Window Handle | imaqGetSystemWindowHandle |
Display | — | Get Window Center Pos | imaqGetWindowCenterPos |
Display | — | Set Tool Context Sensitivity | imaqSetToolContextSensitivity |
Display | — | Show Window | imaqShowWindow |
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 |
---|---|---|---|
Display | Tool Window | Close Tool Window | imaqCloseToolWindow |
Display | Tool Window | Get Current Tool | imaqGetCurrentTool |
Display | Tool Window | Get Last Event | imaqGetLastEvent |
Display | Tool Window | Get Tool Window Handle | imaqGetToolWindowHandle |
Display | Tool Window | Get Tool Window Position | imaqGetToolWindowPos |
Display | Tool Window | Is Tool Window Visible | imaqIsToolWindowVisible |
Display | Tool Window | Move Tool Window | imaqMoveToolWindow |
Display | Tool Window | Set Current Tool | imaqSetCurrentTool |
Display | Tool Window | Set Event Callback | imaqSetEventCallback |
Display | Tool Window | Set Tool Color | imaqSetToolColor |
Display | Tool Window | Setup Tool Window | imaqSetupToolWindow |
Display | Tool Window | Show Tool Window | imaqShowToolWindow |
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 |
---|---|---|---|
Display | Window Management | Are Scrollbars Visible | imaqAreScrollbarsVisible |
Display | Window Management | Bring Window To Top | imaqBringWindowToTop |
Display | Window Management | Get Mouse Position | imaqGetMousePos |
Display | Window Management | Get Window Background | imaqGetWindowBackground |
Display | Window Management | Get Display Mapping | imaqGetWindowDisplayMapping |
Display | Window Management | Get Window Grid | imaqGetWindowGrid |
Display | Window Management | Get Window Handle | imaqGetWindowHandle |
Display | Window Management | Get Window Position | imaqGetWindowPos |
Display | Window Management | Get Window Size | imaqGetWindowSize |
Display | Window Management | Get Window Title | imaqGetWindowTitle |
Display | Window Management | Get Window Zoom 2 | imaqGetWindowZoom2 |
Display | Window Management | Is Window Non-Tearing | imaqIsWindowNonTearing |
Display | Window Management | Is Window Visible | imaqIsWindowVisible |
Display | Window Management | Move Window | imaqMoveWindow |
Display | Window Management | Setup Window | imaqSetupWindow |
Display | Window Management | Set Window Background | imaqSetWindowBackground |
Display | Window Management | Set Display Mapping | imaqSetWindowDisplayMapping |
Display | Window Management | Set Window Grid | imaqSetWindowGrid |
Display | Window Management | Set Window Max Contour Count | imaqSetWindowMaxContourCount |
Display | Window Management | Set Window Non-Tearing | imaqSetWindowNonTearing |
Display | Window Management | Set Window Palette | imaqSetWindowPalette |
Display | Window Management | Set Window Size | imaqSetWindowSize |
Display | Window Management | Set Window Thread Policy | imaqSetWindowThreadPolicy |
Display | Window Management | Set Window Title | imaqSetWindowTitle |
Display | Window Management | Set Window Zoom to Fit | imaqSetWindowZoomToFit |
Display | Window Management | Show Scrollbars | imaqShowScrollbars |
Display | Window Management | Zoom Window 2 | imaqZoomWindow2 |
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.