This function allocates a band or multi-band child data buffer within the specified, previously allocated, parent data buffer. It selects one or all of the bands of the parent data buffer and allocates the band or bands as a child of that buffer. The parent buffer can be a single band or multiband buffer, and the child buffer can encompass the entire parent 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.
The child buffer is considered a data buffer in its own right. It can be any band or all bands of its parent buffer, 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 within a parent buffer which contains an ROI, set using MbufSetRegion(), the child buffer inherits a copy of 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.
If the child buffer is allocated using a parent buffer that is associated with a calibration context, the child buffer will obtain a copy of the calibration information.
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.
Specifies the band or bands of the parent data buffer from which to allocate the child data buffer. The specified band or bands should be valid in the parent buffer.
The Band parameter can be set to one of the values below.
![]() |
|||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Description | ||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies all the bands of the parent buffer. It can be RGB, HSL, HSV, YUV, or a 1-band buffer depending on the color space of the parent buffer. It is useful to create a new full size buffer (a buffer with the same size as the parent, even if the parent is another child buffer) when you have more than one ROI or fixture and you want to add or disable them to the source buffer. Note that you should typically select this value if the parent buffer is a monochrome buffer. (summarize)Specifies all the bands of the parent buffer. (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). |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
Specifies the V band (for YUV and HSV parent buffers). |
||||||||||||||||||||||||||||||||||||||
![]() ![]() |
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:
Note that this value must be set to zero if the parent buffer is a monochrome. (summarize)Specifies the index of the band to use. (more details...) |
Header | Include mil.h. |
Library | Use mil.lib. |
DLL | Requires mil.dll. |