MIL_ID Result3dmetId,  //in 
MIL_INT64 ResultType,  //in 
void *ResultArrayPtr  //out 
This function retrieves the result(s) of the specified type from a 3D metrology result buffer. Results are available for fit 3D metrology result buffers after calling M3dmetFit(), and results are available for statistics 3D metrology result buffers after calling M3dmetStat().
Specifies the identifier of a fit 3D metrology result buffer or statistics 3D metrology result buffer, from which to retrieve results.
Specifies the type of result to retrieve.
See the Parameter associations section for possible values that can be specified.
Specifies the address in which to write the results. Since the M3dmetGetResult() function also returns the results, you can set this parameter to M_NULL.
See the Parameter associations section for possible values that can be returned.
The tables below list possible values for the ResultType parameter and possible values returned to the ResultArrayPtr parameter.
To retrieve a result from an fit 3D metrology result buffer, the ResultType parameter can be set to one of the following values:
For retrieving results from a fit 3D metrology result
buffer



Description  
ResultArrayPtr  Possible values returned 

M_AXIS_X + 
Retrieves the Xcomponent of the fitted 3D geometry's unit vector. 

ResultArrayPtr extra info 
Data type info: Data
type: address of a
MIL_DOUBLE


1.0 >= Value >= 1.0 
Specifies the Xcomponent of the unit vector, expressed in the working coordinate system. 

M_AXIS_Y + 
Retrieves the Ycomponent of the fitted 3D geometry's unit vector. 

ResultArrayPtr extra info 
Data type info: Data
type: address of a
MIL_DOUBLE


1.0 >= Value >= 1.0 
Specifies the Ycomponent of the unit vector, expressed in the working coordinate system. 

M_AXIS_Z + 
Retrieves the Zcomponent of the fitted 3D geometry's unit vector. 

ResultArrayPtr extra info 
Data type info: Data
type: address of a
MIL_DOUBLE


1.0 >= Value >= 1.0 
Specifies the Zcomponent of the unit vector, expressed in the working coordinate system. 

M_CENTER_X + 
Retrieves the Xcoordinate of the center point of the fitted 3D geometry, expressed in the working coordinate system. 

ResultArrayPtr extra info 
Data type info: Data
type: address of a
MIL_DOUBLE


M_CENTER_Y + 
Retrieves the Ycoordinate of the center point of the fitted 3D geometry expressed in the working coordinate system. 

ResultArrayPtr extra info 
Data type info: Data
type: address of a
MIL_DOUBLE


M_CENTER_Z + 
Retrieves the Zcoordinate of the center point of the fitted 3D geometry, expressed in the working coordinate system. 

ResultArrayPtr extra info 
Data type info: Data
type: address of a
MIL_DOUBLE


M_CLOSEST_TO_ORIGIN_X + 
Retrieves the Xcoordinate of the point on the fitted 3D plane geometry, closest to the origin of the working coordinate system. 

ResultArrayPtr extra info 
Data type info: Data
type: address of a
MIL_DOUBLE


M_CLOSEST_TO_ORIGIN_Y + 
Retrieves the Ycoordinate of the point on the fitted 3D plane geometry, closest to the origin of the working coordinate system. 

ResultArrayPtr extra info 
Data type info: Data
type: address of a
MIL_DOUBLE


M_CLOSEST_TO_ORIGIN_Z + 
Retrieves the Zcoordinate of the point on the fitted 3D plane geometry, closest to the origin of the working coordinate system. 

ResultArrayPtr extra info 
Data type info: Data
type: address of a
MIL_DOUBLE


M_COEFFICIENT_A + 
Retrieves the coefficient A of the fitted 3D plane geometry's equation, Ax + By + Cz + D = 0. 

ResultArrayPtr extra info 
Data type info: Data
type: address of a
MIL_DOUBLE


1.0 >= Value >= 1.0 
Specifies the coefficient A. 

M_COEFFICIENT_B + 
Retrieves the coefficient B of the fitted 3D plane geometry's equation, Ax + By + Cz + D = 0. 

ResultArrayPtr extra info 
Data type info: Data
type: address of a
MIL_DOUBLE


1.0 >= Value >= 1.0 
Specifies the coefficient B. 

M_COEFFICIENT_C + 
Retrieves the coefficient C of the fitted 3D plane geometry's equation, Ax + By + Cz + D = 0. 

ResultArrayPtr extra info 
Data type info: Data
type: address of a
MIL_DOUBLE


1.0 >= Value >= 1.0 
Specifies the coefficient C. 

M_COEFFICIENT_D + 
Retrieves the coefficient D of the fitted 3D plane geometry's equation, Ax + By + Cz + D = 0. 

ResultArrayPtr extra info 
Data type info: Data
type: address of a
MIL_DOUBLE


Value 
Specifies the coefficient D. 

M_END_POINT_X + 
Retrieves the Xcoordinate of the end point of the fitted 3D geometry, expressed in the working coordinate system. 

