imaqCopyFromRing

NI Vision for LabWindows/CVI Function

imaqCopyFromRing

Usage

Image* imaqCopyFromRing(SESSION_ID sessionID, Image* image, int imageToCopy, int* imageNumber, Rect rect);

Purpose

Copies an area of a buffer to a user-specified image. This function is useful for ring acquisitions if you do not want to extract the buffer.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name

Type

Description

sessionID SESSION_ID A valid session ID.
image Image* Receives the copied image. If you set this parameter to NULL, the function creates an image to receive the copy.
imageToCopy int The image to copy from the ring acquisition. The cumulative buffer index specifies the image to copy. If another image has overwritten imageToCopy, the function returns the next available image.
imageNumber int* The cumulative buffer index of the copied image. Set this parameter to NULL if you do not need this information.
rect Rect The rectangular area of the image in the ring that the function copies. If you set this parameter to IMAQ_NO_RECT, or if the area is larger than the image in the ring, the function copies the entire image.

Return Value

Type

Description

Image* On success, this function returns the copied image. On failure, the function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the image, dispose of it by calling imaqDispose().