| Customize Help
| Save Settings

M3dmapClear



Function Map
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_RESULT 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_RESULT 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.

Unlike most other functions that modify a MIL object, you can call this function concurrently from multiple threads on the same M_POINT_CLOUD_RESULT 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 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
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_RESULT, 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_RESULT 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
Click to summarizeValue Description
Click to summarize M_DEFAULT

Same as M_ALL.

Click to summarize

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

(summarize)
Parameters

Specifies the index of an existing point cloud.

Click to summarize

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

(summarize)
Parameters

Specifies the label of an existing point cloud.

Click to summarize 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
Click to summarizeValue Description
Click to summarize M_CLEAR

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

For a M_POINT_CLOUD_RESULT 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_RESULT 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.

(summarize)
Click to summarize M_DELETE

Deletes one (or all) point cloud(s) from the collection of point clouds in a M_POINT_CLOUD_RESULT 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)
Click to summarize 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 3D reconstruction 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