IScanningProcedureObserver.h
Go to the documentation of this file.
1 /********************************************************************
2 *
3 * Project Artec 3D Scanning SDK
4 *
5 * Purpose: Scanning procedure observer interface.
6 *
7 * Copyright: Artec Group
8 *
9 ********************************************************************/
10 
11 #ifndef _ISCANNINGPROCEDUREOBSERVER_H_
12 #define _ISCANNINGPROCEDUREOBSERVER_H_
13 
14 #include <artec/sdk/base/Errors.h>
15 #include <artec/sdk/base/RefBase.h>
16 #include <artec/sdk/base/IScan.h>
19 
20 
21 namespace artec { namespace sdk { namespace scanning
22 {
23 using namespace artec::sdk::base::errors;
24 
25 /// Scanned frame state
27 {
35  FrameState_ForceDword = 0x7fffffff /* force 32-bit size enum */
36 };
37 
39 {
40  const artec::sdk::base::IFrameMesh* frame; ///< new frame to add
41  artec::sdk::base::Matrix4x4D transformation; ///< frame's transformation matrix
42  const artec::sdk::base::IImage* rawTexture; ///< raw frame texture camera image
43  double registrationError; ///< registration error (negative means registration failed)
44  bool geometryKeyFrame; ///< frame is geometry skeleton
45  bool textureKeyFrame; ///< frame is texture keyframe
46  FrameState frameState; ///< state of the frame (processing stage, where error occurred: capture/reconstruction/registration)
47  ErrorCode errorCode; ///< type of error, which occurred during processing. ErrorCode_OK if frameState == FrameState_Okay
48  int scannerIndex; ///< scanner index in bundle. 0 - when no bundle used
49 };
50 
52 {
53 public:
54  /// Called after new scanned frame was captured
55  /// Synchronized, but will be called from many different threads
56  /// This function called in such order, as frame was captured, no additional sorting needed
57  /// Do not make large calculation here - just save data for handling in other thread
58  virtual void onFrameCaptured(const RegistrationInfo* frameInfo) = 0;
59 
60  /// Called after new scanned frame was added to scan
61  /// Synchronized, but will be called from many different threads
62  /// This function called in such order, as frame was captured and registered, no additional sorting needed
63  /// Do not make large calculation here - just save data for handling in other thread
64  virtual void onFrameScanned(const RegistrationInfo* frameInfo) = 0;
65 
66  /// called after scanning in finished, but before texture conversion
67  virtual void onScanningFinished(int scannerIndex) = 0;
68 };
69 
70 /// You can inherit this class instead of IScanningProcedureObserver interface
71 /// Reference counting already implemented
72 class ScanningProcedureObserverBase : public artec::sdk::base::RefBase<IScanningProcedureObserver>
73 {
74 };
75 
76 } } } // namespace artec::sdk::scanning
77 
78 #endif // _ISCANNINGPROCEDUREOBSERVER_H_
This namespace is auto-generated from internal event code list.
Definition: Errors.h:55
double registrationError
registration error (negative means registration failed)
artec::sdk::base::Matrix4x4D transformation
frame's transformation matrix
FrameState frameState
state of the frame (processing stage, where error occurred: capture/reconstruction/registration) ...
ErrorCode errorCode
type of error, which occurred during processing. ErrorCode_OK if frameState == FrameState_Okay ...
bool geometryKeyFrame
frame is geometry skeleton
const artec::sdk::base::IFrameMesh * frame
new frame to add
int scannerIndex
scanner index in bundle. 0 - when no bundle used
bool textureKeyFrame
frame is texture keyframe
const artec::sdk::base::IImage * rawTexture
raw frame texture camera image
FrameState
Scanned frame state.