ResultArrayPtr extra info 
Data type info: Data
type: address of a
MIL_DOUBLE


M_END_POINT_Y + 
Retrieves the Ycoordinate of the end point of the fitted 3D geometry, expressed in the working coordinate system. 

ResultArrayPtr extra info 
Data type info: Data
type: address of a
MIL_DOUBLE


M_END_POINT_Z + 
Retrieves the Zcoordinate of the end point of the fitted 3D geometry, expressed in the working coordinate system. 

ResultArrayPtr extra info 
Data type info: Data
type: address of a
MIL_DOUBLE


M_FIT_RMS_ERROR + 
Retrieves the rootmeansquared (RMS) error of the distance between the point cloud or depth map, and the fitted 3D geometry. 

ResultArrayPtr extra info 
Data type info: Data
type: address of a
MIL_DOUBLE


M_GEOMETRY_TYPE + 
Retrieves the type of the fitted 3D geometry. 

ResultArrayPtr extra info 
Data type info: Data
type: address of a MIL_INT


M_CYLINDER 
Specifies a cylinder. 

M_LINE 
Specifies a line. 

M_PLANE 
Specifies a plane. 

M_SPHERE 
Specifies a sphere. 

M_LENGTH + 
Retrieves the length of the fitted 3D cylinder geometry, or fitted 3D line geometry, in world units. 

ResultArrayPtr extra info 
Data type info: Data
type: address of a
MIL_DOUBLE


M_NORMAL_X + 
Retrieves the Xcomponent of the fitted 3D plane geometry's normal unit vector. 

ResultArrayPtr extra info 
Data type info: Data
type: address of a
MIL_DOUBLE


1.0 >= Value >= 1.0 
Specifies the Xcomponent of the normal unit vector, expressed in the working coordinate system. 

M_NORMAL_Y + 
Retrieves the Ycomponent of the fitted 3D plane geometry's normal unit vector. 

ResultArrayPtr extra info 
Data type info: Data
type: address of a
MIL_DOUBLE


1.0 >= Value >= 1.0 
Specifies the Ycomponent of the normal unit vector, expressed in the working coordinate system. 

M_NORMAL_Z + 
Retrieves the Zcomponent of the fitted 3D plane geometry's normal unit vector. 

ResultArrayPtr extra info 
Data type info: Data
type: address of a
MIL_DOUBLE


1.0 >= Value >= 1.0 
Specifies the Zcomponent of the normal unit vector, expressed in the working coordinate system. 

M_NUMBER_OF_POINTS_INLIERS + 
Retrieves the number of points that were considered inliers during the fit operation. 

ResultArrayPtr extra info 
Data type info: Data
type: address of a MIL_INT


M_NUMBER_OF_POINTS_MISSING_DATA + 
Retrieves the number of points with zero confidence (if you specified a container), or the number of points with an invalid value (if you specified a depth map). 

ResultArrayPtr extra info 
Data type info: Data
type: address of a MIL_INT


M_NUMBER_OF_POINTS_OUTLIERS + 
Retrieves the number of points that were considered outliers during the fit operation. 

ResultArrayPtr extra info 
Data type info: Data
type: address of a MIL_INT


M_NUMBER_OF_POINTS_TOTAL + 
Retrieves the total number of points. 

ResultArrayPtr extra info 
Data type info: Data
type: address of a MIL_INT


M_NUMBER_OF_POINTS_VALID + 
Retrieves the number of valid points, which is equal to the number of points with nonzero confidence. 

ResultArrayPtr extra info 
Data type info: Data
type: address of a MIL_INT


M_RADIUS + 
Retrieves the radius of the fitted 3D cylinder geometry or 3D sphere geometry in world units. 

ResultArrayPtr extra info 
Data type info: Data
type: address of a
MIL_DOUBLE


M_START_POINT_X + 
Retrieves the Xcoordinate of the fitted 3D geometry's start point, expressed in the working coordinate system. 

ResultArrayPtr extra info 
Data type info: Data
type: address of a
MIL_DOUBLE


M_START_POINT_Y + 
Retrieves the Ycoordinate of the fitted 3D geometry's start point, expressed in the working coordinate system. 

ResultArrayPtr extra info 
Data type info: Data
type: address of a
MIL_DOUBLE


M_START_POINT_Z + 
Retrieves the Zcoordinate of the fitted 3D geometry's start point, expressed in the working coordinate system. 

ResultArrayPtr extra info 
Data type info: Data
type: address of a
MIL_DOUBLE


M_STATUS + 
Retrieves the status of the fit operation. 

ResultArrayPtr extra info 
Data type info: Data
type: address of a MIL_INT


M_ALL_POINTS_COPLANAR 
Specifies that the fit failed because the fit operation tried to fit a sphere, or cylinder, to points that are coplanar. 

