Table Of Contents

Construct ROI (G Dataflow)

Last Modified: October 24, 2017

Allows the user to specify a region of interest (ROI) on the image.

This node displays the image in the specified window and provides the set of tools defined to select an ROI. Construct ROI also returns the ROI descriptor that corresponds to the ROI drawn on the image when you click OK in the constructor window.

connector_pane_image
datatype_icon

image in

Reference to the source image to use in the constructor window.

datatype_icon

tools

Available tools.

The following tools are available:

Name Value Description
Point 1

Select a pixel in the image.

Line 2

Draw a line in the image.

Rectangle 3

Draw a rectangle or square in the image.

Oval 4

Draw an oval or circle in the image.

Polygon 5

Draw a polygon in the image.

Freehand Region 6

Draw a freehand region in the image.

Annulus 7

Draw an annulus in the image.

Zoom 8

Zoom in or out in an image.

Pan 9

Shift the view of the image.

Broken Line 10

Draw a broken line in the image.

Freehand Line 11

Draw a freehand line in the image.

Rotated Rectangle 12

Draw a rotated rectangle in the image.

datatype_icon

ROI descriptor in

Descriptor of the ROI that appears initially on the ROI Constructor window. Use this input to specify an ROI that the user can modify by resizing or moving it.

datatype_icon

Global Rectangle

Coordinates of the bounding rectangle.

datatype_icon

Contours

Individual shapes that define an ROI.

datatype_icon

ID

Object specifying if contour is the external or internal edge of an ROI.

datatype_icon

Type

Shape type of the contour.

datatype_icon

Coordinates

Relative position of the contour.

datatype_icon

prompt

Message string to display in the title bar of the window. Use this control to provide the user with instructions about selecting the object.

datatype_icon

window number

Window number to display the image.

When you select -1, the Construct ROI node displays a modal dialog window centered on the screen. When you select a regular NI Vision window number (0-15), the node displays the image in the specified window and temporarily sets the NI Vision window to modal mode. When the user clicks OK or Cancel, the attributes of the window are reset to their initial values.

Default: 1

datatype_icon

color palette

Control that applies a color palette to an image window.

color palette is an array of clusters constructed by the user or supplied by the Get Color Palette node. This palette is composed of 256 elements for each of the three color planes (red, green, and blue).

A specific color is the result of applying a value between 0 and 255 to each of the three color planes (red, green, and blue). If the three planes have identical values, a gray level is obtained (0 specifies black and 255 specifies white). The color palette can be used only for 8-bit images.

datatype_icon

Red

Value of the red color plane.

datatype_icon

Green

Value of the green color plane.

datatype_icon

Blue

Value of the blue color plane.

datatype_icon

error in

Error conditions that occur before this node runs.

The node responds to this input according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Default: No error

datatype_icon

image out

Reference to image in. This node does not modify the image connected to the image in input.

datatype_icon

ROI descriptor out

Control that returns the ROI descriptor created with the constructor window.

datatype_icon

global rectangle

Coordinates of the bounding rectangle.

datatype_icon

contours

Individual shapes that define an ROI.

datatype_icon

ID

Control specifying whether the contour is the external or internal edge of an ROI.

datatype_icon

type

Shape type of the contour.

datatype_icon

coordinates

Relative position of the contour.

datatype_icon

cancelled?

Boolean value that indicates if the user clicked Cancel in the constructor window.

True User clicked Cancel in the constructor window
False User clicked OK in the constructor window
datatype_icon

error out

Error information.

The node produces this output according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Where This Node Can Run:

Desktop OS: Windows

FPGA: Not supported

Web Server: Not supported in VIs that run in a web application


Recently Viewed Topics