imaqFillImage

NI Vision for LabWindows/CVI Function

imaqFillImage

Usage

int imaqFillImage(Image* image, PixelValue value, const Image* mask);

Purpose

Sets each pixel in an image to a specified value.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_U16, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL, IMAQ_IMAGE_RGB_U64

Parameters

Name

Type

Description

image Image* The image whose pixel values the function overwrites with the given value.
value PixelValue The value with which the function fills the image pixels.
mask const Image* A mask image. This image must be an IMAQ_IMAGE_U8 image. The function sets only those source pixels whose corresponding mask pixels are non-zero to the specified value. Set this parameter to NULL if you want the function to set every pixel in the source image to the specified value.

Return Value

Type

Description

int On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError().