MIL_ID ParentBufId, | //in |
MIL_INT OffX, | //in |
MIL_INT SizeX, | //in |
MIL_ID *BufIdPtr | //out |
This function allocates a one-dimensional child data buffer within a region of the first row of the specified, previously allocated, parent data buffer. If the parent buffer is multi-band, this function allocates a multi-band child buffer; the child is allocated within the specified one-dimensional region of the first row in each color band. To allocate a child in one specific band, use MbufChildColor2d() instead of MbufChild1d().
The child buffer is not allocated in its own memory space; it remains part of the parent buffer. Therefore, any modification to the child buffer affects the parent and vice versa. Note, a parent buffer can have several child buffers.
A child buffer is considered a data buffer in its own right, and can be used in the same circumstances as its parent buffer. A child buffer inherits its type and attributes from the parent buffer.
If a child buffer is allocated using a parent buffer with an ROI, set using MbufSetRegion(), the child buffer inherits the parent buffer's ROI. You can also set an ROI in a child buffer directly. Note that the ROI of the child buffer is only accessible using the child buffer's MIL identifier.
When a child buffer is no longer required, it can be released using MbufFree().
Specifies the offset of the child buffer relative to the parent buffer's top-left pixel. The offset must be within the width of the parent buffer.
When dealing with monochrome (1-band) buffers, the buffer offset must be a multiple of 4.
Header | Include mil.h. |
Library | Use mil.lib. |
DLL | Requires mil.dll. |