| MikroCAD SDK Library

- Home
- All Types
- Files

All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Functions
MikroCADSDK.h File Reference

## Description

MikroCAD SDK interface description.

Author
  LMI Technologies

Go to the source code of this file.

## Functions
MC3D_EXPORT bool __cdecl | MikroCAD_AdditionalAdjustmentsExists ()
| Additional adjustment exists ?
MC3D_EXPORT AdditionalAdjustmentItem *__cdecl | MikroCAD_AdditionalAdjustmentsGetItem (char *pszID)
| Get pointer of an item from list. More...
MC3D_EXPORT bool __cdecl | MikroCAD_AdditionalAdjustmentsItemExists (char *pszID)
| A specified item exists ? More...
MC3D_EXPORT long __cdecl | MikroCAD_AdditionalAdjustmentsRead ()
| Read data from scanner. More...
MC3D_EXPORT bool __cdecl | MikroCAD_AdditionalAdjustmentsSetItem (char *pszID, unsigned long dwDataSize, unsigned char *pbyData=NULL)
| Set data for a new or existing item. More...
MC3D_EXPORT long __cdecl | MikroCAD_AdditionalAdjustmentsWrite ()
| Write data to scanner. More...
MC3D_EXPORT bool __cdecl | MikroCAD_CalibrationOnSensor (unsigned long dwSensorNo, CalibrationMode CalMode)
| Is there any calibration on sensor (Sensor mustn't be initialized) More...
MC3D_EXPORT long __cdecl | MikroCAD_CalibrationToSensor ()
| Calibration data transfer to sensor. More...
MC3D_EXPORT unsigned char *__cdecl | MikroCAD_CameraImagePtr ()
| Returns a pointer to camera image data (texture) or NULL if not available. More...
MC3D_EXPORT unsigned char *__cdecl | MikroCAD_CameraRawImagePtr ()
| Returns a pointer to camera image data (raw data) or NULL if not available. More...
MC3D_EXPORT void __cdecl | MikroCAD_Deinitialize ()
| Deinitialize the measurement module.
MC3D_EXPORT void __cdecl | MikroCAD_DeinitializeStaticLib ()
| Deinitializes global library. More...
MC3D_EXPORT void __cdecl | MikroCAD_DeleteUserDataFile (char *pszDataFileName)
| Deletes a user data file on the scanner. More...
MC3D_EXPORT void __cdecl | MikroCAD_EnableUserDefinedParameterSet (bool bEnabled)
| Enable / disable user defined parameter ? More...
MC3D_EXPORT short *__cdecl | MikroCAD_GetCalibrationResultData ()
| Returns a pointer to result data.
MC3D_EXPORT unsigned long __cdecl | MikroCAD_GetCalibrationState ()
| Returns the calibration state. More...
MC3D_EXPORT long __cdecl | MikroCAD_GetCameraImage24 (unsigned char *pbyImage, unsigned long dwAverage=1)
| Gets a camera image (Color) More...
MC3D_EXPORT long __cdecl | MikroCAD_GetCameraImage8 (unsigned char *pbyImage, unsigned long dwAverage=1)
| Gets a camera image (Black / White) More...
MC3D_EXPORT long __cdecl | MikroCAD_GetCameraImageROI8 (unsigned char *pbyImage, long lX0, long lY0, long lX1, long lY1, bool bFullImage=false)
| Gets a camera image in a ROI - 8 bit (Black / White) More...
MC3D_EXPORT CalibrationMode __cdecl | MikroCAD_GetCurrentCalibrationMode ()
| Reads the current calibration mode. More...
MC3D_EXPORT char *__cdecl | MikroCAD_GetCurrentMeasurementProgram ()
| Get current measurement program ("" - Default measurement program) More...
MC3D_EXPORT long __cdecl | MikroCAD_GetCurrentMeasurementProgramIndex ()
| Get current measurement program index (< 0 - Default measurement program) More...
MC3D_EXPORT char *__cdecl | MikroCAD_GetDefaultMeasProgramName ()
| Which measuring program is identical to the default measuring program. More...
MC3D_EXPORT MikroCADEventItem *__cdecl | MikroCAD_GetEvent ()
| Return the last event for the queue.
MC3D_EXPORT SensorEventType __cdecl | MikroCAD_GetEventType (long lIndex)
| Returns the sensor event type. More...
MC3D_EXPORT long __cdecl | MikroCAD_GetFloatParameter (MeasurementParameterID ParameterID, double &dParameter)
| Read float parameter. More...
MC3D_EXPORT long __cdecl | MikroCAD_GetFloatParameterLimits (MeasurementParameterID ParameterID, double &dMinParameter, double &dMaxParameter)
| Read float parameter limits. More...
MC3D_EXPORT long __cdecl | MikroCAD_GetIntegerParameter (MeasurementParameterID ParameterID, long &lParameter)
| Read integer parameter. More...
MC3D_EXPORT long __cdecl | MikroCAD_GetIntegerParameterLimits (MeasurementParameterID ParameterID, long &lMinParameter, long &lMaxParameter)
| Read integer parameter limits. More...
MC3D_EXPORT CMeasProgramSet *__cdecl | MikroCAD_GetMeasProgramSetPtr ()
| Returns a pointer to the measuring program set object. More...
MC3D_EXPORT void __cdecl | MikroCAD_GetModuleVersionInfo (unsigned long &dwModuleVersion, unsigned long &dwInterfaceVersion)
| Returns version infos (no connection with the sensor necessary) More...
MC3D_EXPORT unsigned long __cdecl | MikroCAD_GetMultiLevelCalibrationBufferSize ()
| Get multi level calibration parameters buffer size. More...
MC3D_EXPORT bool __cdecl | MikroCAD_GetMultiLevelCalibrationParameter (unsigned char *pbyData)
| Load the multi level calibration parameters and transfer this in a byte buffer. More...
MC3D_EXPORT unsigned long __cdecl | MikroCAD_GetNumAvailableEventTypes ()
| Returns the number of the available event types. More...
MC3D_EXPORT unsigned long __cdecl | MikroCAD_GetNumConnectedSensorModules ()
| Returns the number of the connected sensor modules.
MC3D_EXPORT long __cdecl | MikroCAD_GetNumGrooveCalibrations ()
| Gets the number of grove calibrations.
MC3D_EXPORT unsigned long __cdecl | MikroCAD_GetNumPredefinedMeasParameterSets ()
| Returns the number of predefined measurement parameter sets. More...
MC3D_EXPORT char *__cdecl | MikroCAD_GetPredefinedMeasParameterSetName (unsigned long dwIndex)
| Returns the name of a predefined measurement parameter sets. More...
MC3D_EXPORT ProjectorLampState __cdecl | MikroCAD_GetProjectorLampState ()
| Returns the projector lamp state. More...
MC3D_EXPORT unsigned char __cdecl | MikroCAD_GetSensorModuleInfo (unsigned long dwIndex, unsigned long &dwModuleVersion, unsigned long &dwFirmwareVersion, unsigned long &dwInterfaceVersion, SensorTypeID &SensorType)
| Returns sensor infos of a connected sensor module. More...
MC3D_EXPORT unsigned long __cdecl | MikroCAD_GetSensorSerialNumber (unsigned long dwIndex)
| Returns the serial number of a listed sensor. More...
MC3D_EXPORT unsigned long __cdecl | MikroCAD_GetSensorSerialNumberType (unsigned long dwIndex)
| Returns the serial number of a listed sensor of a special type. More...
MC3D_EXPORT SensorTypeID __cdecl | MikroCAD_GetSensorTypeID ()
| Returns the Sensor type id.
MC3D_EXPORT unsigned long __cdecl | MikroCAD_GetSimpleCalibrationBufferSize ()
| Get simple calibration parameters buffer size. More...
MC3D_EXPORT bool __cdecl | MikroCAD_GetSimpleCalibrationParameter (unsigned char *pbyData)
| Load the simple calibration parameters and transfer this in a byte buffer. More...
MC3D_EXPORT char *__cdecl | MikroCAD_GetUserDataFileDirectoryItem (long lIndex)
| Return a user data file item from directory. More...
MC3D_EXPORT unsigned long __cdecl | MikroCAD_GetUserDataFileSize (char *pszDataFileName)
| Gets the user data file size on the scanner. More...
MC3D_EXPORT long __cdecl | MikroCAD_GridCalibration ()
| Executes a grid calibration. More...
MC3D_EXPORT long __cdecl | MikroCAD_GrooveCalibration (long lIndex)
| Executes a groove calibration. More...
MC3D_EXPORT short *__cdecl | MikroCAD_HeightImagePtr ()
| Returns a pointer to height image data or NULL if not available. More...
MC3D_EXPORT long __cdecl | MikroCAD_Initialize (unsigned long dwSensorNo, SensorOperatingMode OperatingMode=SensorOperatingMode_Measure)
| Initialize the measurement module. More...
MC3D_EXPORT void __cdecl | MikroCAD_InitializeStaticLib ()
| Initializes global library. More...
MC3D_EXPORT bool __cdecl | MikroCAD_IsDataBufferLocked ()
| Is data buffer locked? More...
MC3D_EXPORT unsigned long __cdecl | MikroCAD_ListAllSensors ()
| List all available sensors (Before connection with the sensor) More...
MC3D_EXPORT unsigned long __cdecl | MikroCAD_ListAllSensorsType (SensorTypeID SensorType)
| List all available sensors of a special type (before connection with the sensor) More...
MC3D_EXPORT long __cdecl | MikroCAD_ListSensorDescriptions (SensorTypeID TypeID)
| List all sensor descriptions (only for sensors with separate camera and projector) (Sensor mustn't be initialized!) More...
MC3D_EXPORT long __cdecl | MikroCAD_ListUserDataFileDirectory (char *pszMask)
| List all user data files on scanner (directory) More...
MC3D_EXPORT long __cdecl | MikroCAD_Measure (bool bOnSensor=true)
| Start a measurement and lock the data buffer. More...
MC3D_EXPORT unsigned long __cdecl | MikroCAD_ParameterAvailable (MeasurementParameterID ParameterID)
| Is parameter available. More...
MC3D_EXPORT long __cdecl | MikroCAD_PlaneCalibration ()
| Executes a plane calibration. More...
MC3D_EXPORT short *__cdecl | MikroCAD_PowerSpectrumPtr ()
| Returns a pointer to the power spectrum. More...
MC3D_EXPORT long __cdecl | MikroCAD_ProjectColorValue (unsigned char cRed, unsigned char cGreen, unsigned char cBlue)
| Projects a color value (whole image the same color) More...
MC3D_EXPORT long __cdecl | MikroCAD_ProjectImage24 (unsigned char *pbyImage)
| Projects a color image. More...
MC3D_EXPORT long __cdecl | MikroCAD_ProjectImage8 (unsigned char *pbyImage)
| Projects a black / white image. More...
MC3D_EXPORT long __cdecl | MikroCAD_ProjectPattern (short nPatternIndex)
| Projects a predefined pattern (cross, ...) More...
MC3D_EXPORT long __cdecl | MikroCAD_ProjectStripePattern (short nPatternIndex, bool bInvers)
| Projects a predefined stripe pattern. More...
MC3D_EXPORT long __cdecl | MikroCAD_ProjectValue (unsigned char cValue)
| Projects a gray value (whole image the same color) More...
MC3D_EXPORT long __cdecl | MikroCAD_ReadConfig ()
| Reads the configuration. More...
MC3D_EXPORT long __cdecl | MikroCAD_ReadInitialParameterFromFile (char *pszFileName)
| Reads the initial parameters from file. More...
MC3D_EXPORT long __cdecl | MikroCAD_ReadMeasProgramDataFromFile (char *pszFileName)
| Reads the measurement program data from file. More...
MC3D_EXPORT TSensorDescription *__cdecl | MikroCAD_ReadSensorDescription (long lIndex)
| Reads the sensor description. More...
MC3D_EXPORT bool __cdecl | MikroCAD_ReadUserDataFile (char *pszDataFileName, unsigned char *pbyData)
| Reads a user data file from the scanner. More...
MC3D_EXPORT void __cdecl | MikroCAD_ResetMeasurementArea ()
| Resets the measurement area.
MC3D_EXPORT void __cdecl | MikroCAD_ResetProjectionArea ()
| Resets the projection area.
MC3D_EXPORT long __cdecl | MikroCAD_ResetToFactorySettings (ConfigDataTransferMode Mode)
| Reset the current settings to factory settings. More...
MC3D_EXPORT long __cdecl | MikroCAD_SaveHardwareLogfile (const char *filename)
| Save the hardware log file to the given file name (file will be overwritten!) More...
MC3D_EXPORT long __cdecl | MikroCAD_SelectCurrentMeasurementProgram (char *pszMeasProgName=NULL)
| Selects the current measurement program. More...
MC3D_EXPORT long __cdecl | MikroCAD_SetFloatParameter (MeasurementParameterID ParameterID, double dParameter)
| Write float parameter. More...
MC3D_EXPORT long __cdecl | MikroCAD_SetIntegerParameter (MeasurementParameterID ParameterID, long lParameter)
| Write integer parameter. More...
MC3D_EXPORT void __cdecl | MikroCAD_SetMeasurementArea (double dSizeX, double dSizeY, double dX0, double dY0)
| Sets the measurement area. More...
MC3D_EXPORT void __cdecl | MikroCAD_SetMeasurementAreaMask (unsigned char *pbyMeasArea)
| Sets the measurement area. More...
MC3D_EXPORT void __cdecl | MikroCAD_SetProgramPath (char *pszProgramPath)
| If Path with sensor DLLs is different to calling path, the sensor DLL path must be set. More...
MC3D_EXPORT void __cdecl | MikroCAD_SetProjectionArea (double dSizeX, double dSizeY, double dX0, double dY0)
| Sets the projection area. More...
MC3D_EXPORT void __cdecl | MikroCAD_SetProjectionMask (unsigned char *pbyMask)
| Set projection mask. More...
MC3D_EXPORT bool __cdecl | MikroCAD_SetSimpleCalibrationParameter (unsigned char *pbyData)
| Save the simple calibration parameters from a buffer to the scanner. More...
MC3D_EXPORT long __cdecl | MikroCAD_SetUSBCommErrorHandler (COMM_ERROR funcPtr)
| Register a function to be called when a USB communication error happens. More...
MC3D_EXPORT void __cdecl | MikroCAD_SetUserDefinedParameterSet (long lIndex, long lProjectorBrightness, long lCameraShutter, long lCameraGain)
| Set user defined parameter set. More...
MC3D_EXPORT void __cdecl | MikroCAD_StartSensorEvent ()
| Start an event function. More...
MC3D_EXPORT void __cdecl | MikroCAD_StopSensorEvent ()
| Unregisters all event functions.
MC3D_EXPORT void __cdecl | MikroCAD_SwitchOnOffProjectorLamp (bool bOn)
| Switch on/off the projector lamp. More...
MC3D_EXPORT bool __cdecl | MikroCAD_SwitchOnOffProjectorLampAvailable ()
| Is projector lamp switch on / off available? More...
MC3D_EXPORT void __cdecl | MikroCAD_UnlockCalibrationDataBuffer ()
| Unlock the calibration data buffer.
MC3D_EXPORT void __cdecl | MikroCAD_UnlockDataBuffer ()
| Unlocks the data buffer.
MC3D_EXPORT void __cdecl | MikroCAD_UsePrefilter (unsigned char byUse)
| Turn pre-filter on or off. More...
MC3D_EXPORT bool __cdecl | MikroCAD_UserDataFileExists (char *pszDataFileName)
| User data file item exists ? More...
MC3D_EXPORT unsigned char *__cdecl | MikroCAD_ValidDataPtr ()
| Returns a pointer to valid data or NULL if not available. More...
MC3D_EXPORT long __cdecl | MikroCAD_WriteConfig ()
| Writes the configuration. More...
MC3D_EXPORT long __cdecl | MikroCAD_WriteInitialParameterToFile (char *pszFileName)
| Writes the initial parameters to file. More...
MC3D_EXPORT long __cdecl | MikroCAD_WriteMeasProgramDataToFile (char *pszFileName)
| Writes the measurement program data to file. More...
MC3D_EXPORT bool __cdecl | MikroCAD_WriteUserDataFile (char *pszDataFileName, unsigned char *pbyData, unsigned long dwDataSize, bool bOverwriteExist=true)
| Writes a user data file to the scanner. More...

## Function Documentation

MC3D_EXPORT AdditionalAdjustmentItem* __cdecl MikroCAD_AdditionalAdjustmentsGetItem | ( | char * | pszID | ) |

Get pointer of an item from list.

Parameters

  pszID | ID string

Returns
  Pointer to the item or NULL if not found

MC3D_EXPORT bool __cdecl MikroCAD_AdditionalAdjustmentsItemExists | ( | char * | pszID | ) |

A specified item exists ?

Parameters

  pszID | ID string

Returns
  Exists - true

MC3D_EXPORT long __cdecl MikroCAD_AdditionalAdjustmentsRead | ( |  | ) |

Read data from scanner.

Returns
  Error code

MC3D_EXPORT bool __cdecl MikroCAD_AdditionalAdjustmentsSetItem | ( | char * | pszID,
|  | unsigned long | dwDataSize,
|  | unsigned char * | pbyData = `NULL`
| ) |  |

Set data for a new or existing item.

Parameters

  pszID | ID string
  dwDataSize | Data size in bytes
  pbyData | Buffer for data (if NULL - only placeholder)

Returns
  Success

MC3D_EXPORT long __cdecl MikroCAD_AdditionalAdjustmentsWrite | ( |  | ) |

Write data to scanner.

Returns
  Error code

MC3D_EXPORT bool __cdecl MikroCAD_CalibrationOnSensor | ( | unsigned long | dwSensorNo,
|  | CalibrationMode | CalMode
| ) |  |

Is there any calibration on sensor (Sensor mustn't be initialized)

Parameters

  dwSensorNo | Sensor number
  CalMode | Calibration mode

Returns
  True if there is a calibration on the sensor

MC3D_EXPORT long __cdecl MikroCAD_CalibrationToSensor | ( |  | ) |

Calibration data transfer to sensor.

Returns
  Error code

MC3D_EXPORT unsigned char* __cdecl MikroCAD_CameraImagePtr | ( |  | ) |

Returns a pointer to camera image data (texture) or NULL if not available.

Returns
  A pointer to the 24 bit texture image (red, green, blue, red...)

MC3D_EXPORT unsigned char* __cdecl MikroCAD_CameraRawImagePtr | ( |  | ) |

Returns a pointer to camera image data (raw data) or NULL if not available.

Returns
  A pointer to the 24 bit raw image (red, green, blue, red...) used for texture generation

MC3D_EXPORT void __cdecl MikroCAD_DeinitializeStaticLib | ( |  | ) |

Deinitializes global library.

Use only if you use static version of the library. You should call this at application exit in order to cleanup all resources left over from API. AFTER THAT, NO OTHER API FUNCTIONS MUST BE CALLED ANY LONGER!

MC3D_EXPORT void __cdecl MikroCAD_DeleteUserDataFile | ( | char * | pszDataFileName | ) |

Deletes a user data file on the scanner.

Parameters

  pszDataFileName | Data file name

MC3D_EXPORT void __cdecl MikroCAD_EnableUserDefinedParameterSet | ( | bool | bEnabled | ) |

Enable / disable user defined parameter ?

Parameters

  bEnabled | Parameter set enabled -> true

MC3D_EXPORT unsigned long __cdecl MikroCAD_GetCalibrationState | ( |  | ) |

Returns the calibration state.

Returns
  State flags (SIMPLE_CALIB_STATE_NONE 0, SIMPLE_CALIB_STATE_PLANE 1, SIMPLE_CALIB_STATE_GRID 2, SIMPLE_CALIB_STATE_GROOVE 4)

MC3D_EXPORT long __cdecl MikroCAD_GetCameraImage24 | ( | unsigned char * | pbyImage,
|  | unsigned long | dwAverage = `1`
| ) |  |

Gets a camera image (Color)

Parameters

  pbyImage | Buffer for camera image (Red, green, blue, red, green...)
  dwAverage | How many averages?

Returns
  Error code

MC3D_EXPORT long __cdecl MikroCAD_GetCameraImage8 | ( | unsigned char * | pbyImage,
|  | unsigned long | dwAverage = `1`
| ) |  |

Gets a camera image (Black / White)

Parameters

  pbyImage | Buffer for camera image
  dwAverage | How many averages?

Returns
  Error code

MC3D_EXPORT long __cdecl MikroCAD_GetCameraImageROI8 | ( | unsigned char * | pbyImage,
|  | long | lX0,
|  | long | lY0,
|  | long | lX1,
|  | long | lY1,
|  | bool | bFullImage = `false`
| ) |  |

Gets a camera image in a ROI - 8 bit (Black / White)

Parameters

  pbyImage | Buffer for camera image
  lX0 | ROI coordinate X begin
  lY0 | ROI coordinate Y begin
  lX1 | ROI coordinate X end
  lY1 | ROI coordinate Y end
  bFullImage | Use full camera image ?

Returns
  Error code

MC3D_EXPORT CalibrationMode __cdecl MikroCAD_GetCurrentCalibrationMode | ( |  | ) |

Reads the current calibration mode.

Returns
  Current calibration mode (0: no calibration, 1: simple calibration, 2 multi level calibration)

MC3D_EXPORT char* __cdecl MikroCAD_GetCurrentMeasurementProgram | ( |  | ) |

Get current measurement program ("" - Default measurement program)

Returns
  Current measurement program name

MC3D_EXPORT long __cdecl MikroCAD_GetCurrentMeasurementProgramIndex | ( |  | ) |

Get current measurement program index (< 0 - Default measurement program)

Returns
  Current measurement program index

MC3D_EXPORT char* __cdecl MikroCAD_GetDefaultMeasProgramName | ( |  | ) |

Which measuring program is identical to the default measuring program.

Returns
  Measurement program name or -1, if no measurement program is identical

MC3D_EXPORT SensorEventType __cdecl MikroCAD_GetEventType | ( | long | lIndex | ) |

Returns the sensor event type.

Parameters

  lIndex | Index in event type list

Returns
  Sensor event type or "SensorEventType_None" if not found

MC3D_EXPORT long __cdecl MikroCAD_GetFloatParameter | ( | MeasurementParameterID | ParameterID,
|  | double & | dParameter
| ) |  |

Read float parameter.

Parameters

  ParameterID | Parameter ID
  dParameter | Returns the parameter value

Returns
  Error code

MC3D_EXPORT long __cdecl MikroCAD_GetFloatParameterLimits | ( | MeasurementParameterID | ParameterID,
|  | double & | dMinParameter,
|  | double & | dMaxParameter
| ) |  |

Read float parameter limits.

Parameters

  ParameterID | Parameter ID
  dMinParameter | Returns the minimum value of the parameter
  dMaxParameter | Returns the maximum value of the parameter

Returns
  Error code

MC3D_EXPORT long __cdecl MikroCAD_GetIntegerParameter | ( | MeasurementParameterID | ParameterID,
|  | long & | lParameter
| ) |  |

Read integer parameter.

Parameters

  ParameterID | Parameter ID
  lParameter | Returns the parameter value

Returns
  Error code

MC3D_EXPORT long __cdecl MikroCAD_GetIntegerParameterLimits | ( | MeasurementParameterID | ParameterID,
|  | long & | lMinParameter,
|  | long & | lMaxParameter
| ) |  |

Read integer parameter limits.

Parameters

  ParameterID | Parameter ID
  lMinParameter | Returns the minimum value of the parameter
  lMaxParameter | Returns the maximum value of the parameter

Returns
  : Error code

MC3D_EXPORT CMeasProgramSet* __cdecl MikroCAD_GetMeasProgramSetPtr | ( |  | ) |

Returns a pointer to the measuring program set object.

Returns
  Pointer to measuring program set

MC3D_EXPORT void __cdecl MikroCAD_GetModuleVersionInfo | ( | unsigned long & | dwModuleVersion,
|  | unsigned long & | dwInterfaceVersion
| ) |  |

Returns version infos (no connection with the sensor necessary)

Parameters

  dwModuleVersion | Return module version
  dwInterfaceVersion | Return module interface version

MC3D_EXPORT unsigned long __cdecl MikroCAD_GetMultiLevelCalibrationBufferSize | ( |  | ) |

Get multi level calibration parameters buffer size.

Returns
  Buffer size in bytes

MC3D_EXPORT bool __cdecl MikroCAD_GetMultiLevelCalibrationParameter | ( | unsigned char * | pbyData | ) |

Load the multi level calibration parameters and transfer this in a byte buffer.

Parameters

  pbyData | buffer

Returns
  Success true

MC3D_EXPORT unsigned long __cdecl MikroCAD_GetNumAvailableEventTypes | ( |  | ) |

Returns the number of the available event types.

Returns
  Number of available event types

MC3D_EXPORT unsigned long __cdecl MikroCAD_GetNumPredefinedMeasParameterSets | ( |  | ) |

Returns the number of predefined measurement parameter sets.

Returns
  Number of predefined measurement parameter sets

MC3D_EXPORT char* __cdecl MikroCAD_GetPredefinedMeasParameterSetName | ( | unsigned long | dwIndex | ) |

Returns the name of a predefined measurement parameter sets.

Parameters

  dwIndex | Index in list

Returns
  Parameter set name

MC3D_EXPORT ProjectorLampState __cdecl MikroCAD_GetProjectorLampState | ( |  | ) |

Returns the projector lamp state.

Returns
  Lamp state, true if on, otherwise false

MC3D_EXPORT unsigned char __cdecl MikroCAD_GetSensorModuleInfo | ( | unsigned long | dwIndex,
|  | unsigned long & | dwModuleVersion,
|  | unsigned long & | dwFirmwareVersion,
|  | unsigned long & | dwInterfaceVersion,
|  | SensorTypeID & | SensorType
| ) |  |

Returns sensor infos of a connected sensor module.

Parameters

  dwIndex | Index in list
  dwModuleVersion | Return version of the module (DLL)
  dwFirmwareVersion | Return firmware version of the sensor
  dwInterfaceVersion | Return version of the interface (protocol) to hardware
  SensorType | Return sensor type ID

Returns
  Success

MC3D_EXPORT unsigned long __cdecl MikroCAD_GetSensorSerialNumber | ( | unsigned long | dwIndex | ) |

Returns the serial number of a listed sensor.

Parameters

  dwIndex | Index in list

Returns
  Serial number

MC3D_EXPORT unsigned long __cdecl MikroCAD_GetSensorSerialNumberType | ( | unsigned long | dwIndex | ) |

Returns the serial number of a listed sensor of a special type.

Parameters

  dwIndex | Index in list

Returns
  Serial number

MC3D_EXPORT unsigned long __cdecl MikroCAD_GetSimpleCalibrationBufferSize | ( |  | ) |

Get simple calibration parameters buffer size.

Returns
  Buffer size in bytes

MC3D_EXPORT bool __cdecl MikroCAD_GetSimpleCalibrationParameter | ( | unsigned char * | pbyData | ) |

Load the simple calibration parameters and transfer this in a byte buffer.

Parameters

  pbyData | buffer

Returns
  Success true

MC3D_EXPORT char* __cdecl MikroCAD_GetUserDataFileDirectoryItem | ( | long | lIndex | ) |

Return a user data file item from directory.

Parameters

  lIndex | Index in directory

Returns
  Item name or NULL if not exists

MC3D_EXPORT unsigned long __cdecl MikroCAD_GetUserDataFileSize | ( | char * | pszDataFileName | ) |

Gets the user data file size on the scanner.

Parameters

  pszDataFileName | Data file name

Returns
  Size in bytes

MC3D_EXPORT long __cdecl MikroCAD_GridCalibration | ( |  | ) |

Executes a grid calibration.

Returns
  Error code

MC3D_EXPORT long __cdecl MikroCAD_GrooveCalibration | ( | long | lIndex | ) |

Executes a groove calibration.

Parameters

  lIndex | Index (basis calibration - nIndex == 0, additional groove calibration - nIndex == 1..., see also number of groove calibrations)

Returns
  Error code

MC3D_EXPORT short* __cdecl MikroCAD_HeightImagePtr | ( |  | ) |

Returns a pointer to height image data or NULL if not available.

Returns
  Pointer to the height image

MC3D_EXPORT long __cdecl MikroCAD_Initialize | ( | unsigned long | dwSensorNo,
|  | SensorOperatingMode | OperatingMode = `SensorOperatingMode_Measure`
| ) |  |

Initialize the measurement module.

Parameters

  dwSensorNo | Sensor number
  OperatingMode | Operating mode (measurement, simple calibration....)

Returns
  Error code

MC3D_EXPORT void __cdecl MikroCAD_InitializeStaticLib | ( |  | ) |

Initializes global library.

Use only if you use static version of the library. Call only once and before any other library function.

MC3D_EXPORT bool __cdecl MikroCAD_IsDataBufferLocked | ( |  | ) |

Is data buffer locked?

Returns
  True if data buffer is locked, otherwise false

MC3D_EXPORT unsigned long __cdecl MikroCAD_ListAllSensors | ( |  | ) |

List all available sensors (Before connection with the sensor)

Returns
  Number of listed Sensors

MC3D_EXPORT unsigned long __cdecl MikroCAD_ListAllSensorsType | ( | SensorTypeID | SensorType | ) |

List all available sensors of a special type (before connection with the sensor)

Parameters

  SensorType | Sensor type ID

Returns
  Number of listed Sensors

MC3D_EXPORT long __cdecl MikroCAD_ListSensorDescriptions | ( | SensorTypeID | TypeID | ) |

List all sensor descriptions (only for sensors with separate camera and projector) (Sensor mustn't be initialized!)

Parameters

  TypeID | Sensor type ID

Returns
  Number of description items

MC3D_EXPORT long __cdecl MikroCAD_ListUserDataFileDirectory | ( | char * | pszMask | ) |

List all user data files on scanner (directory)

Parameters

  pszMask | Directory mask (*.*, ...)

Returns
  Number of items

MC3D_EXPORT long __cdecl MikroCAD_Measure | ( | bool | bOnSensor = `true` | ) |

Start a measurement and lock the data buffer.

Parameters

  bOnSensor | Height image calculation on sensor or sensor DLL if possible. Always true for normal cases, false for development or tests

Returns
  Error code

MC3D_EXPORT unsigned long __cdecl MikroCAD_ParameterAvailable | ( | MeasurementParameterID | ParameterID | ) |

Is parameter available.

Parameters

  ParameterID | Parameter ID

Returns
  Availability of the parameter (flags)

MC3D_EXPORT long __cdecl MikroCAD_PlaneCalibration | ( |  | ) |

Executes a plane calibration.

Returns
  Error code

MC3D_EXPORT short* __cdecl MikroCAD_PowerSpectrumPtr | ( |  | ) |

Returns a pointer to the power spectrum.

Returns
  Pointer to the power spectrum

MC3D_EXPORT long __cdecl MikroCAD_ProjectColorValue | ( | unsigned char | cRed,
|  | unsigned char | cGreen,
|  | unsigned char | cBlue
| ) |  |

Projects a color value (whole image the same color)

Parameters

  cRed | Red color component
  cGreen | Green color component
  cBlue | Blue color component

Returns
  Error code

MC3D_EXPORT long __cdecl MikroCAD_ProjectImage24 | ( | unsigned char * | pbyImage | ) |

Projects a color image.

Parameters

  pbyImage | Buffer for camera image (Red, green, blue, red, green...)

Returns
  Error code

MC3D_EXPORT long __cdecl MikroCAD_ProjectImage8 | ( | unsigned char * | pbyImage | ) |

Projects a black / white image.

Parameters

  pbyImage | Buffer for projector image

Returns
  Error code

MC3D_EXPORT long __cdecl MikroCAD_ProjectPattern | ( | short | nPatternIndex | ) |

Projects a predefined pattern (cross, ...)

Parameters

  nPatternIndex | - 0...NumPattern, 0 - off

Returns
  Error code

MC3D_EXPORT long __cdecl MikroCAD_ProjectStripePattern | ( | short | nPatternIndex,
|  | bool | bInvers
| ) |  |

Projects a predefined stripe pattern.

Parameters

  nPatternIndex | - 0...NumStripePattern, 0 - off
  bInvers | - Inverse ?

Returns
  Error code

MC3D_EXPORT long __cdecl MikroCAD_ProjectValue | ( | unsigned char | cValue | ) |

Projects a gray value (whole image the same color)

Parameters

  cValue | Gray value

Returns
  Error code

MC3D_EXPORT long __cdecl MikroCAD_ReadConfig | ( |  | ) |

Reads the configuration.

Returns
  Error code

MC3D_EXPORT long __cdecl MikroCAD_ReadInitialParameterFromFile | ( | char * | pszFileName | ) |

Reads the initial parameters from file.

Parameters

  pszFileName | File name (incl. path)

Returns
  Error code

MC3D_EXPORT long __cdecl MikroCAD_ReadMeasProgramDataFromFile | ( | char * | pszFileName | ) |

Reads the measurement program data from file.

Parameters

  pszFileName | File name (incl. path)

Returns
  Error code

MC3D_EXPORT TSensorDescription* __cdecl MikroCAD_ReadSensorDescription | ( | long | lIndex | ) |

Reads the sensor description.

Parameters

  lIndex | Index in list

Returns
  Pointer to sensor description

MC3D_EXPORT bool __cdecl MikroCAD_ReadUserDataFile | ( | char * | pszDataFileName,
|  | unsigned char * | pbyData
| ) |  |

Reads a user data file from the scanner.

Parameters

  pszDataFileName | Data file name
  pbyData | Data file data

Returns
  Success - true

MC3D_EXPORT long __cdecl MikroCAD_ResetToFactorySettings | ( | ConfigDataTransferMode | Mode | ) |

Reset the current settings to factory settings.

Parameters

  Mode | Kind of settings

Returns
  Error code

MC3D_EXPORT long __cdecl MikroCAD_SaveHardwareLogfile | ( | const char * | filename | ) |

Save the hardware log file to the given file name (file will be overwritten!)

Parameters

  filename | File name

Returns
  Error code

MC3D_EXPORT long __cdecl MikroCAD_SelectCurrentMeasurementProgram | ( | char * | pszMeasProgName = `NULL` | ) |

Selects the current measurement program.

Parameters

  pszMeasProgName | Measurement program name (not case sensitive) - NULL - default program

Returns
  Error code

MC3D_EXPORT long __cdecl MikroCAD_SetFloatParameter | ( | MeasurementParameterID | ParameterID,
|  | double | dParameter
| ) |  |

Write float parameter.

Parameters

  ParameterID | Parameter ID
  dParameter | Parameter value return: Error code

MC3D_EXPORT long __cdecl MikroCAD_SetIntegerParameter | ( | MeasurementParameterID | ParameterID,
|  | long | lParameter
| ) |  |

Write integer parameter.

Parameters

  ParameterID | Parameter ID
  lParameter | Parameter value

Returns
  Error code

MC3D_EXPORT void __cdecl MikroCAD_SetMeasurementArea | ( | double | dSizeX,
|  | double | dSizeY,
|  | double | dX0,
|  | double | dY0
| ) |  |

Sets the measurement area.

Parameters

  dSizeX | Measurement area size in X percental to the camera image limits (0.0...1.0)
  dSizeY | Measurement area size in Y percental to the camera image limits (0.0...1.0)
  dX0 | X-Origin of the area (-1.0...1.0) percental to the camera image limits
  dY0 | Y-Origin of the area (-1.0...1.0) percental to the camera image limits

MC3D_EXPORT void __cdecl MikroCAD_SetMeasurementAreaMask | ( | unsigned char * | pbyMeasArea | ) |

Sets the measurement area.

Parameters

  pbyMeasArea | Measurement area as mask

MC3D_EXPORT void __cdecl MikroCAD_SetProgramPath | ( | char * | pszProgramPath | ) |

If Path with sensor DLLs is different to calling path, the sensor DLL path must be set.

Parameters

  pszProgramPath | Path with sensor DLLs

MC3D_EXPORT void __cdecl MikroCAD_SetProjectionArea | ( | double | dSizeX,
|  | double | dSizeY,
|  | double | dX0,
|  | double | dY0
| ) |  |

Sets the projection area.

Parameters

  dSizeX | Projection area size in X percental to the camera image limits (0.0...>1.0)
  dSizeY | Projection area size in Y percental to the camera image limits (0.0...>1.0)
  dX0 | X-Origin of the area (<-1.0...>1.0) percental to the camera image limits
  dY0 | Y-Origin of the area (<-1.0...>1.0) percental to the camera image limits

MC3D_EXPORT void __cdecl MikroCAD_SetProjectionMask | ( | unsigned char * | pbyMask | ) |

Set projection mask.

Parameters

  pbyMask | Projection mask (in camera coordinates)

MC3D_EXPORT bool __cdecl MikroCAD_SetSimpleCalibrationParameter | ( | unsigned char * | pbyData | ) |

Save the simple calibration parameters from a buffer to the scanner.

Parameters

  pbyData | Buffer

Returns
  Success - true

MC3D_EXPORT long __cdecl MikroCAD_SetUSBCommErrorHandler | ( | COMM_ERROR | funcPtr | ) |

Register a function to be called when a USB communication error happens.

Parameters

  funcPtr | Function pointer, use NULL to unregister

Returns
  Error code

MC3D_EXPORT void __cdecl MikroCAD_SetUserDefinedParameterSet | ( | long | lIndex,
|  | long | lProjectorBrightness,
|  | long | lCameraShutter,
|  | long | lCameraGain
| ) |  |

Set user defined parameter set.

Parameters

  lIndex | Index of the parameter set (0..2, 0 for 1st brightness, 1 for 2nd brightness, 2 for 3rd brightness)
  lProjectorBrightness | Projector brightness
  lCameraShutter | Camera shutter
  lCameraGain | Camera gain

MC3D_EXPORT void __cdecl MikroCAD_StartSensorEvent | ( |  | ) |

Start an event function.

Parameters

  EventFunc | Sensor event function

MC3D_EXPORT void __cdecl MikroCAD_SwitchOnOffProjectorLamp | ( | bool | bOn | ) |

Switch on/off the projector lamp.

Parameters

  bOn | Projector on (true) or off (false)

MC3D_EXPORT bool __cdecl MikroCAD_SwitchOnOffProjectorLampAvailable | ( |  | ) |

Is projector lamp switch on / off available?

Returns
  Switch available

MC3D_EXPORT void __cdecl MikroCAD_UsePrefilter | ( | unsigned char | byUse | ) |

Turn pre-filter on or off.

Parameters

  byUse | 0 if not pre-filter should be used, otherwise pre-filter is used

MC3D_EXPORT bool __cdecl MikroCAD_UserDataFileExists | ( | char * | pszDataFileName | ) |

User data file item exists ?

Parameters

  pszDataFileName | Data file name

Returns
  Exists - true

MC3D_EXPORT unsigned char* __cdecl MikroCAD_ValidDataPtr | ( |  | ) |

Returns a pointer to valid data or NULL if not available.

Returns
  Pointer to the valid data

MC3D_EXPORT long __cdecl MikroCAD_WriteConfig | ( |  | ) |

Writes the configuration.

Returns
  Error code

MC3D_EXPORT long __cdecl MikroCAD_WriteInitialParameterToFile | ( | char * | pszFileName | ) |

Writes the initial parameters to file.

Parameters

  pszFileName | File name (incl. path)

Returns
  Error code

MC3D_EXPORT long __cdecl MikroCAD_WriteMeasProgramDataToFile | ( | char * | pszFileName | ) |

Writes the measurement program data to file.

Parameters

  pszFileName | File name (incl. path)

Returns
  Error code

MC3D_EXPORT bool __cdecl MikroCAD_WriteUserDataFile | ( | char * | pszDataFileName,
|  | unsigned char * | pbyData,
|  | unsigned long | dwDataSize,
|  | bool | bOverwriteExist = `true`
| ) |  |

Writes a user data file to the scanner.

Parameters

  pszDataFileName | Data file name
  pbyData | Data file data
  dwDataSize | Data file size in bytes
  bOverwriteExist | Overwrite if file exists ? (def.: true)

Returns
  Success - true