| Customize Help
| Save Settings

MbufAllocDefault



Function Map
Synopsis
Allocate an image buffer or a container (automatically determined by MIL) with settings appropriate for grabbing using the specified digitizer.
Syntax
MIL_ID MbufAllocDefault(
MIL_ID SystemId, //in
MIL_ID ReferenceDigId, //in
MIL_INT64 Attribute, //in
MIL_INT64 ControlFlag, //in
MIL_INT64 ControlValue, //in
MIL_ID *VarContainerOrBufIdPtr //out
)
Description

This function allocates an image buffer or a container (automatically determined by MIL) on the specified system with settings appropriate for grabbing using the specified digitizer. For example, when the digitizer is associated with a 2D camera, typically an image buffer is allocated. If the digitizer is associated with a 3D sensor, typically a container is allocated. When an image buffer is allocated, any required attributes (such as buffer size) are set automatically.

When the image buffer or container is no longer required, free it using MbufFree().

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
SystemId INQ

Specifies the MIL system on which to allocate the image buffer or the container. This parameter should be set to one of the following values:

function map For specifying the MIL system
Click to summarizeValue Description
Click to summarize M_DEFAULT_HOST

Specifies the default Host system of the current MIL application.

Click to summarize MIL system identifier

Specifies a valid system identifier, previously allocated using MsysAlloc().

ReferenceDigId

Specifies the digitizer to use as a reference for determining the settings of the image buffer or container to allocate.

Attribute INQ

Specifies the usage of the image buffer or container.

This attribute determines whether the buffer or container can be used for a specific purpose.

The values in the table below can be added together to specify multiple attributes. For example, to allocate an image buffer or container for both grabbing and display, specify M_GRAB + M_DISP.

function map For specifying the buffer or container usage
Click to summarizeValue Description
Click to summarize M_DISP

Specifies that the object is allocated with the display attribute.

If an image buffer is allocated, this attribute specifies that the image buffer can be displayed.

If a container is allocated, this attribute specifies that the container can become 3D-displayable. To learn how to make a container 3D-displayable, see the Preparing a container for display or processing section of Chapter 35: 3D Containers.

(summarize)
Click to summarize M_GRAB

Specifies that the object is allocated with the grab attribute.

This attribute specifies that the image buffer or container can be used to grab data (for example, using MdigGrab().

(summarize)
Click to summarize M_PROC

Specifies that the object is allocated with the processable attribute.

If an image buffer is allocated, this attribute specifies that the image buffer can be processed. If you intend to use the image buffer as the source or destination buffer of a processing or analysis operation, you must allocate the image buffer with an M_PROC attribute.

If a container is allocated, this attribute specifies that the container can become 3D-processable. To learn how to make a container 3D-processable, see the Preparing a container for display or processing section of Chapter 35: 3D Containers.

(summarize)
ControlFlag

Reserved for future expansion and must be set to M_DEFAULT.

ControlValue

Reserved for future expansion and must be set to M_DEFAULT.

VarContainerOrBufIdPtr

Specifies the address of the variable in which to write the image buffer or container identifier.

Return value
The returned value is the identifier of the image buffer or container. If allocation fails, M_NULL is returned.
Compilation information
Header Include mil.h.
Library Use mil.lib.
DLL Requires mil.dll.
DEFAULT HOST DISP GRAB PROC