| Customize Help
| Save Settings

MbufChildContainer



Function Map
Synopsis
Allocate a child container.
Syntax
MIL_ID MbufChildContainer(
MIL_ID ParentContainerBufId, //in
MIL_INT ComponentCriteriaSize, //in
const MIL_INT64 *ComponentCriteriaArrayPtr, //in
MIL_INT64 ControlFlag, //in
MIL_ID *ContainerBufIdPtr //out
)
Description

This function allocates a child container that behaves as though it contains components of the specified, previously allocated container. Which components are in the child container is determined dynamically by filtering the contents of the parent container using the specified criteria. Whenever the parent container is modified, MIL determines the current contents of the child container.

For example, child containers are useful for working with 3D sensors that transmit multiple sets of components. If your 3D sensor transmits 3 range and confidence components with different group IDs in a single grab, you can create a child container of the grab container with the criteria M_COMPONENT_BY_GROUP_ID(); this allocates a child container that only has the range and confidence components of a single group. Each time you grab into the parent container, the child container will be updated with the components of that group (even if components were reallocated). You can pass this child container as a source to MbufConvert3d().

You can create multiple child containers of a single parent container. You can also create a child container of a child container.

To allocate a child container, you must pass an array of criteria to ComponentCriteriaArrayPtr. If you set ControlFlag to M_ANY_CRITERIA, the child container will contain the components of the parent container which meet at least one of the criteria. If you set ControlFlag to M_ALL_CRITERIA, the child container will only contain the components of the parent container that meet all of the specified criteria. Once you have allocated the child container, you cannot change these criteria. To remove a component from the child container, you can either free the component from the parent container (using MbufFreeComponent()) or allocate a child container of the child container that has additional criteria. To add a component to the child container, you must allocate a new component for the parent container (using MbufAllocComponent()) that meets the existing criteria.

A component of a child container is not allocated in its own memory space; it remains a component of the parent container. Therefore, any modification to a component in the child container affects that component in the parent and vice versa.

A child container is considered a container in its own right, and can be used in some of the same circumstances as its parent container. You cannot directly allocate or free components of a child container. A child container therefore cannot be passed as a destination for a grab, copy, or processing function; it can, however, be passed as a source to relevant functions.

A child container inherits its attributes (such as M_DISP) from the parent container.

When a child container is no longer required, it can be released using MbufFree(). Before a container can be freed, all of its child containers must also be freed.

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

Specifies the identifier of the parent container.

ComponentCriteriaSize

Specifies the number of elements in the array of criteria that will be applied to the parent container.

ComponentCriteriaArrayPtr
Accepts the address of one of the following:
  • array of type MIL_INT64 [optionally, in C++: a reference to a constant std::vector<MIL_INT64> ] (and a maximum array rank for C# of 1)
    Required array size:(ComponentCriteriaSize)

Specifies the address of an array of criteria that will be used to determine which components from the parent container to make part of the child container.

These settings can be used to include a single component that can be uniquely identified.

function map For specifying which component to include in the child container using a uniquely identifying criterion
Click to summarizeValue Description
Click to summarize

Specifies the component with the specified MIL identifier.

(summarize)
Parameters

Specifies the MIL identifier of the component.

Click to summarize

Specifies the component with the specified index in the container.

(summarize)
Parameters

Specifies the index of the component.

These settings can be used to include one or more components that can be identified by a generalized criterion.

function map For specifying which components to include in the child container using a generalized criterion
Click to summarizeValue Description
Click to summarize

Specifies that the component(s) have the specified group ID. The group ID of a component can be inquired using MbufInquireContainer() with M_COMPONENT_GROUP_ID.

(summarize)
Parameters

Specifies the group ID.

Click to summarize

Specifies that the component(s) have the specified region ID. The region ID of a component can be inquired using MbufInquireContainer() with M_COMPONENT_REGION_ID.

(summarize)
Parameters

Specifies the region ID.

Click to summarize

Specifies that the component(s) have the specified source ID. The source ID of a component can be inquired using MbufInquireContainer() with M_COMPONENT_SOURCE_ID.

(summarize)
Parameters

Specifies the source ID.

These settings can be used to include one or more components with the specified component type.

function map For specifying the component type selection criteria
Click to summarizeValue Description
Click to summarize M_COMPONENT_CONFIDENCE

Specifies the components that store confidence information for a M_COMPONENT_RANGE or M_COMPONENT_DISPARITY component of the container. INFO

Click to summarize M_COMPONENT_CUSTOM + n

Specifies the components that have a custom component type , identified by n, where n can be a value between 0 and 254. INFO

Click to summarize M_COMPONENT_DISPARITY

Specifies the components that store a disparity map. INFO

Click to summarize M_COMPONENT_INFRARED

Specifies the components that store an intensity image of infrared light. INFO

Click to summarize M_COMPONENT_INTENSITY

Specifies the components that store an intensity image of visible light. INFO

Click to summarize M_COMPONENT_MESH_MIL

Specifies the components that store mesh information for a M_COMPONENT_RANGE component of the container. INFO

Click to summarize M_COMPONENT_METADATA

Specifies the components that store metadata information. INFO

Click to summarize M_COMPONENT_MULTISPECTRAL

Specifies the components that store an intensity image where each band represents the intensity of a specific wavelength of light. INFO

Click to summarize M_COMPONENT_NORMALS_MIL

Specifies the components that store normals information for each point in the M_COMPONENT_RANGE component of the container. INFO

Click to summarize M_COMPONENT_RANGE

Specifies the components that store 3D distance/position information. INFO

Click to summarize M_COMPONENT_REFLECTANCE

Specifies the components that store a reflectance map. INFO

Click to summarize M_COMPONENT_SCATTER

Specifies the components that store a scatter map. INFO

Click to summarize M_COMPONENT_ULTRAVIOLET

Specifies the components that store an intensity image of ultraviolet light. INFO

Click to summarize M_COMPONENT_UNDEFINED

Specifies the components that store information of an unknown type. INFO

ControlFlag

Specifies whether to have the child container contain the components that meet at least one of the criteria, or only the components that meet all of the criteria.

function map For specifying whether the child container should contain components that meet any or all of the criteria
Click to summarizeValue Description
Click to summarize M_ALL_CRITERIA

Specifies that the child container will only contain the components of the parent container which meet all of the specified criteria.

Click to summarize M_ANY_CRITERIA

Specifies that the child container will contain the components of the parent container which meet at least one of the specified criteria.

ContainerBufIdPtr

Specifies the address of the variable in which to write the identifier of the child container. Since the MbufChildContainer() function also returns the child buffer identifier, you can set this parameter to M_NULL.

Return value
The returned value is the child container identifier, if successful. If allocation fails, M_NULL is returned.
Compilation information
Header Include mil.h.
Library Use mil.lib.
DLL Requires mil.dll.
COMPONENT CONFIDENCE COMPONENT CUSTOM n COMPONENT DISPARITY COMPONENT INFRARED COMPONENT INTENSITY COMPONENT MESH MIL COMPONENT METADATA COMPONENT MULTISPECTRAL COMPONENT NORMALS MIL COMPONENT RANGE COMPONENT REFLECTANCE COMPONENT SCATTER COMPONENT ULTRAVIOLET COMPONENT UNDEFINED ALL CRITERIA ANY CRITERIA M_COMPONENT_CUSTOM + n