| MIL 10 Reference
| Customize Help
| Save Settings

MbufClone



See also
Availability
Available in MIL-Lite
Available in MIL

Available on Windows
Available on Linux

Available on Non-Matrox computer
Available on Matrox 4Sight-X
Available on Matrox 4Sight GP
Available on Matrox Supersight
function map Function map
Examples
Synopsis
Clones a data buffer.
Syntax
MIL_ID MbufClone(
MIL_ID SrcBufId, //in
MIL_ID SysId, //in
MIL_INT SizeX, //in
MIL_INT SizeY, //in
MIL_INT Type, //in
MIL_INT64 Attribute, //in
MIL_INT64 ControlFlag, //in
MIL_ID *VarBufIdPtr //out
)
Description

This function allocates a buffer with the same size, number of bands, type, and attributes as the source buffer, unless you specify that certain characteristics of the source buffer be different for the clone (for example, its size).

If you clone a child buffer, the clone will be similar to the source child, but it will not be a child itself. A clone of a band child of a packed buffer will be a one band planar equivalent.

When you clone a buffer, certain characteristics of the source buffer (such as region of interest) cannot be duplicated for the clone. Note that an error is generated when the source buffer contains a region of interest.

If requested, you can also copy the source buffer's data to the clone (using M_COPY_SRC_DATA).

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 if there is complementary information.
Parameters
This function is not supported on the selected boards.
Parameters
SrcBufId

Specifies the identifier of the source buffer to clone.

This image buffer must not have a region of interest (ROI) associated with it. Using an image buffer with an ROI will cause an error.

SysId

Specifies the system on which to allocate the clone.

function map For specifying the system
CollapseValue Description
Collapse M_DEFAULT

Specifies that the clone is allocated on the same system as the source buffer.

SizeX

Specifies the width of the clone.

function map For specifying the width of the buffer
CollapseValue Description
Collapse M_DEFAULT

Specifies that the width of the clone is the same as the source buffer.

Collapse Value

Specifies a value for the required width of the clone.

SizeY

Specifies the height of the clone.

function map For specifying the height of the buffer
CollapseValue Description
Collapse M_DEFAULT

Specifies that the height of the clone is the same as the source buffer.

Collapse Value

Specifies a value for the required height of the clone.

Type

Specifies the data type of the clone.

function map For specifying the data type of the buffer
CollapseValue Description
Collapse M_DEFAULT

Specifies that the clone has the same data type as the source buffer.

Attribute

Specifies the attributes of the clone.

function map For specifying the attributes of the buffer
CollapseValue Description
Collapse M_DEFAULT

Specifies that the clone has the same attributes as the source buffer.

ControlFlag

Specifies the control settings for the cloning operation.

function map For specifying which information to copy
CollapseValue Description
Collapse M_DEFAULT

Specifies to copy only the number of bands, type, and attributes of the source buffer. The data, information dependent on the content of the buffer (such as M_MIN and M_MAX), and the calibration information associated with the source buffer are not copied.

(summarize)
Collapse M_COPY_SRC_DATA

Specifies to copy the number of bands, type, attributes, and data of the source buffer, including the calibration information and information dependent on the content of the buffer (such as M_MIN and M_MAX).

VarBufIdPtr

Specifies the address of the variable in which to write the buffer identifier. Since the MbufClone() function also returns the buffer identifier, you can set this parameter to M_NULL. If allocation fails, M_NULL is written as the identifier.

Return value
The returned value is the buffer identifier. If allocation fails, M_NULL is returned.
Compilation information
Header Include mil.h.
Library Use mil.lib.
DLL Requires mil.dll.
NONE DEFAULT DEFAULT DEFAULT DEFAULT DEFAULT DEFAULT COPY SRC DATA