Table Of Contents

Get Image Pixel Pointer (G Dataflow)

Last Modified: March 26, 2019

Obtains a pointer on the pixels of an image. This node also returns information on the organization of the image pixels in memory.

connector_pane_image
datatype_icon

function

Method the node uses to get pixel pointer information.

The following options are available:

Name Description
Map Pixel Pointer Obtains the pointer on a pixel of an image and obtains information related to the organization of the pixels of this image in memory.
Unmap Pixel Pointer Frees the pointer and related information previously obtained using map pixel pointer.
Get Pixels Infos Obtains information related to the organization of the pixels of an image in memory without mapping a pointer.
datatype_icon

image in

Reference to the source image.

datatype_icon

pixel pointer in

Input used only when function is set to unmap pixel pointer mode.

When the node is executed to obtain a pointer using the map pixel pointer function, some information regarding the pointer that is required to unmap the pixel pointer is recorded. Give this pointer to the node to retrieve this information when executing the unmap pixel pointer function. On a 32-bit operating system, it is safe to pass a 32-bit value to this input.

datatype_icon

x coordinate

Option to select the X coordinate of the pixel in the image on which the pointer is required. This parameter is not used in the unmap pixel pointer mode.

Default: 0

datatype_icon

y coordinate

Option to select the Y coordinate of the pixel in the image on which the pointer is required. This parameter is not used in the unmap pixel pointer mode.

Default: 0

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

border size

Border size of the image.

datatype_icon

image out

Reference to the source image.

datatype_icon

pixel pointer out

Pointer on the pixels of the image. This pointer is obtained only in the map pixel pointer mode. On a 32-bit operating system, it is safe to convert this output value to a 32-bit value.

datatype_icon

line width

Total number of pixels in a horizontal line in the image.

This is the sum of the xRes of the image, the borders of the image, and the left and right alignments of the image. This number may not match the horizontal size of the image.

datatype_icon

pixel size

Size, in bytes, of each pixel in the image.

This value multiplied with the line width gives the number of bytes occupied by a line of the image in memory.

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

transfer max size

Number of bytes from the pixel pointer to the end of the image.

This size represents the maximum size of bytes that can be transferred. For example, for an 8-bit image of size 256 × 256 and border 1, the line width is 288, and the maximum transfer size from pixel (0, 0) is 73,728 bytes. Images are 32-byte aligned. Pixel (0, 0) is located at the top, left corner of the image.

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