MIL_ID Context3dmetId,  //in 
MIL_INT64 ControlType,  //in 
MIL_DOUBLE ControlValue  //in 
This function allows you to control a setting of a 3D metrology context. These settings control the execution of M3dmetFit() and M3dmetStat(). You can typically inquire these settings using M3dmetInquire().
Specifies the identifier of the fit 3D metrology context or statistics 3D metrology context to control. The 3D metrology context must have been previously allocated on the required system using M3dmetAlloc().
Specifies the setting to control.
See the Parameter associations section for possible values that can be specified.
Specifies the value needed for the control.
See the Parameter associations section for possible values that can be specified.
The tables below list possible values for the ControlType and ControlValue parameters.
The following ControlType and ControlValue parameter settings can be specified for statistics 3D metrology contexts, and control which statistics M3dmetStat() calculates.
To control a statistics 3D metrology
context


ControlType  Description  
ControlValue  
M_STAT_MAX 
Sets whether to calculate the maximum distance between the point cloud or depth map, and the specified reference object. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies not to calculate the maximum distance. 

M_ENABLE 
Specifies to calculate the maximum distance. 

M_STAT_MAX_ABS 
Sets whether to calculate the maximum absolute distance between the point cloud or depth map, and the specified reference object. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies not to calculate the maximum absolute distance. 

M_ENABLE 
Specifies to calculate the maximum absolute distance. 

M_STAT_MEAN 
Sets whether to calculate the average distance between the point cloud or depth map, and the specified reference object. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies not to calculate the average distance. 

M_ENABLE 
Specifies to calculate the average distance. 

M_STAT_MIN 
Sets whether to calculate the minimum distance between the point cloud or depth map, and the specified reference object. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies not to calculate the minimum distance. 

M_ENABLE 
Specifies to calculate the minimum distance. 

M_STAT_MIN_ABS 
Sets whether to calculate the minimum absolute distance between the point cloud or depth map, and the specified reference object. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies not to calculate the minimum absolute distance. 

M_ENABLE 
Specifies to calculate the minimum absolute distance. 

M_STAT_NUMBER 
Sets whether to record the number of points that meet the condition specified when calling M3dmetStat() (using the Condition, CondLow and CondHigh parameters). INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies not to record the number of points that meet the specified condition. 

M_ENABLE 
Specifies to record the number of points that meet the specified condition. 

M_STAT_RMS 
Sets whether to calculate the rootmeansquare (RMS) error between the point cloud or depth map, and the specified reference object. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies not to calculate the RMS error. 

M_ENABLE 
Specifies to calculate the RMS error. 

M_STAT_STANDARD_DEVIATION 
Sets whether to calculate the standard deviation of all the distances calculated between the point cloud or depth map, and the specified reference object. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies not to calculate the standard deviation. 

M_ENABLE 
Specifies to calculate the standard deviation. 

M_STAT_SUM 
Sets whether to calculate the sum of all the distances calculated between the point cloud or depth map, and the specified reference object. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies not to calculate the sum of all the distances. 

M_ENABLE 
Specifies to calculate the sum of all the distances. 

M_STAT_SUM_ABS 
Sets whether to calculate the sum of all the absolute distances calculated between the point cloud or depth map, and the specified reference object. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies not to calculate the sum of all absolute distances. 

M_ENABLE 
Specifies to calculate the sum of all absolute distances. 

M_STAT_SUM_OF_SQUARES 
Sets whether to calculate the sum of squared distances between the point cloud or depth map, and the specified reference object. INQ 

M_DEFAULT 
Same as M_DISABLE. 

M_DISABLE 
Specifies not to calculate the sum of squared distances. 

M_ENABLE 
Specifies to calculate the sum of squared distances. 
The following ControlType and ControlValue parameter settings can be specified for a fit 3D metrology context, and control how M3dmetFit() performs the fit operation.
To control a fit 3D metrology context


ControlType  Description  
ControlValue  
M_ESTIMATION_MODE 
Sets how to compute an initial fit estimate between the point cloud or depth map, and the specified reference object. INQ 

M_DEFAULT 
Same as M_RANDOM_SAMPLING. 

M_FROM_GEOMETRY 
Specifies that an initial fit estimate is determined using a geometry object that is copied into the fit 3D metrology context using M3dmetCopy() with M_ESTIMATE_GEOMETRY. 

M_NO_SAMPLING 
Specifies that an initial fit estimate is calculated using all available points in a point cloud or depth map. 

M_RANDOM_SAMPLING 
Specifies that an initial fit estimate is determined using a random sampling consensus (RANSAC) algorithm. 

M_EXPECTED_OUTLIER_PERCENTAGE 
Sets the expected percentage of outliers among the points of the point cloud or depth map to be fitted. INQ 

M_DEFAULT 
Specifies the default value; the default value is 40. 

0.0 < Value < 100.0 
Specifies the expected percentage of outliers among the points of the point cloud or depth map to be fitted. 

M_FIT_ITERATIONS_MAX 
Sets the maximum number of iterations to use during the fit operation. INQ 

M_DEFAULT 
Specifies the default value; the default value is 5. 

Value >= 0 
Specifies the maximum number of iterations to use during the fit operation. 

M_INLIER_AMOUNT_THRESHOLD 
Sets a minimum number of inliers required for the fit operation to end. INQ 

M_DEFAULT 
Same as M_INFINITE. 

M_INFINITE 
Specifies that there is no minimum number of inliers. 

Value >= 0 
Specifies the minimum number of inliers. 

M_RMS_ERROR_THRESHOLD 
Sets the maximum RMS error required for the fit operation to end. INQ 

M_DEFAULT 
Specifies the default value; the default value is 0.0. 

Value >= 0.0 
Specifies the maximum RMS error. 
Parameters
Context3dmetId See Context3dmetId of the main function for a description. ControlType See ControlType of the main function for a description. ControlValue See ControlValue of the main function for a description. 
Parameters
Context3dmetId See Context3dmetId of the main function for a description. ControlType See ControlType of the main function for a description. ControlValue See ControlValue of the main function for a description. 
Header  Include mil.h. 
Library  Use mil.lib; mil3dmet.lib. 
DLL  Requires mil.dll; mil3dmet.dll. 