MIL_ID ParentBufId, | //in |
MIL_INT Band, | //in |
MIL_INT OffX, | //in |
MIL_INT OffY, | //in |
MIL_INT SizeX, | //in |
MIL_INT SizeY, | //in |
MIL_ID *BufIdPtr | //out |
This function allocates a child data buffer within the specified, previously allocated, color parent data buffer. It selects a two-dimensional region in one or all of the color bands of the parent data buffer and allocates the region as a child of that buffer.
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 color child buffer is considered a data buffer in its own right. It 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 this buffer is no longer required, release it, using MbufFree().
Specifies the identifier of the parent buffer.
The parent buffer cannot have an M_COMPRESS attribute unless the Band parameter is set to M_ALL_BANDS.
Specifies the color band of the parent data buffer from which to allocate the child data buffer. The specified color band should be valid in the parent buffer.
The Band parameter can be set to one of the following values:
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies all color bands (for RGB, HSL, HSV, and YUV parent buffers). That is, M_ALL_BANDS allocates a child buffer with the same number of bands as the parent buffer. (summarize)Specifies all color bands (for RGB, HSL, HSV, and YUV parent buffers). (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the blue color band (for RGB parent buffers). |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the green color band (for RGB parent buffers). |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the hue band (for HSL and HSV parent buffers). |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the luminance band (for HSL parent buffers). |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the red color band (for RGB parent buffers). |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the saturation band (for HSL and HSV parent buffers). |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the U band (for YUV parent buffers). Note that the dimensions of the child buffer must not exceed the dimensions of the U band of the parent. (summarize)Specifies the U band (for YUV parent buffers). (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the V band (for YUV and HSV parent buffers). Note that the dimensions of the child buffer must not exceed the dimensions of the V band of the parent. (summarize)Specifies the V band (for YUV and HSV parent buffers). (more details...) |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the Y band (for YUV parent buffers). |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the index of the band to use. The relationship between index value and band for RGB, HSL, HSV, and YUV buffers is the following:
Specifies the index of the band to use. (more details...) |
Specifies the horizontal 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.
Header | Include mil.h. |
Library | Use mil.lib. |
DLL | Requires mil.dll. |