MikroCAD SDK Library
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
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_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 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 (MikroCADEventFunc EventFunc)
 Registers a 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 bool __cdecl MikroCAD_CalibrationOnSensor ( unsigned long  dwSensorNo,
CalibrationMode  CalMode 
)

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

Parameters
dwSensorNoSensor number
CalModeCalibration 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
pszDataFileNameData file name
MC3D_EXPORT void __cdecl MikroCAD_EnableUserDefinedParameterSet ( bool  bEnabled)

Enable / disable user defined parameter ?

Parameters
bEnabledParameter 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
pbyImageBuffer for camera image (Red, green, blue, red, green...)
dwAverageHow 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
pbyImageBuffer for camera image
dwAverageHow 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
pbyImageBuffer for camera image
lX0ROI coordinate X begin
lY0ROI coordinate Y begin
lX1ROI coordinate X end
lY1ROI coordinate Y end
bFullImageUse 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
lIndexIndex 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
ParameterIDParameter ID
dParameterReturns the parameter value
Returns
Error code
MC3D_EXPORT long __cdecl MikroCAD_GetFloatParameterLimits ( MeasurementParameterID  ParameterID,
double &  dMinParameter,
double &  dMaxParameter 
)

Read float parameter limits.

Parameters
ParameterIDParameter ID
dMinParameterReturns the minimum value of the parameter
dMaxParameterReturns the maximum value of the parameter
Returns
Error code
MC3D_EXPORT long __cdecl MikroCAD_GetIntegerParameter ( MeasurementParameterID  ParameterID,
long &  lParameter 
)

Read integer parameter.

Parameters
ParameterIDParameter ID
lParameterReturns the parameter value
Returns
Error code
MC3D_EXPORT long __cdecl MikroCAD_GetIntegerParameterLimits ( MeasurementParameterID  ParameterID,
long &  lMinParameter,
long &  lMaxParameter 
)

Read integer parameter limits.

Parameters
ParameterIDParameter ID
lMinParameterReturns the minimum value of the parameter
lMaxParameterReturns 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
dwModuleVersionReturn module version
dwInterfaceVersionReturn 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
pbyDatabuffer
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
dwIndexIndex 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
dwIndexIndex in list
dwModuleVersionReturn version of the module (DLL)
dwFirmwareVersionReturn firmware version of the sensor
dwInterfaceVersionReturn version of the interface (protocol) to hardware
SensorTypeReturn sensor type ID
Returns
Success
MC3D_EXPORT unsigned long __cdecl MikroCAD_GetSensorSerialNumber ( unsigned long  dwIndex)

Returns the serial number of a listed sensor.

Parameters
dwIndexIndex 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
dwIndexIndex 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
pbyDatabuffer
Returns
Success true
MC3D_EXPORT char* __cdecl MikroCAD_GetUserDataFileDirectoryItem ( long  lIndex)

Return a user data file item from directory.

Parameters
lIndexIndex 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
pszDataFileNameData 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
lIndexIndex (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
dwSensorNoSensor number
OperatingModeOperating 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
SensorTypeSensor 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
TypeIDSensor type ID
Returns
Number of description items
MC3D_EXPORT long __cdecl MikroCAD_ListUserDataFileDirectory ( char *  pszMask)

List all user data files on scanner (directory)

Parameters
pszMaskDirectory mask (*.*, ...)
Returns
Number of items
MC3D_EXPORT long __cdecl MikroCAD_Measure ( bool  bOnSensor = true)

Start a measurement and lock the data buffer.

Parameters
bOnSensorHeight 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
ParameterIDParameter 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
cRedRed color component
cGreenGreen color component
cBlueBlue color component
Returns
Error code
MC3D_EXPORT long __cdecl MikroCAD_ProjectImage24 ( unsigned char *  pbyImage)

Projects a color image.

Parameters
pbyImageBuffer 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
pbyImageBuffer 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
cValueGray 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
pszFileNameFile name (incl. path)
Returns
Error code
MC3D_EXPORT long __cdecl MikroCAD_ReadMeasProgramDataFromFile ( char *  pszFileName)

Reads the measurement program data from file.

Parameters
pszFileNameFile name (incl. path)
Returns
Error code
MC3D_EXPORT TSensorDescription* __cdecl MikroCAD_ReadSensorDescription ( long  lIndex)

Reads the sensor description.

Parameters
lIndexIndex 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
pszDataFileNameData file name
pbyDataData file data
Returns
Success - true
MC3D_EXPORT long __cdecl MikroCAD_ResetToFactorySettings ( ConfigDataTransferMode  Mode)

Reset the current settings to factory settings.

Parameters
ModeKind 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
filenameFile name
Returns
Error code
MC3D_EXPORT long __cdecl MikroCAD_SelectCurrentMeasurementProgram ( char *  pszMeasProgName = NULL)

Selects the current measurement program.

Parameters
pszMeasProgNameMeasurement 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
ParameterIDParameter ID
dParameterParameter value return: Error code
MC3D_EXPORT long __cdecl MikroCAD_SetIntegerParameter ( MeasurementParameterID  ParameterID,
long  lParameter 
)

Write integer parameter.

Parameters
ParameterIDParameter ID
lParameterParameter value
Returns
Error code
MC3D_EXPORT void __cdecl MikroCAD_SetMeasurementArea ( double  dSizeX,
double  dSizeY,
double  dX0,
double  dY0 
)

Sets the measurement area.

Parameters
dSizeXMeasurement area size in X percental to the camera image limits (0.0...1.0)
dSizeYMeasurement area size in Y percental to the camera image limits (0.0...1.0)
dX0X-Origin of the area (-1.0...1.0) percental to the camera image limits
dY0Y-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
pbyMeasAreaMeasurement 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
pszProgramPathPath with sensor DLLs
MC3D_EXPORT void __cdecl MikroCAD_SetProjectionArea ( double  dSizeX,
double  dSizeY,
double  dX0,
double  dY0 
)

Sets the projection area.

Parameters
dSizeXProjection area size in X percental to the camera image limits (0.0...>1.0)
dSizeYProjection area size in Y percental to the camera image limits (0.0...>1.0)
dX0X-Origin of the area (<-1.0...>1.0) percental to the camera image limits
dY0Y-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
pbyMaskProjection 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
pbyDataBuffer
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
funcPtrFunction 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
lIndexIndex of the parameter set (0..2, 0 for 1st brightness, 1 for 2nd brightness, 2 for 3rd brightness)
lProjectorBrightnessProjector brightness
lCameraShutterCamera shutter
lCameraGainCamera gain
MC3D_EXPORT void __cdecl MikroCAD_StartSensorEvent ( MikroCADEventFunc  EventFunc)

Registers a event function.

Parameters
EventFuncSensor event function
MC3D_EXPORT void __cdecl MikroCAD_SwitchOnOffProjectorLamp ( bool  bOn)

Switch on/off the projector lamp.

Parameters
bOnProjector 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
byUse0 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
pszDataFileNameData 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
pszFileNameFile name (incl. path)
Returns
Error code
MC3D_EXPORT long __cdecl MikroCAD_WriteMeasProgramDataToFile ( char *  pszFileName)

Writes the measurement program data to file.

Parameters
pszFileNameFile 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
pszDataFileNameData file name
pbyDataData file data
dwDataSizeData file size in bytes
bOverwriteExistOverwrite if file exists ? (def.: true)
Returns
Success - true