| MIL 10 Reference
| Customize Help
| Save Settings

M3dmapImport



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
Import a computer-aided design (CAD) file as a new point cloud.
Syntax
void M3dmapImport(
MIL_CONST_TEXT_PTR FileName, //in
MIL_INT64 FileFormat, //in
MIL_ID Result3dmapId, //in
MIL_INT PointCloudLabel, //in
MIL_ID CalibratedMilObjectId, //in
MIL_INT64 ControlFlag //in
)
Description

This function imports a computer-aided design (CAD) file as a new point cloud in a 3D reconstruction result buffer of type M_POINT_CLOUD_CONTAINER. This function only supports the PLY file format; the function takes into account only 3 position coordinates per point, and optionally a fourth coordinate for intensity. All other information contained is ignored.

In addition to specifying the result buffer in which to import the CAD file, you must specify a label for the point cloud. A result buffer of type M_POINT_CLOUD_CONTAINER can hold many distinct point clouds of any type.

Point clouds that are imported into a result buffer using this function are of type M_UNORGANIZED.

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 PointCloudLabel parameter of the concurrent calls is set to a different index.

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
FileName

Specifies the name and path of the file from which to import the point cloud. The function handles (internally) the opening and closing of the file.

function map For specifying the file name and path
CollapseValue Description
Collapse MIL_TEXT("FileName") 1

Specifies the drive, directory, and name of the file, for example, "C:\mydirectory\myfile".

To specify a file on a remote computer (under Distributed MIL), prefix the specified file name string with "remote:///" (for example, "remote:///C:\mydirectory\myfile").

(summarize)

1 If you are passing the value in a variable, don't enclose it in MIL_TEXT().

FileFormat

Specifies the file format of the file to import.

function map For specifying the file format
CollapseValue Description
Collapse M_PLY

Specifies to import a PLY file into a new point cloud.

Result3dmapId

Specifies the identifier of the 3D reconstruction result buffer, allocated using M3dmapAllocResult(), into which to import the CAD file information. Note that you can only import CAD file information into 3D reconstruction result buffers of type M_POINT_CLOUD_CONTAINER.

PointCloudLabel

Specifies a label for the point cloud in the specified result buffer into which the CAD file information is imported.

function map For specifying the label of a point cloud
CollapseValue Description
Collapse

Specifies a label for the new point cloud.

(summarize)
Parameters

Specifies a unique positive integer value to use as a label.

CalibratedMilObjectId

Specifies a calibrated MIL object whose relative coordinate system is used to interpret the given 3D points. Typically, calibration contexts are associated with images and digitizers; however, many other MIL objects can also be associated with calibration contexts. For more on how calibration information is stored and associated with other MIL objects, see the Propagating calibration information after performing a geometric operation section of Chapter 25: Calibrating your camera setup.

The specified calibrated object must be associated with a calibration context that was allocated using McalAlloc() with M_3D_ROBOTICS or M_TSAI_BASED.

Set this parameter to M_NULL to consider the relative coordinate system the same as the absolute coordinate system.

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.
PLY 3D ROBOTICS TSAI BASED