Table Of Contents

Window Display Mapping (G Dataflow)

Last Modified: October 24, 2017

Sets or retrieves the pixel mapping policy for displaying 16-bit images with an unspecified bit depth.

Because 16-bit grayscale images cannot be displayed with their full resolution on 32-bit color displays using common video adapters limited to 8-bit resolution/per pixel/color, 16-bit images need to be mapped to the 8-bit range (0 to 255).

connector_pane_image
datatype_icon

window number

Image window to configure.

The window is identified by a number from 0 to 15. Specify a value of 15 to configure the video out port on a Real-Time system.

Default: 0

datatype_icon

conversion policy in

Numeric cluster that is the display conversion to use if get/set? is set to True.

datatype_icon

Conversion Method

Numeric cluster that sets the characteristics of the conversion method, and consists of the following values:

Name Value Description
Default 0
Most Significant Bits 1
Full Dynamic 2

The full dynamic range of the 16-bit image is mapped to an 8-bit (256 grayscale values) scale. 16-bit images are displayed by scaling the data to 8 bits, calculated as a function of the dynamic range from the image source. The minimum value (min) and the maximum value (max) are calculated automatically. Then the following formula is applied to each pixel:

Display(x, y) = (Src(x, y) - min) × 255/(max - min)

Downshift 3

The 16-bit image pixels are shifted to the right the number of times specified by the # shifts cluster member.

Given Range 4

The pixel values in the range specified by minimum value and maximum value are mapped to an 8-bit scale.

90 % Dynamic 5

The dynamic range containing the middle 90% of the cumulated histogram of the image is mapped to an 8-bit (256 grayscale values) scale.

Given Percent Range 6

The pixel values in the relative percentage range (0 to 100) of the cumulated histogram specified by minimum value and maximum value are mapped to an 8-bit scale.

datatype_icon

Minimum Value

Number that sets the minimum value used for given range and given percent range.

When conversion method is set to given range, minimum value represents the value that is mapped to 0. When conversion method is set to given percent range, minimum value represents the percentage of the range used to compute the pixel value mapped to 0.

datatype_icon

Maximum Value

Number that sets the maximum value used for given range and given percent range.

When conversion method is set to given range, maximum value represents the value that is mapped to 255. When conversion method is set to given percent range, maximum value represents the percentage of the range used to compute the pixel value mapped to 255.

datatype_icon

# Shifts

Number of bits to right-shift the pixel values for the downshift conversion method.

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

get/set?

Boolean value that specifies whether to retrieve (get) or modify (set) the conversion policy for displaying a 16-bit image in an image window.

True Modify (set) the image window conversion policy.
False Retrieve (get) the image window conversion policy.

Default: True

datatype_icon

conversion policy out

Indicator that returns the current display conversion policy for the window number specified.

datatype_icon

Conversion Method

Indicator that displays the selected characteristics of the conversion method, and shows the following values:

Name Value Description
Default 0

Most Significant Bits 1

Full Dynamic 2

The full dynamic range of the 16-bit image is mapped to an 8-bit (256 grayscale values) scale. 16-bit images are displayed by scaling the data to 8 bits, calculated as a function of the dynamic range from the image source. The minimum value (min) and the maximum value (max) are calculated automatically. Then the following formula is applied to each pixel:

Display(x, y) = (Src(x, y) - min) × 255/(max - min)

Downshift 3

The 16-bit image pixels are shifted to the right the number of times specified by the # shifts cluster member.

Given Range 4

The pixel values in the range specified by minimum value and maximum value are mapped to an 8-bit scale.

90 % Dynamic 5

The dynamic range containing the middle 90% of the cumulated histogram of the image is mapped to an 8-bit (256 grayscale values) scale.

Given Percent Range 6

The pixel values in the relative percentage range (0 to 100) of the cumulated histogram specified by minimum value and maximumvalue are mapped to an 8-bit scale.

datatype_icon

Minimum Value

Display of the minimum value used for given range and given percent range.

When conversion method is set to given range, minimum value represents the value that is mapped to 0. When conversion method is set to given percent range, minimum value represents the percentage of the range used to compute the pixel value mapped to 0.

datatype_icon

Maximum Value

Display of the maximum value used for given range and given percent range.

When conversion method is set to given range, maximum value represents the value that is mapped to 255. When conversion method is set to given percent range, maximum value represents the percentage of the range used to compute the pixel value mapped to 255.

datatype_icon

# Shifts

Display of the number of bits to right-shift the pixel values for the downshift conversion method.

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.

Using The Conversion Method

Window Display Mapping enables the mapping technique used when displaying a 16-bit grayscale image. According to the conversion method selected, the image full dynamic is mapped to 8 bits (full dynamic), a given number of right shift is applied to the 16-bit pixels (downshift), the range corresponding to the center 90% of the cumulative histogram is mapped to 8-bits (90% dynamic). The default mapping technique is the full dynamic, where 16-bit images are displayed by scaling the data to 8 bits, calculated as a function of the dynamic range from the image source. The minimum value (min) and the maximum value (max) are calculated automatically. Then the following formula is applied to each pixel:

Display(x, y) = (Src(x, y) - min) × 255/(max - min)

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