| MIL 10 Reference
| Customize Help
| Save Settings

M3dmapClear



See also
Availability
Not available in MIL-Lite
Available in MIL

Available on Windows
Available on Linux

Available on Non-Matrox computer
Available on Matrox 4Sight-X
Available on Matrox 4Sight GP
Available on Matrox Supersight
function map Function map
Examples
Synopsis
Clear a 3D reconstruction result buffer of some or all of its content.
Syntax
void M3dmapClear(
MIL_ID Result3dmapId, //in
MIL_INT LabelOrIndex, //in
MIL_INT64 Operation, //in
MIL_INT64 ControlFlag //in
)
Description

This function allows you to clear or delete the laser line data from a 3D reconstruction result buffer without having to free and reallocate the buffer.

For M_POINT_CLOUD_CONTAINER result buffers, you can clear a point cloud of its points while keeping a record of the ongoing conveyor movement with M_CLEAR. You can also delete a point cloud, which deletes its points, deletes its record of ongoing conveyor movement, and frees its label, with M_DELETE. Note that when you clear or delete a point cloud, the relative coordinate system and some other control value information remain in the M_POINT_CLOUD_CONTAINER result buffer.

For M_DEPTH_CORRECTED_DATA result buffers, you can clear the entire result buffer of all laser data using M_CLEAR. The result buffer still retains some control value information.

During calibration of the 3D reconstruction setup, you can remove the last scan added to the M_LASER_CALIBRATION_DATA result buffer, for instance because you know the last scan was in error, using M_REMOVE_LAST_SCAN.

When in cumulative extraction mode (M3dmapControl() with M_EXTRACTION_CUMULATIVE), you use M3dmapClear() with M_CLEAR to clear content from a M_POINT_CLOUD_CONTAINER result buffer. You must clear the result buffer after writing in the depth map using M3dmapExtract() and before adding new data to the result buffer using M3dmapAddScan().

Unlike most other functions that modify a MIL object, you can call this function concurrently from multiple threads on the same M_POINT_CLOUD_CONTAINER result buffer (Result3dmapId) without using a M_MUTEX object. This is valid as long as the LabelOrIndex parameter of the concurrent calls is set to a different index, and is not set to M_ALL.

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 if there is complementary information.
Parameters
This function is not supported on the selected boards.
Parameters
Result3dmapId

Specifies the identifier of the 3D reconstruction result buffer to clear. The 3D reconstruction result buffer must have been previously allocated using M3dmapAllocResult() with M_POINT_CLOUD_CONTAINER, M_LASER_CALIBRATION_DATA, or M_DEPTH_CORRECTED_DATA. Any other type of 3D reconstruction result buffer will cause an error.

LabelOrIndex

Specifies the point cloud(s) in the specified 3D reconstruction result buffer. Only 3D reconstruction result buffers of type M_POINT_CLOUD_CONTAINER have point clouds that can be specified using this parameter. For all other types of 3D reconstruction result buffers, set this parameter to M_DEFAULT.

function map For specifying a point cloud
CollapseValue Description
Collapse M_DEFAULT

Same as M_ALL.

Collapse

Specifies the index of a point cloud in the specified 3D reconstruction result buffer.

(summarize)
Parameters

Specifies the index of an existing point cloud.

Collapse

Specifies the label for a point cloud in the specified 3D reconstruction result buffer.

(summarize)
Parameters

Specifies the label of an existing point cloud.

Collapse M_ALL

Specifies all point clouds in the specified 3D reconstruction result buffer.

Operation

Specifies the operation to perform. This parameter must be set to one of the following:

function map For specifying the operation to perform
CollapseValue Description
Collapse M_CLEAR

Clears laser line data from a 3D reconstruction result buffer.

For a M_POINT_CLOUD_CONTAINER result buffer, this clears all the points in the specified point cloud, while maintaining the Y-axis displacement (ongoing conveyor movement) since the first call to M3dmapAddScan(). The relative coordinate system associated with the M_POINT_CLOUD_CONTAINER result buffer, along with some control values, remain in the result buffer.

For a M_DEPTH_CORRECTED_DATA result buffer, this clears all laser line data, although some control values remain. Note that result buffers of type M_DEPTH_CORRECTED_DATA do not have a relative coordinate system.

For a M_POINT_CLOUD_CONTAINER result buffer, this operation is useful if you know that the total laser line data exceeds available memory and you want to gradually add data to a depth map or intensity map image buffer using cumulative extraction mode (M3dmapControl() with M_EXTRACTION_CUMULATIVE enabled).

(summarize)
Collapse M_DELETE

Deletes one (or all) point cloud(s) from the collection of point clouds in a M_POINT_CLOUD_CONTAINER result buffer. This deletes the points in the point cloud, the Y-axis displacement, and the point cloud label of the point cloud. You can create a new point cloud using this freed label.

(summarize)
Collapse M_REMOVE_LAST_SCAN

Discards the most recent scan added to the result buffer. This is available only for M_LASER_CALIBRATION_DATA result buffers. This operation is useful during the calibration phase if you know that the quality of the most recent scan added to the result buffer is not good enough for an accurate calibration.

(summarize)
ControlFlag

Reserved for future expansion and must be set to M_DEFAULT.

Compilation information
Header Include mil.h.
Library Use mil.lib; mil3dmap.lib.
DLL Requires mil.dll; mil3dmap.dll.
DEFAULT ALL CLEAR DELETE REMOVE LAST SCAN