You can grab 3D data from a 3D sensor using functions from the Mdig...() module. In most respects, grabbing 3D data from a 3D sensor is similar to grabbing images from a standard camera (as described in Chapter 25: Grabbing with your digitizer). However, to work with 3D data in MIL, you need a container.
Typically, if your 3D sensor transmits 3D data in a format defined by an industry standard (such as GigE Vision or GenICam), you can grab directly into a container (previously allocated using MbufAllocContainer()). For more information, see the Working with compliant cameras section later in this chapter.
For 3D sensors that do not transmit data suitable for grabbing into a container, you must grab that data into a buffer (or grab the data using a third-party SDK and create a buffer on its memory), and manually prepare it for use with MIL by putting the data in the components of a container. For more information, see the Working with non-compliant cameras section later in this chapter.
In most cases, you will need to convert grabbed 3D data using MbufConvert3d() before using it with other MIL functions. For more information, see the Preparing a container for display or processing section of Chapter 35: 3D Containers.