Table Of Contents

Get Color Palette (G Dataflow)

Last Modified: October 24, 2017

Selects a display palette. Five predefined palettes are available.

To activate a color palette, choose a code for palette type and connect the color palette output to the input color palette of the Window Draw node.

connector_pane_image
datatype_icon

palette type

Selection of five predefined palettes.

You can choose from the following values:

Name Description
Gray Grayscale is the default palette. Gradual grayscale variation from black to white. Each value is assigned an equal amount of the RGB intensities.
Binary Designed especially for binary images. 16 cycles of 16 different colors, where g is the grayscale value and g = 0 corresponds to R = 0, G = 0, B = 0 (black); g = 1 corresponds to R = 1, G = 0, B = 0 (red); g = 2 corresponds to R = 0, G = 1, B = 0 (green); and so on.
Gradient Gradation from red to white with a prominent range of light blue in the upper range. 0 is black and 255 is white.
Rainbow Gradation from blue to red with a prominent range of greens in the middle value range. 0 is black and 255 is white.
Temperature Gradation from light brown to dark brown. 0 is black and 255 is white.
datatype_icon

bit depth

New bit depth of image.

Use this input only when get/set? is TRUE (Set). The value must be from 8 to 15 for signed 16-bit images, from 8 to 16 for unsigned 16-bit images and 64-bit RGB images, or 0. A value of 0 indicates that NI Vision should use the entire range of the image datatype. For color images, this parameter specifies the bit depth for each 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

color palette

Array of clusters 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 for each of the three color planes. If the three planes have identical values, a gray level is obtained (0 specifies black and 255 specifies white). This output is to be directly connected to the input color palette of the Window Draw node.

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 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