| MikroCAD SDK Library

- Home
- All Types
- Files

All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
MikroCADSDK.h
Go to the documentation of this file.
1 /**
2 * @file MikroCADSDK.h
3 * @brief MikroCAD SDK interface description
4 *
5 * @author LMI Technologies
6 */
7
8 #ifndef _MikroCADSDK_h
9 #define _MikroCADSDK_h
10
11 #include "MeasurementDefs.h"
12 #include "MeasProgram.h"
13 #include "CalibrationExport.h"
14
15 #if defined(WIN32)
16 # define MC3D_EXPORT __declspec(dllexport)
17 #else
18 # define MC3D_EXPORT /* nothing */
19 #endif
20
21 #ifdef __cplusplus
22 extern "C"
23 {
24 #endif
25
26 /**
27 If Path with sensor DLLs is different to calling path, the sensor DLL path must be set
28 @param pszProgramPath Path with sensor DLLs
29 */
30 MC3D_EXPORT void __cdecl MikroCAD_SetProgramPath(char* pszProgramPath);
31
32 /**
33 Initializes global library. Use only if you use static version of the library.
34 Call only once and before any other library function.
35 */
36 MC3D_EXPORT void __cdecl MikroCAD_InitializeStaticLib();
37
38 /**
39 Deinitializes global library. Use only if you use static version of the library.
40 You should call this at application exit in order to cleanup
41 all resources left over from API.
42 AFTER THAT, NO OTHER API FUNCTIONS MUST BE CALLED ANY LONGER!
43 */
44 MC3D_EXPORT void __cdecl MikroCAD_DeinitializeStaticLib();
45
46 /**
47 Returns version infos (no connection with the sensor necessary)
48 @param dwModuleVersion Return module version
49 @param dwInterfaceVersion Return module interface version
50 */
51 MC3D_EXPORT void __cdecl MikroCAD_GetModuleVersionInfo(unsigned long& dwModuleVersion,
52 unsigned long& dwInterfaceVersion);
53
54 /**
55 Returns the number of the connected sensor modules
56 */
57 MC3D_EXPORT unsigned long __cdecl MikroCAD_GetNumConnectedSensorModules();
58
59
60 /**
61 Register a function to be called when a USB communication error happens
62
63 @param funcPtr Function pointer, use NULL to unregister
64 @return Error code
65 */
66 MC3D_EXPORT long __cdecl MikroCAD_SetUSBCommErrorHandler(COMM_ERROR funcPtr);
67
68
69 /**
70 Returns sensor infos of a connected sensor module
71
72 @param dwIndex Index in list
73 @param dwModuleVersion Return version of the module (DLL)
74 @param dwFirmwareVersion Return firmware version of the sensor
75 @param dwInterfaceVersion Return version of the interface (protocol) to hardware
76 @param SensorType Return sensor type ID
77 @return Success
78 */
79 MC3D_EXPORT unsigned char __cdecl MikroCAD_GetSensorModuleInfo(
80 unsigned long dwIndex,
81 unsigned long& dwModuleVersion,
82 unsigned long& dwFirmwareVersion,
83 unsigned long& dwInterfaceVersion,
84 SensorTypeID& SensorType);
85
86
87 /**
88 List all available sensors (Before connection with the sensor)
89
90 @return Number of listed Sensors
91 */
92 MC3D_EXPORT unsigned long __cdecl MikroCAD_ListAllSensors();
93
94 /**
95 Returns the serial number of a listed sensor
96
97 @param dwIndex Index in list
98 @return Serial number
99 */
100 MC3D_EXPORT unsigned long __cdecl MikroCAD_GetSensorSerialNumber(unsigned long dwIndex);
101
102 /**
103 Returns the Sensor type id
104 */
105 MC3D_EXPORT SensorTypeID __cdecl MikroCAD_GetSensorTypeID();
106
107
108 /**
109 Initialize the measurement module
110
111 @param dwSensorNo Sensor number
112 @param OperatingMode Operating mode (measurement, simple calibration....)
113 @return Error code
114 */
115 MC3D_EXPORT long __cdecl MikroCAD_Initialize(unsigned long dwSensorNo, SensorOperatingMode
116 OperatingMode = SensorOperatingMode_Measure);
117
118 /**
119 Deinitialize the measurement module
120 */
121 MC3D_EXPORT void __cdecl MikroCAD_Deinitialize();
122
123 /**
124 Is parameter available
125
126 @param ParameterID Parameter ID
127 @return Availability of the parameter (flags)
128 */
129 MC3D_EXPORT unsigned long __cdecl MikroCAD_ParameterAvailable(MeasurementParameterID ParameterID);
130
131 /**
132 Write integer parameter
133
134 @param ParameterID Parameter ID
135 @param lParameter Parameter value
136 @return Error code
137 */
138 MC3D_EXPORT long __cdecl MikroCAD_SetIntegerParameter(MeasurementParameterID ParameterID, long lParameter);
139
140 /**
141 Read integer parameter
142
143 @param ParameterID Parameter ID
144 @param lParameter Returns the parameter value
145 @return Error code
146 */
147 MC3D_EXPORT long __cdecl MikroCAD_GetIntegerParameter(MeasurementParameterID ParameterID, long& lParameter);
148
149 /** Read integer parameter limits
150
151 @param ParameterID Parameter ID
152 @param lMinParameter Returns the minimum value of the parameter
153 @param lMaxParameter Returns the maximum value of the parameter
154 @return: Error code
155 */
156 MC3D_EXPORT long __cdecl MikroCAD_GetIntegerParameterLimits(MeasurementParameterID ParameterID, long& lMinParameter,
157 long& lMaxParameter);
158
159 /**
160 Write float parameter
161
162 @param ParameterID Parameter ID
163 @param dParameter Parameter value
164 return: Error code
165 */
166 MC3D_EXPORT long __cdecl MikroCAD_SetFloatParameter(MeasurementParameterID ParameterID, double dParameter);
167
168 /**
169 Read float parameter
170
171 @param ParameterID Parameter ID
172 @param dParameter Returns the parameter value
173 @return Error code
174 */
175 MC3D_EXPORT long __cdecl MikroCAD_GetFloatParameter(MeasurementParameterID ParameterID, double& dParameter);
176
177 /**
178 Read float parameter limits
179
180 @param ParameterID Parameter ID
181 @param dMinParameter Returns the minimum value of the parameter
182 @param dMaxParameter Returns the maximum value of the parameter
183 @return Error code
184 */
185 MC3D_EXPORT long __cdecl MikroCAD_GetFloatParameterLimits(MeasurementParameterID ParameterID, double& dMinParameter,
186 double& dMaxParameter);
187
188
189 /**
190 Sets the measurement area
191
192 @param dSizeX Measurement area size in X percental to the camera image limits (0.0...1.0)
193 @param dSizeY Measurement area size in Y percental to the camera image limits (0.0...1.0)
194 @param dX0 X-Origin of the area (-1.0...1.0) percental to the camera image limits
195 @param dY0 Y-Origin of the area (-1.0...1.0) percental to the camera image limits
196 */
197 MC3D_EXPORT void __cdecl MikroCAD_SetMeasurementArea(double dSizeX, double dSizeY, double dX0, double dY0);
198
199 /**
200 Sets the measurement area
201
202 @param pbyMeasArea Measurement area as mask
203 */
204 MC3D_EXPORT void __cdecl MikroCAD_SetMeasurementAreaMask(unsigned char* pbyMeasArea);
205
206 /**
207 Resets the measurement area
208 */
209 MC3D_EXPORT void __cdecl MikroCAD_ResetMeasurementArea();
210
211 /** Sets the projection area
212
213 @param dSizeX Projection area size in X percental to the camera image limits (0.0...>1.0)
214 @param dSizeY Projection area size in Y percental to the camera image limits (0.0...>1.0)
215 @param dX0 X-Origin of the area (<-1.0...>1.0) percental to the camera image limits
216 @param dY0 Y-Origin of the area (<-1.0...>1.0) percental to the camera image limits
217 */
218 MC3D_EXPORT void __cdecl MikroCAD_SetProjectionArea(double dSizeX, double dSizeY, double dX0, double dY0);
219
220 /**
221 Set projection mask
222
223 @param pbyMask Projection mask (in camera coordinates)
224 */
225 MC3D_EXPORT void __cdecl MikroCAD_SetProjectionMask(unsigned char* pbyMask);
226
227 /**
228 Resets the projection area
229 */
230 MC3D_EXPORT void __cdecl MikroCAD_ResetProjectionArea();
231
232 /**
233 Gets a camera image (Black / White)
234
235 @param pbyImage Buffer for camera image
236 @param dwAverage How many averages?
237 @return Error code
238 */
239 MC3D_EXPORT long __cdecl MikroCAD_GetCameraImage8(unsigned char* pbyImage, unsigned long dwAverage = 1);
240
241 /**
242 Gets a camera image in a ROI - 8 bit (Black / White)
243
244 @param pbyImage Buffer for camera image
245 @param lX0 ROI coordinate X begin
246 @param lY0 ROI coordinate Y begin
247 @param lX1 ROI coordinate X end
248 @param lY1 ROI coordinate Y end
249 @param bFullImage Use full camera image ?
250 @return Error code
251 */
252 MC3D_EXPORT long __cdecl MikroCAD_GetCameraImageROI8(unsigned char* pbyImage, long lX0, long lY0, long lX1,
253 long lY1, bool bFullImage = false);
254
255 /**
256 Gets a camera image (Color)
257
258 @param pbyImage Buffer for camera image (Red, green, blue, red, green...)
259 @param dwAverage How many averages?
260 @return Error code
261 */
262 MC3D_EXPORT long __cdecl MikroCAD_GetCameraImage24(unsigned char* pbyImage, unsigned long dwAverage = 1);
263
264 /**
265 Projects a gray value (whole image the same color)
266
267 @param cValue Gray value
268 @return Error code
269 */
270 MC3D_EXPORT long __cdecl MikroCAD_ProjectValue(unsigned char cValue);
271
272 /**
273 Projects a color value (whole image the same color)
274
275 @param cRed Red color component
276 @param cGreen Green color component
277 @param cBlue Blue color component
278 @return Error code
279 */
280 MC3D_EXPORT long __cdecl MikroCAD_ProjectColorValue(unsigned char cRed, unsigned char cGreen, unsigned char cBlue);
281
282 /**
283 Projects a black / white image
284
285 @param pbyImage Buffer for projector image
286 @return Error code
287 */
288 MC3D_EXPORT long __cdecl MikroCAD_ProjectImage8(unsigned char* pbyImage);
289
290 /**
291 Projects a color image
292
293 @param pbyImage Buffer for camera image (Red, green, blue, red, green...)
294 @return Error code
295 */
296 MC3D_EXPORT long __cdecl MikroCAD_ProjectImage24(unsigned char* pbyImage);
297
298 /**
299 Projects a predefined pattern (cross, ...)
300
301 @param nPatternIndex - 0...NumPattern, 0 - off
302 @return Error code
303 */
304 MC3D_EXPORT long __cdecl MikroCAD_ProjectPattern(short nPatternIndex);
305
306 /**
307 Projects a predefined stripe pattern
308
309 @param nPatternIndex - 0...NumStripePattern, 0 - off
310 @param bInvers - Inverse ?
311 @return Error code
312 */
313 MC3D_EXPORT long __cdecl MikroCAD_ProjectStripePattern(short nPatternIndex, bool bInvers);
314
315 /**
316 Is projector lamp switch on / off available?
317
318 @return Switch available
319 */
320 MC3D_EXPORT bool __cdecl MikroCAD_SwitchOnOffProjectorLampAvailable();
321
322 /**
323 Switch on/off the projector lamp
324
325 @param bOn Projector on (true) or off (false)
326 */
327 MC3D_EXPORT void __cdecl MikroCAD_SwitchOnOffProjectorLamp(bool bOn);
328
329 /**
330 Returns the projector lamp state
331
332 @return Lamp state, true if on, otherwise false
333 */
334 MC3D_EXPORT ProjectorLampState __cdecl MikroCAD_GetProjectorLampState();
335
336
337 /**
338 Returns the number of predefined measurement parameter sets
339
340 @return Number of predefined measurement parameter sets
341 */
342 MC3D_EXPORT unsigned long __cdecl MikroCAD_GetNumPredefinedMeasParameterSets();
343
344 /**
345 Returns the name of a predefined measurement parameter sets
346
347 @param dwIndex Index in list
348 @return Parameter set name
349 */
350 MC3D_EXPORT char* __cdecl MikroCAD_GetPredefinedMeasParameterSetName(unsigned long dwIndex);
351
352 /**
353 Selects the current measurement program
354
355 @param pszMeasProgName Measurement program name (not case sensitive) - NULL - default program
356 @return Error code
357 */
358 MC3D_EXPORT long __cdecl MikroCAD_SelectCurrentMeasurementProgram(char* pszMeasProgName = NULL);
359
360 /**
361 Get current measurement program index (< 0 - Default measurement program)
362
363 @return Current measurement program index
364 */
365 MC3D_EXPORT long __cdecl MikroCAD_GetCurrentMeasurementProgramIndex();
366
367 /**
368 Get current measurement program ("" - Default measurement program)
369
370 @return Current measurement program name
371 */
372 MC3D_EXPORT char* __cdecl MikroCAD_GetCurrentMeasurementProgram();
373
374
375 /**
376 Which measuring program is identical to the default measuring program
377
378 @return Measurement program name or -1, if no measurement program is identical
379 */
380 MC3D_EXPORT char* __cdecl MikroCAD_GetDefaultMeasProgramName();
381
382 /**
383 Start a measurement and lock the data buffer
384
385 @param bOnSensor Height image calculation on sensor or sensor DLL if possible. Always true for normal cases, false for development or tests
386 @return Error code
387 */
388 MC3D_EXPORT long __cdecl MikroCAD_Measure(bool bOnSensor = true);
389
390 /**
391 Returns a pointer to height image data or NULL if not available
392
393 @return Pointer to the height image
394 */
395 MC3D_EXPORT short* __cdecl MikroCAD_HeightImagePtr();
396
397 /**
398 Returns a pointer to valid data or NULL if not available
399
400 @return Pointer to the valid data
401 */
402 MC3D_EXPORT unsigned char* __cdecl MikroCAD_ValidDataPtr();
403
404 /**
405 Returns a pointer to camera image data (texture) or NULL if not available
406
407 @return A pointer to the 24 bit texture image (red, green, blue, red...)
408 */
409 MC3D_EXPORT unsigned char* __cdecl MikroCAD_CameraImagePtr();
410
411 /**
412 Returns a pointer to camera image data (raw data) or NULL if not available
413
414 @return A pointer to the 24 bit raw image (red, green, blue, red...) used for texture generation
415 */
416 MC3D_EXPORT unsigned char* __cdecl MikroCAD_CameraRawImagePtr();
417
418 /**
419 Returns a pointer to the power spectrum
420
421 @return Pointer to the power spectrum
422 */
423 MC3D_EXPORT short* __cdecl MikroCAD_PowerSpectrumPtr();
424
425 /**
426 Is data buffer locked?
427
428 @return True if data buffer is locked, otherwise false
429 */
430 MC3D_EXPORT bool __cdecl MikroCAD_IsDataBufferLocked();
431
432 /**
433 Unlocks the data buffer
434 */
435 MC3D_EXPORT void __cdecl MikroCAD_UnlockDataBuffer();
436
437 /**
438 Turn pre-filter on or off
439
440 @param byUse 0 if not pre-filter should be used, otherwise pre-filter is used
441 */
442 MC3D_EXPORT void __cdecl MikroCAD_UsePrefilter(unsigned char byUse);
443
444 /**
445 Returns a pointer to the measuring program set object
446
447 @return Pointer to measuring program set
448 */
449 MC3D_EXPORT CMeasProgramSet* __cdecl MikroCAD_GetMeasProgramSetPtr();
450
451 /**
452 Reads the configuration
453
454 @return Error code
455 */
456 MC3D_EXPORT long __cdecl MikroCAD_ReadConfig();
457
458 /**
459 Writes the configuration
460
461 @return Error code
462 */
463 MC3D_EXPORT long __cdecl MikroCAD_WriteConfig();
464
465 /**
466 Reads the initial parameters from file
467
468 @param pszFileName File name (incl. path)
469 @return Error code
470 */
471 MC3D_EXPORT long __cdecl MikroCAD_ReadInitialParameterFromFile(char* pszFileName);
472
473 /**
474 Writes the initial parameters to file
475
476 @param pszFileName File name (incl. path)
477 @return Error code
478 */
479 MC3D_EXPORT long __cdecl MikroCAD_WriteInitialParameterToFile(char* pszFileName);
480
481 /**
482 Reads the measurement program data from file
483
484 @param pszFileName File name (incl. path)
485 @return Error code
486 */
487 MC3D_EXPORT long __cdecl MikroCAD_ReadMeasProgramDataFromFile(char* pszFileName);
488
489 /**
490 Writes the measurement program data to file
491
492 @param pszFileName File name (incl. path)
493 @return Error code
494 */
495 MC3D_EXPORT long __cdecl MikroCAD_WriteMeasProgramDataToFile(char* pszFileName);
496
497 /**
498 List all available sensors of a special type (before connection with the sensor)
499
500 @param SensorType Sensor type ID
501 @return Number of listed Sensors
502 */
503 MC3D_EXPORT unsigned long __cdecl MikroCAD_ListAllSensorsType(SensorTypeID SensorType);
504
505 /**
506 Returns the serial number of a listed sensor of a special type
507
508 @param dwIndex Index in list
509 @return Serial number
510 */
511 MC3D_EXPORT unsigned long __cdecl MikroCAD_GetSensorSerialNumberType(unsigned long dwIndex);
512
513 /**
514 List all sensor descriptions (only for sensors with separate camera and projector) (Sensor mustn't be initialized!)
515
516 @param TypeID Sensor type ID
517 @return Number of description items
518 */
519 MC3D_EXPORT long __cdecl MikroCAD_ListSensorDescriptions(SensorTypeID TypeID);
520
521 /**
522 Reads the sensor description
523
524 @param lIndex Index in list
525 @return Pointer to sensor description
526 */
527 MC3D_EXPORT TSensorDescription* __cdecl MikroCAD_ReadSensorDescription(long lIndex);
528
529 /**
530 Reads the current calibration mode
531
532 @return Current calibration mode (0: no calibration, 1: simple calibration, 2 multi level calibration)
533 */
534 MC3D_EXPORT CalibrationMode __cdecl MikroCAD_GetCurrentCalibrationMode();
535
536 /**
537 Is there any calibration on sensor (Sensor mustn't be initialized)
538
539 @param dwSensorNo Sensor number
540 @param CalMode Calibration mode
541 @return True if there is a calibration on the sensor
542 */
543 MC3D_EXPORT bool __cdecl MikroCAD_CalibrationOnSensor(unsigned long dwSensorNo, CalibrationMode CalMode);
544
545 /**
546 Executes a grid calibration
547
548 @return Error code
549 */
550 MC3D_EXPORT long __cdecl MikroCAD_GridCalibration();
551
552 /**
553 Executes a plane calibration
554
555 @return Error code
556 */
557 MC3D_EXPORT long __cdecl MikroCAD_PlaneCalibration();
558
559 /**
560 Gets the number of grove calibrations
561 */
562 MC3D_EXPORT long __cdecl MikroCAD_GetNumGrooveCalibrations();
563
564 /**
565 Executes a groove calibration
566
567 @param lIndex Index (basis calibration - nIndex == 0, additional groove calibration - nIndex == 1..., see also number of groove calibrations)
568 @return Error code
569 */
570 MC3D_EXPORT long __cdecl MikroCAD_GrooveCalibration(long lIndex);
571
572 /**
573 Returns the calibration state
574
575 @return State flags (SIMPLE_CALIB_STATE_NONE 0, SIMPLE_CALIB_STATE_PLANE 1, SIMPLE_CALIB_STATE_GRID 2, SIMPLE_CALIB_STATE_GROOVE 4)
576 */
577 MC3D_EXPORT unsigned long __cdecl MikroCAD_GetCalibrationState();
578
579 /**
580 Calibration data transfer to sensor
581
582 @return Error code
583 */
584 MC3D_EXPORT long __cdecl MikroCAD_CalibrationToSensor();
585
586 /**
587 Returns a pointer to result data
588 */
589 MC3D_EXPORT short* __cdecl MikroCAD_GetCalibrationResultData();
590
591 /**
592 Get simple calibration parameters buffer size
593
594 @return Buffer size in bytes
595 */
596 MC3D_EXPORT unsigned long __cdecl MikroCAD_GetSimpleCalibrationBufferSize();
597
598 /**
599 Load the simple calibration parameters and transfer this in a byte buffer
600
601 @param pbyData buffer
602 @return Success true
603 */
604 MC3D_EXPORT bool __cdecl MikroCAD_GetSimpleCalibrationParameter(unsigned char* pbyData);
605
606 /**
607 Save the simple calibration parameters from a buffer to the scanner
608 @param pbyData Buffer
609 @return Success - true
610 */
611 MC3D_EXPORT bool __cdecl MikroCAD_SetSimpleCalibrationParameter(unsigned char* pbyData);
612
613 /**
614 Get multi level calibration parameters buffer size
615 @return Buffer size in bytes
616 */
617 MC3D_EXPORT unsigned long __cdecl MikroCAD_GetMultiLevelCalibrationBufferSize();
618
619 /**
620 Load the multi level calibration parameters and transfer this in a byte buffer
621
622 @param pbyData buffer
623 @return Success true
624 */
625 MC3D_EXPORT bool __cdecl MikroCAD_GetMultiLevelCalibrationParameter(unsigned char* pbyData);
626
627 /**
628 Unlock the calibration data buffer
629 */
630 MC3D_EXPORT void __cdecl MikroCAD_UnlockCalibrationDataBuffer();
631
632 /**
633 Returns the number of the available event types
634
635 @return Number of available event types
636 */
637 MC3D_EXPORT unsigned long __cdecl MikroCAD_GetNumAvailableEventTypes();
638
639 /**
640 Returns the sensor event type
641
642 @param lIndex Index in event type list
643 @return Sensor event type or "SensorEventType_None" if not found
644 */
645 MC3D_EXPORT SensorEventType __cdecl MikroCAD_GetEventType(long lIndex);
646
647 /**
648 Registers a event function
649
650 @param EventFunc Sensor event function
651 */
652 MC3D_EXPORT void __cdecl MikroCAD_StartSensorEvent(MikroCADEventFunc EventFunc);
653
654 /**
655 Unregisters all event functions
656 */
657 MC3D_EXPORT void __cdecl MikroCAD_StopSensorEvent();
658
659 /**
660 Save the hardware log file to the given file name (file will be overwritten!)
661
662 @param filename File name
663 @return Error code
664 */
665 MC3D_EXPORT long __cdecl MikroCAD_SaveHardwareLogfile(const char *filename);
666
667 /**
668 List all user data files on scanner (directory)
669
670 @param pszMask Directory mask (*.*, ...)
671 @return Number of items
672 */
673 MC3D_EXPORT long __cdecl MikroCAD_ListUserDataFileDirectory(char* pszMask);
674
675 /**
676 Return a user data file item from directory
677
678 @param lIndex Index in directory
679 @return Item name or NULL if not exists
680 */
681 MC3D_EXPORT char* __cdecl MikroCAD_GetUserDataFileDirectoryItem(long lIndex);
682
683 /**
684 User data file item exists ?
685
686 @param pszDataFileName Data file name
687 @return Exists - true
688 */
689 MC3D_EXPORT bool __cdecl MikroCAD_UserDataFileExists(char* pszDataFileName);
690
691 /**
692 Writes a user data file to the scanner
693
694 @param pszDataFileName Data file name
695 @param pbyData Data file data
696 @param dwDataSize Data file size in bytes
697 @param bOverwriteExist Overwrite if file exists ? (def.: true)
698 @return Success - true
699 */
700 MC3D_EXPORT bool __cdecl MikroCAD_WriteUserDataFile(char* pszDataFileName, unsigned char* pbyData, unsigned long dwDataSize,
701 bool bOverwriteExist = true);
702
703 /**
704 Gets the user data file size on the scanner
705
706 @param pszDataFileName Data file name
707 @return Size in bytes
708 */
709 MC3D_EXPORT unsigned long __cdecl MikroCAD_GetUserDataFileSize(char* pszDataFileName);
710
711 /**
712 Reads a user data file from the scanner
713
714 @param pszDataFileName Data file name
715 @param pbyData Data file data
716 @return Success - true
717 */
718 MC3D_EXPORT bool __cdecl MikroCAD_ReadUserDataFile(char* pszDataFileName, unsigned char* pbyData);
719
720 /**
721 Deletes a user data file on the scanner
722
723 @param pszDataFileName Data file name
724 */
725 MC3D_EXPORT void __cdecl MikroCAD_DeleteUserDataFile(char* pszDataFileName);
726
727 /**
728 Reset the current settings to factory settings
729 @param Mode Kind of settings
730 @return Error code
731 */
732 MC3D_EXPORT long __cdecl MikroCAD_ResetToFactorySettings(ConfigDataTransferMode Mode);
733
734 /**
735 Set user defined parameter set
736
737 @param lIndex Index of the parameter set (0..2, 0 for 1st brightness, 1 for 2nd brightness, 2 for 3rd brightness)
738 @param lProjectorBrightness Projector brightness
739 @param lCameraShutter Camera shutter
740 @param lCameraGain Camera gain
741 */
742 MC3D_EXPORT void __cdecl MikroCAD_SetUserDefinedParameterSet(long lIndex, long lProjectorBrightness,
743 long lCameraShutter, long lCameraGain);
744
745 /**
746 Enable / disable user defined parameter ?
747
748 @param bEnabled Parameter set enabled -> true
749 */
750 MC3D_EXPORT void __cdecl MikroCAD_EnableUserDefinedParameterSet(bool bEnabled);
751
752 #ifdef __cplusplus
753 }
754 #endif
755
756 #endif // _MikroCADSDK_h
757
758
SensorEventType
SensorEventType
Trigger event types.
Definition: MeasurementDefs.h:407
MikroCAD_GetUserDataFileSize
MC3D_EXPORT unsigned long __cdecl MikroCAD_GetUserDataFileSize(char *pszDataFileName)
Gets the user data file size on the scanner.
MikroCAD_GetCurrentCalibrationMode
MC3D_EXPORT CalibrationMode __cdecl MikroCAD_GetCurrentCalibrationMode()
Reads the current calibration mode.
MikroCAD_GetFloatParameter
MC3D_EXPORT long __cdecl MikroCAD_GetFloatParameter(MeasurementParameterID ParameterID, double &dParameter)
Read float parameter.
MikroCAD_CameraRawImagePtr
MC3D_EXPORT unsigned char *__cdecl MikroCAD_CameraRawImagePtr()
Returns a pointer to camera image data (raw data) or NULL if not available.
MikroCAD_DeleteUserDataFile
MC3D_EXPORT void __cdecl MikroCAD_DeleteUserDataFile(char *pszDataFileName)
Deletes a user data file on the scanner.
MikroCAD_WriteConfig
MC3D_EXPORT long __cdecl MikroCAD_WriteConfig()
Writes the configuration.
MikroCAD_ListSensorDescriptions
MC3D_EXPORT long __cdecl MikroCAD_ListSensorDescriptions(SensorTypeID TypeID)
List all sensor descriptions (only for sensors with separate camera and projector) (Sensor mustn't be...
MikroCAD_GetIntegerParameterLimits
MC3D_EXPORT long __cdecl MikroCAD_GetIntegerParameterLimits(MeasurementParameterID ParameterID, long &lMinParameter, long &lMaxParameter)
Read integer parameter limits.
MikroCAD_HeightImagePtr
MC3D_EXPORT short *__cdecl MikroCAD_HeightImagePtr()
Returns a pointer to height image data or NULL if not available.
ConfigDataTransferMode
ConfigDataTransferMode
Configuration data transfer mode.
Definition: MeasurementDefs.h:394
MikroCAD_GetProjectorLampState
MC3D_EXPORT ProjectorLampState __cdecl MikroCAD_GetProjectorLampState()
Returns the projector lamp state.
MikroCAD_ReadMeasProgramDataFromFile
MC3D_EXPORT long __cdecl MikroCAD_ReadMeasProgramDataFromFile(char *pszFileName)
Reads the measurement program data from file.
MikroCAD_Deinitialize
MC3D_EXPORT void __cdecl MikroCAD_Deinitialize()
Deinitialize the measurement module.
MikroCAD_CameraImagePtr
MC3D_EXPORT unsigned char *__cdecl MikroCAD_CameraImagePtr()
Returns a pointer to camera image data (texture) or NULL if not available.
MikroCAD_Measure
MC3D_EXPORT long __cdecl MikroCAD_Measure(bool bOnSensor=true)
Start a measurement and lock the data buffer.
MikroCAD_DeinitializeStaticLib
MC3D_EXPORT void __cdecl MikroCAD_DeinitializeStaticLib()
Deinitializes global library.
MikroCAD_SwitchOnOffProjectorLamp
MC3D_EXPORT void __cdecl MikroCAD_SwitchOnOffProjectorLamp(bool bOn)
Switch on/off the projector lamp.
MikroCAD_GetNumPredefinedMeasParameterSets
MC3D_EXPORT unsigned long __cdecl MikroCAD_GetNumPredefinedMeasParameterSets()
Returns the number of predefined measurement parameter sets.
ProjectorLampState
ProjectorLampState
Projector lamp state.
Definition: MeasurementDefs.h:290
MikroCAD_ResetProjectionArea
MC3D_EXPORT void __cdecl MikroCAD_ResetProjectionArea()
Resets the projection area.
MikroCAD_UsePrefilter
MC3D_EXPORT void __cdecl MikroCAD_UsePrefilter(unsigned char byUse)
Turn pre-filter on or off.
MikroCAD_GetMeasProgramSetPtr
MC3D_EXPORT CMeasProgramSet *__cdecl MikroCAD_GetMeasProgramSetPtr()
Returns a pointer to the measuring program set object.
MikroCAD_GetCameraImageROI8
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)
MikroCAD_GridCalibration
MC3D_EXPORT long __cdecl MikroCAD_GridCalibration()
Executes a grid calibration.
MikroCAD_UnlockDataBuffer
MC3D_EXPORT void __cdecl MikroCAD_UnlockDataBuffer()
Unlocks the data buffer.
MikroCAD_IsDataBufferLocked
MC3D_EXPORT bool __cdecl MikroCAD_IsDataBufferLocked()
Is data buffer locked?
MikroCAD_SetProjectionArea
MC3D_EXPORT void __cdecl MikroCAD_SetProjectionArea(double dSizeX, double dSizeY, double dX0, double dY0)
Sets the projection area.
MeasurementDefs.h
Defines for measurement module for sensors with 1 projector and 1 camera.
MikroCAD_SetUserDefinedParameterSet
MC3D_EXPORT void __cdecl MikroCAD_SetUserDefinedParameterSet(long lIndex, long lProjectorBrightness, long lCameraShutter, long lCameraGain)
Set user defined parameter set.
SensorTypeID
SensorTypeID
List of the IDs of all available sensor types.
Definition: MeasurementDefs.h:20
MikroCAD_GetCameraImage8
MC3D_EXPORT long __cdecl MikroCAD_GetCameraImage8(unsigned char *pbyImage, unsigned long dwAverage=1)
Gets a camera image (Black / White)
MikroCAD_GetCameraImage24
MC3D_EXPORT long __cdecl MikroCAD_GetCameraImage24(unsigned char *pbyImage, unsigned long dwAverage=1)
Gets a camera image (Color)
MikroCAD_GetIntegerParameter
MC3D_EXPORT long __cdecl MikroCAD_GetIntegerParameter(MeasurementParameterID ParameterID, long &lParameter)
Read integer parameter.
MikroCAD_WriteInitialParameterToFile
MC3D_EXPORT long __cdecl MikroCAD_WriteInitialParameterToFile(char *pszFileName)
Writes the initial parameters to file.
MikroCAD_SetMeasurementAreaMask
MC3D_EXPORT void __cdecl MikroCAD_SetMeasurementAreaMask(unsigned char *pbyMeasArea)
Sets the measurement area.
MikroCAD_PowerSpectrumPtr
MC3D_EXPORT short *__cdecl MikroCAD_PowerSpectrumPtr()
Returns a pointer to the power spectrum.
MikroCAD_GetPredefinedMeasParameterSetName
MC3D_EXPORT char *__cdecl MikroCAD_GetPredefinedMeasParameterSetName(unsigned long dwIndex)
Returns the name of a predefined measurement parameter sets.
MikroCAD_CalibrationOnSensor
MC3D_EXPORT bool __cdecl MikroCAD_CalibrationOnSensor(unsigned long dwSensorNo, CalibrationMode CalMode)
Is there any calibration on sensor (Sensor mustn't be initialized)
SensorOperatingMode_Measure
Initialized for measurements only.
Definition: MeasurementDefs.h:39
MikroCAD_GetCurrentMeasurementProgram
MC3D_EXPORT char *__cdecl MikroCAD_GetCurrentMeasurementProgram()
Get current measurement program ("" - Default measurement program)
MikroCAD_StartSensorEvent
MC3D_EXPORT void __cdecl MikroCAD_StartSensorEvent(MikroCADEventFunc EventFunc)
Registers a event function.
MikroCAD_SetMeasurementArea
MC3D_EXPORT void __cdecl MikroCAD_SetMeasurementArea(double dSizeX, double dSizeY, double dX0, double dY0)
Sets the measurement area.
MikroCAD_SetUSBCommErrorHandler
MC3D_EXPORT long __cdecl MikroCAD_SetUSBCommErrorHandler(COMM_ERROR funcPtr)
Register a function to be called when a USB communication error happens.
MikroCAD_GetNumAvailableEventTypes
MC3D_EXPORT unsigned long __cdecl MikroCAD_GetNumAvailableEventTypes()
Returns the number of the available event types.
MikroCAD_InitializeStaticLib
MC3D_EXPORT void __cdecl MikroCAD_InitializeStaticLib()
Initializes global library.
MikroCAD_GetSensorSerialNumberType
MC3D_EXPORT unsigned long __cdecl MikroCAD_GetSensorSerialNumberType(unsigned long dwIndex)
Returns the serial number of a listed sensor of a special type.
MikroCAD_GetUserDataFileDirectoryItem
MC3D_EXPORT char *__cdecl MikroCAD_GetUserDataFileDirectoryItem(long lIndex)
Return a user data file item from directory.
MikroCAD_WriteMeasProgramDataToFile
MC3D_EXPORT long __cdecl MikroCAD_WriteMeasProgramDataToFile(char *pszFileName)
Writes the measurement program data to file.
MikroCAD_ProjectImage24
MC3D_EXPORT long __cdecl MikroCAD_ProjectImage24(unsigned char *pbyImage)
Projects a color image.
COMM_ERROR
void(__stdcall * COMM_ERROR)()
Callback prototype for MikroCAD_SetUSBCommErrorHandler.
Definition: MeasurementDefs.h:443
MikroCAD_ValidDataPtr
MC3D_EXPORT unsigned char *__cdecl MikroCAD_ValidDataPtr()
Returns a pointer to valid data or NULL if not available.
MikroCAD_GetFloatParameterLimits
MC3D_EXPORT long __cdecl MikroCAD_GetFloatParameterLimits(MeasurementParameterID ParameterID, double &dMinParameter, double &dMaxParameter)
Read float parameter limits.
MikroCAD_GetCalibrationResultData
MC3D_EXPORT short *__cdecl MikroCAD_GetCalibrationResultData()
Returns a pointer to result data.
MikroCAD_ReadSensorDescription
MC3D_EXPORT TSensorDescription *__cdecl MikroCAD_ReadSensorDescription(long lIndex)
Reads the sensor description.
CalibrationMode
CalibrationMode
Calibration modes.
Definition: MeasurementDefs.h:346
CMeasProgramSet
Measurement program set class.
Definition: MeasProgram.h:387
MikroCAD_GetEventType
MC3D_EXPORT SensorEventType __cdecl MikroCAD_GetEventType(long lIndex)
Returns the sensor event type.
SensorOperatingMode
SensorOperatingMode
Sensor operating mode.
Definition: MeasurementDefs.h:37
MikroCAD_StopSensorEvent
MC3D_EXPORT void __cdecl MikroCAD_StopSensorEvent()
Unregisters all event functions.
MikroCAD_SwitchOnOffProjectorLampAvailable
MC3D_EXPORT bool __cdecl MikroCAD_SwitchOnOffProjectorLampAvailable()
Is projector lamp switch on / off available?
MikroCAD_GetNumGrooveCalibrations
MC3D_EXPORT long __cdecl MikroCAD_GetNumGrooveCalibrations()
Gets the number of grove calibrations.
MikroCAD_ListAllSensorsType
MC3D_EXPORT unsigned long __cdecl MikroCAD_ListAllSensorsType(SensorTypeID SensorType)
List all available sensors of a special type (before connection with the sensor)
MikroCAD_ProjectValue
MC3D_EXPORT long __cdecl MikroCAD_ProjectValue(unsigned char cValue)
Projects a gray value (whole image the same color)
MikroCAD_GetMultiLevelCalibrationBufferSize
MC3D_EXPORT unsigned long __cdecl MikroCAD_GetMultiLevelCalibrationBufferSize()
Get multi level calibration parameters buffer size.
MikroCAD_SetFloatParameter
MC3D_EXPORT long __cdecl MikroCAD_SetFloatParameter(MeasurementParameterID ParameterID, double dParameter)
Write float parameter.
MikroCAD_GetSimpleCalibrationParameter
MC3D_EXPORT bool __cdecl MikroCAD_GetSimpleCalibrationParameter(unsigned char *pbyData)
Load the simple calibration parameters and transfer this in a byte buffer.
MeasurementParameterID
MeasurementParameterID
Parameter IDs.
Definition: MeasurementDefs.h:160
MikroCAD_GetSensorModuleInfo
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.
MikroCAD_GetNumConnectedSensorModules
MC3D_EXPORT unsigned long __cdecl MikroCAD_GetNumConnectedSensorModules()
Returns the number of the connected sensor modules.
MikroCAD_GrooveCalibration
MC3D_EXPORT long __cdecl MikroCAD_GrooveCalibration(long lIndex)
Executes a groove calibration.
MikroCAD_GetMultiLevelCalibrationParameter
MC3D_EXPORT bool __cdecl MikroCAD_GetMultiLevelCalibrationParameter(unsigned char *pbyData)
Load the multi level calibration parameters and transfer this in a byte buffer.
MikroCAD_SetProgramPath
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...
MikroCAD_GetDefaultMeasProgramName
MC3D_EXPORT char *__cdecl MikroCAD_GetDefaultMeasProgramName()
Which measuring program is identical to the default measuring program.
MikroCAD_GetCurrentMeasurementProgramIndex
MC3D_EXPORT long __cdecl MikroCAD_GetCurrentMeasurementProgramIndex()
Get current measurement program index (< 0 - Default measurement program)
CalibrationExport.h
Calibration parameters for export.
MikroCAD_GetSensorSerialNumber
MC3D_EXPORT unsigned long __cdecl MikroCAD_GetSensorSerialNumber(unsigned long dwIndex)
Returns the serial number of a listed sensor.
MikroCAD_SetIntegerParameter
MC3D_EXPORT long __cdecl MikroCAD_SetIntegerParameter(MeasurementParameterID ParameterID, long lParameter)
Write integer parameter.
MikroCAD_ReadInitialParameterFromFile
MC3D_EXPORT long __cdecl MikroCAD_ReadInitialParameterFromFile(char *pszFileName)
Reads the initial parameters from file.
MikroCAD_SaveHardwareLogfile
MC3D_EXPORT long __cdecl MikroCAD_SaveHardwareLogfile(const char *filename)
Save the hardware log file to the given file name (file will be overwritten!)
MikroCAD_ResetToFactorySettings
MC3D_EXPORT long __cdecl MikroCAD_ResetToFactorySettings(ConfigDataTransferMode Mode)
Reset the current settings to factory settings.
MikroCAD_GetModuleVersionInfo
MC3D_EXPORT void __cdecl MikroCAD_GetModuleVersionInfo(unsigned long &dwModuleVersion, unsigned long &dwInterfaceVersion)
Returns version infos (no connection with the sensor necessary)
MikroCAD_SetSimpleCalibrationParameter
MC3D_EXPORT bool __cdecl MikroCAD_SetSimpleCalibrationParameter(unsigned char *pbyData)
Save the simple calibration parameters from a buffer to the scanner.
MikroCAD_GetSensorTypeID
MC3D_EXPORT SensorTypeID __cdecl MikroCAD_GetSensorTypeID()
Returns the Sensor type id.
MikroCAD_ProjectStripePattern
MC3D_EXPORT long __cdecl MikroCAD_ProjectStripePattern(short nPatternIndex, bool bInvers)
Projects a predefined stripe pattern.
MikroCAD_ReadUserDataFile
MC3D_EXPORT bool __cdecl MikroCAD_ReadUserDataFile(char *pszDataFileName, unsigned char *pbyData)
Reads a user data file from the scanner.
MikroCAD_ListUserDataFileDirectory
MC3D_EXPORT long __cdecl MikroCAD_ListUserDataFileDirectory(char *pszMask)
List all user data files on scanner (directory)
MikroCAD_UserDataFileExists
MC3D_EXPORT bool __cdecl MikroCAD_UserDataFileExists(char *pszDataFileName)
User data file item exists ?
MikroCAD_PlaneCalibration
MC3D_EXPORT long __cdecl MikroCAD_PlaneCalibration()
Executes a plane calibration.
MikroCAD_ResetMeasurementArea
MC3D_EXPORT void __cdecl MikroCAD_ResetMeasurementArea()
Resets the measurement area.
MikroCAD_ProjectPattern
MC3D_EXPORT long __cdecl MikroCAD_ProjectPattern(short nPatternIndex)
Projects a predefined pattern (cross, ...)
MikroCAD_ProjectImage8
MC3D_EXPORT long __cdecl MikroCAD_ProjectImage8(unsigned char *pbyImage)
Projects a black / white image.
MikroCAD_ParameterAvailable
MC3D_EXPORT unsigned long __cdecl MikroCAD_ParameterAvailable(MeasurementParameterID ParameterID)
Is parameter available.
MikroCAD_UnlockCalibrationDataBuffer
MC3D_EXPORT void __cdecl MikroCAD_UnlockCalibrationDataBuffer()
Unlock the calibration data buffer.
MeasProgram.h
Measurement programs.
TSensorDescription
Description for sensors with separate projector and camera.
Definition: MeasurementDefs.h:75
MikroCAD_CalibrationToSensor
MC3D_EXPORT long __cdecl MikroCAD_CalibrationToSensor()
Calibration data transfer to sensor.
MikroCAD_WriteUserDataFile
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.
MikroCAD_Initialize
MC3D_EXPORT long __cdecl MikroCAD_Initialize(unsigned long dwSensorNo, SensorOperatingMode OperatingMode=SensorOperatingMode_Measure)
Initialize the measurement module.
MikroCAD_ListAllSensors
MC3D_EXPORT unsigned long __cdecl MikroCAD_ListAllSensors()
List all available sensors (Before connection with the sensor)
MikroCAD_GetSimpleCalibrationBufferSize
MC3D_EXPORT unsigned long __cdecl MikroCAD_GetSimpleCalibrationBufferSize()
Get simple calibration parameters buffer size.
MikroCAD_ReadConfig
MC3D_EXPORT long __cdecl MikroCAD_ReadConfig()
Reads the configuration.
MikroCAD_SelectCurrentMeasurementProgram
MC3D_EXPORT long __cdecl MikroCAD_SelectCurrentMeasurementProgram(char *pszMeasProgName=NULL)
Selects the current measurement program.
MikroCAD_ProjectColorValue
MC3D_EXPORT long __cdecl MikroCAD_ProjectColorValue(unsigned char cRed, unsigned char cGreen, unsigned char cBlue)
Projects a color value (whole image the same color)
MikroCAD_GetCalibrationState
MC3D_EXPORT unsigned long __cdecl MikroCAD_GetCalibrationState()
Returns the calibration state.
MikroCAD_SetProjectionMask
MC3D_EXPORT void __cdecl MikroCAD_SetProjectionMask(unsigned char *pbyMask)
Set projection mask.
MikroCAD_EnableUserDefinedParameterSet
MC3D_EXPORT void __cdecl MikroCAD_EnableUserDefinedParameterSet(bool bEnabled)
Enable / disable user defined parameter ?