| Customize Help

3D containers overview

A container is a MIL object that can contain buffers, called its components. Containers are used in MIL to hold information for a single 3D scene, whereby each component stores a different piece of information of that 3D scene. In this case it is called a 3D container. For example, a 3D-processable point cloud container contains a range component (which stores the XYZ-coordinates of each point), a confidence component (which stores the validity of each point), and might also contain an intensity component (which stores the intensity or color of each point). Containers should be used as a destination when grabbing from 3D sensors or importing 3D data, and containers with the appropriate components can be displayed and processed using MIL's 3D functions.

You can allocate a container using MbufAllocContainer(). Typically, you will not need to manually allocate or free components for a container; they will be allocated and freed automatically when the container is used as a destination for a grabbing or 3D processing function. If necessary, you can allocate a component using MbufAllocComponent(), copy a buffer to an existing or new (automatically allocated) component using MbufCopyComponent(), or create a component mapped onto previously allocated memory using MbufCreateComponent().

When allocating a container, you must specify the MIL system on which to allocate it and the attributes it should have (such as M_GRAB). All image buffer components of the container will be allocated with the same attributes.

When a container is no longer required, you should release it using MbufFree().

If a container has components that prevent it from being used as a source for a 3D processing function (for example, because a 3D sensor transmitted multiple range and confidence components during a grab into the container), you can create a child container with only the required components using MbufChildContainer(). The components in a child container are in the same memory as those in its parent container, so any changes made to those components will appear in both containers.

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.