| Customize Help
| Save Settings

MbufClear



Function Map
Synopsis
Clears a buffer, or the components of a container, to a specified color.
Syntax
void MbufClear(
MIL_ID DstContainerOrBufId, //in
MIL_DOUBLE Color //in
)
Description

This function clears the specified buffer, or the components of the specified container, to the specified color.

To clear a 16-bit or 32-bit multi-band image buffer to a color value, use MgraClear().

For an image buffer, the clear can be limited to a region of interest (ROI) set using MbufSetRegion().

Using this function with a container is equivalent to using it individually with each component of the container. An error will be generated if the container has a component that cannot be cleared (for example, because it has an ROI defined only in a vector format).

Using this function with a buffer always results in an uncalibrated image. Any previously associated camera calibration context is removed. You can use MgraClear() to clear a buffer while preserving the camera calibration context associated with the empty image.

Note that this function reference has not been updated for a MIL system added during a MIL update. Refer to the MIL system's release note to see which MIL system’s documentation you should use in its place and any possible differences.
Parameters
This function is not supported on the selected boards.
This function reference has not been updated for the selected MIL system. To show the content of this page, choose a second MIL system; refer to the MIL system's release note to see which MIL system’s documentation to choose and any possible differences.
Parameters
DstContainerOrBufId

Specifies the identifier of the buffer or container to clear. If you specify an image buffer, it can have an ROI set using MbufSetRegion(). The ROI must be defined in raster format (M_RASTER or M_VECTOR_AND_RASTER). An error is generated if the ROI is only in vector format (M_VECTOR).

Color

Specifies the color value with which to clear the buffer.

For a 3-band image buffer, this parameter can be set to one of the following color values:

function map For specifying a color value
Click to summarizeValue Description
Click to summarize
M_RGB888(
MIL_INT Red,
MIL_INT Green,
MIL_INT Blue
)

Specifies an RGB value used to clear an 8-bit 3-band buffer to an RGB color. Each value (red, green or blue) must not exceed 8 bits.

(summarize)
Parameters

Specifies the red component, as a value between 0 and 255.

Specifies the green component, as a value between 0 and 255.

Specifies the blue component, as a value between 0 and 255.

Click to summarize M_COLOR_BLACK

Specifies the color black.

Click to summarize M_COLOR_BLUE

Specifies the color blue.

Click to summarize M_COLOR_BRIGHT_GRAY

Specifies the color bright gray.

Click to summarize M_COLOR_CYAN

Specifies the color cyan.

Click to summarize M_COLOR_DARK_BLUE

Specifies the color dark blue.

Click to summarize M_COLOR_DARK_CYAN

Specifies the color dark cyan.

Click to summarize M_COLOR_DARK_GREEN

Specifies the color dark green.

Click to summarize M_COLOR_DARK_MAGENTA

Specifies the color dark magenta.

Click to summarize M_COLOR_DARK_RED

Specifies the color dark red.

Click to summarize M_COLOR_DARK_YELLOW

Specifies the color dark yellow.

Click to summarize M_COLOR_GRAY

Specifies the color gray.

Click to summarize M_COLOR_GREEN

Specifies the color green.

Click to summarize M_COLOR_LIGHT_BLUE

Specifies the color light blue.

Click to summarize M_COLOR_LIGHT_GRAY

Specifies the color light gray.

Click to summarize M_COLOR_LIGHT_GREEN

Specifies the color light green.

Click to summarize M_COLOR_LIGHT_WHITE

Specifies the color light white.

Click to summarize M_COLOR_MAGENTA

Specifies the color magenta.

Click to summarize M_COLOR_RED

Specifies the color red.

Click to summarize M_COLOR_WHITE

Specifies the color white.

Click to summarize M_COLOR_YELLOW

Specifies the color yellow.

For a 1-band or 3-band buffer, you can set this parameter to the following grayscale value:

function map For specifying a grayscale value to be used with all bands
Click to summarizeValue Description
Click to summarize Value

Specifies a grayscale value used to clear the 1-band or multi-band buffer. This value is cast to the buffer type and depth. If the destination buffer is 3-band, this value will be replicated in each band.

(summarize)
Compilation information
Header Include mil.h.
Library Use mil.lib.
DLL Requires mil.dll.
VECTOR COLOR BLACK COLOR BLUE COLOR BRIGHT GRAY COLOR CYAN COLOR DARK BLUE COLOR DARK CYAN COLOR DARK GREEN COLOR DARK MAGENTA COLOR DARK RED COLOR DARK YELLOW COLOR GRAY COLOR GREEN COLOR LIGHT BLUE COLOR LIGHT GRAY COLOR LIGHT GREEN COLOR LIGHT WHITE COLOR MAGENTA COLOR RED COLOR WHITE COLOR YELLOW