M_BAD_ESTIMATE 
Specifies that the fit failed because the initial fit estimate did not include any valid inliers. 

M_NOT_ENOUGH_VALID_DATA 
Specifies that the fit failed because there were not enough valid points to fit the specified 3D geometry. 

M_NOT_INITIALIZED 
Specifies that the fit 3D metrology result buffer was not used in a call to M3dmetFit(), and contains no results. 

M_SUCCESS 
Specifies that the fit operation completed successfully. 
To retrieve a result from an statistics 3D metrology result buffer, the ResultType parameter can be set to one of the following values:
For retrieving results from a statistics 3D metrology
result buffer


ResultType  Description  
ResultArrayPtr  Possible values returned 

M_STAT_MAX + 
Retrieves the maximum distance between the point cloud or depth map, and the reference 3D geometry. 

ResultArrayPtr extra info 
Data type info: Data
type: address of a
MIL_DOUBLE


M_STAT_MAX_ABS + 
Retrieves the maximum absolute distance between the point cloud or depth map, and the reference 3D geometry. 

ResultArrayPtr extra info 
Data type info: Data
type: address of a
MIL_DOUBLE


M_STAT_MEAN + 
Retrieves the mean distance between the point cloud or depth map, and the reference 3D geometry. 

ResultArrayPtr extra info 
Data type info: Data
type: address of a
MIL_DOUBLE


M_STAT_MIN + 
Retrieves the minimum distance between the point cloud or depth map, and the reference 3D geometry. 

ResultArrayPtr extra info 
Data type info: Data
type: address of a
MIL_DOUBLE


M_STAT_MIN_ABS + 
Retrieves the minimum absolute distance between the point cloud or depth map, and the reference 3D geometry. 

ResultArrayPtr extra info 
Data type info: Data
type: address of a
MIL_DOUBLE


M_STAT_NUMBER + 
Retrieves the number of points that satisfied the condition specified when M3dmetStat() was called (using the Condition parameter). 

ResultArrayPtr extra info 
Data type info: Data
type: address of a MIL_INT


M_STAT_RMS + 
Retrieves the rootmeansquare (RMS) error between the point cloud or depth map, and the reference 3D geometry object. 

ResultArrayPtr extra info 
Data type info: Data
type: address of a
MIL_DOUBLE


M_STAT_STANDARD_DEVIATION + 
Retrieves the standard deviation of all the distances calculated between the point cloud or depth map, and the reference 3D geometry. 

ResultArrayPtr extra info 
Data type info: Data
type: address of a
MIL_DOUBLE


M_STAT_SUM + 
Retrieves the sum of all the distances calculated between the point cloud or depth map, and the reference 3D geometry. 

ResultArrayPtr extra info 
Data type info: Data
type: address of a
MIL_DOUBLE


M_STAT_SUM_ABS + 
Retrieves the sum of all the absolute distances calculated between the point cloud or depth map, and the reference 3D geometry. 

ResultArrayPtr extra info 
Data type info: Data
type: address of a
MIL_DOUBLE


M_STAT_SUM_OF_SQUARES + 
Retrieves the sum of squared distances between the point cloud or depth map, and the reference 3D geometry. 

ResultArrayPtr extra info 
Data type info: Data
type: address of a
MIL_DOUBLE

You can add the following value to the abovementioned values to determine whether a result is available.
For determining whether results are
available


ResultType  Description  
ResultArrayPtr  Possible values returned 

M_AVAILABLE 
Retrieves whether a result is available to be returned. 

ResultArrayPtr extra info 
Data type info: Data
type: address of a
MIL_DOUBLE


M_NULL 
Specifies that the result is not available to be retrieved. 

Value != 0 
Specifies that the result is available to be retrieved. 
You can add one of the following values to the abovementioned values to cast the requested results to the required data type.
For specifying the data type


ResultType  Description  
ResultArrayPtr  Possible values returned 

M_TYPE_MIL_DOUBLE 
Casts the requested results to a MIL_DOUBLE. 

ResultArrayPtr extra info 
Data type info: Data
type: address of a
MIL_DOUBLE


M_TYPE_MIL_FLOAT 
Casts the requested results to a MIL_FLOAT. 

ResultArrayPtr extra info 
Data type info: Data
type: address of a
MIL_FLOAT


M_TYPE_MIL_INT 
Casts the requested results to a MIL_INT. 

ResultArrayPtr extra info 
Data type info: Data
type: address of a MIL_INT


M_TYPE_MIL_INT32 
Casts the requested results to a MIL_INT32. 

ResultArrayPtr extra info 
Data type info: Data
type: address of a
MIL_INT32


M_TYPE_MIL_INT64 
Casts the requested results to a MIL_INT64. 

ResultArrayPtr extra info 
Data type info: Data
type: address of a
MIL_INT64

Header  Include mil.h. 
Library  Use mil.lib; mil3dmet.lib. 
DLL  Requires mil.dll; mil3dmet.dll. 