IScanningProcedure.h
Go to the documentation of this file.
1 /********************************************************************
2 *
3 * Project Artec 3D Scanning SDK
4 *
5 * Purpose: Scanning procedure
6 *
7 * Copyright: Artec Group
8 *
9 ********************************************************************/
10 
11 #ifndef _ISCANNINGPROCEDURE_H_
12 #define _ISCANNINGPROCEDURE_H_
13 
14 #include <artec/sdk/base/Errors.h>
15 #include <artec/sdk/base/IScan.h>
16 #include <artec/sdk/base/IJob.h>
17 #include <artec/sdk/base/Rect.h>
19 
20 namespace artec { namespace sdk { namespace capturing {
21  class IScanner;
22 } } }
23 
24 namespace artec { namespace sdk { namespace scanning
25 {
26 using namespace artec::sdk::base::errors;
27 
28 class IScanningProcedureObserver;
29 class IScanningProcedure;
30 
32 {
37 
38  ScanningState_ForceDword = 0x7fffffff /* force 32-bit size enum */
39 };
40 
42 {
44 
45  /// Texture will be captured automatically
48 
49  RegistrationAlgorithmType_ForceDword = 0x7fffffff /* force 32-bit size enum */
50 };
51 
53 {
54  /// Capture frames and reconstruct surfaces
56 
57  /// Convert textures from raw to color format
59 
60  /// Normals will be calculated if CaclulateNormals of RegisterFrame flags set
62 
63  /// Map Raw, Half-size or Full-size texture on the mesh
64  /// If no texture captured this action is skipped
66 
67  /// Make frame registration. When enabled, only unsuccessfully registered frames added to scan.
68  /// Otherwise all frames added to scan.
69  /// Normals will be calculated automatically for this case.
70  /// In case of texture or hybrid tracking type texture will be mapped also.
72 
73  /// Detect is captured frame is geometry key frame (skeleton frame).
74  /// If registration unsuccessful or ScanningPipeline_RegisterFrame not set this action is skipped
76 
77  /// Make only capture while scanning and execute all post-processing later.
78  /// Very suitable for scanning with bundle
80 
81  ScanningPipelene_ForceDword = 0x7fffffff /* force 32-bit size enum */
82 };
83 
84 /// Note. This setting define condition for full-size texture capturing
86 {
87  /// Don't capture textures at all
89 
90  /// Capture textures each N-th frame
92 
93  /// Capture textures only if frame detected as key frame for texturing algorithm
94  /// If registration unsuccessful or ScanningPipeline_FindGeometryKeyFrame not set this action is skipped
96 
97  /// Capture textures on each frame
99 
100  CaptureTextureMethod_ForceDword = 0x7fffffff /* force 32-bit size enum */
101 };
102 
104 {
105  /// 0 means no limit, negative values are not valid
107 
108  /// tracking type
110 
111  /// Combination of ScanningPipeline values
113 
114  /// Initial scanning state
116 
117  /// Callback interface for captured data processing
118  /// For example adding frames for rendering while scanning. Can be NULL
120 
121  /// if this flag is true, scanning procedure adds all successfully reconstructed frames to the result scan.
122  /// if flag is false, scanning procedure adds only successfully registered frames to the result scan.
123  /// flag influences the result only if "ScanningPipeline_RegisterFrame" is enabled.
125 
126  /// How to capture texture from scanner
128 
129  /// How often to capture texture.
130  /// Used for CaptureTextureMethod_EveryNFrame method
131  /// If CaptureTextureMethod_EveryNFrame selected, 0 and 1 means capture on every frame,
132  /// other values means "capture texture on each N't frame"
134 
135  /// This flag indicates that surfaces with reconstruction failures will be added to scan as "empty" ones
136  /// It might be useful for texturization algorithm afterwards and to preserve numbering between
137  /// frames of different scans (when scanning with bundle)
139 };
140 
141 extern "C"
142 {
143  /// Initializes scanning procedure descriptor with defaults settings
146 
149 }
150 
151 /// IScanningProcedure is controler of scanning procedure.
152 /// This class needs AlgorithmWorkset because the way of its calls is the same as in algorithms.
154 {
155 public:
156  ///get current scanning event handler
157  virtual ScanningState getState() = 0;
158 
159  ///set new scanning event handler
160  virtual ErrorCode setState( ScanningState state ) = 0;
161 
162  /**
163  * Set "improve by neighbor" sensitivity parameter
164  * used im mesh reconstruction
165  * can be changed while capture in progress
166  * @param sensitivity - value between 0.0f and 1.0f
167  */
168  virtual ErrorCode setSensitivity(float sensitivity) = 0;
169 
170  /**
171  * Get "improve by neighbor" sensitivity parameter
172  * used im mesh reconstruction
173  * @return sensitivity - value between 0.0f and 1.0f
174  */
175  virtual float getSensitivity() = 0;
176 
177  /**
178  * Update scanning range
179  * can be changed while capture in progress
180  */
181  virtual ErrorCode setScanningRange(float rangeNear, float rangeFar) = 0;
182 
183  /**
184  * Update scanning range
185  * @param rangeNear - near range limit
186  * @param rangeFar - far range limit
187  */
188  virtual ErrorCode getScanningRange(float* rangeNear, float* rangeFar) = 0;
189 
190  /**
191  * Update scanning region of interest
192  * can be changed while capture in progress
193  * call with rect == NULL for disable ROI
194  */
195  virtual ErrorCode setROI(artec::sdk::base::RectF* rect) = 0;
196 
197  /**
198  * Get scanning region of interest
199  * @param rect - rect to return
200  */
201  virtual ErrorCode getROI(artec::sdk::base::RectF* rect) = 0;
202 };
203 
204 } } } // namespace artec::sdk::scanning
205 
206 #endif // _ISCANNINGPROCEDURE_H_
ScanningState initialState
Initial scanning state.
RegistrationAlgorithmType registrationType
tracking type
This namespace is auto-generated from internal event code list.
Definition: Errors.h:55
Capture frames and reconstruct surfaces.
Normals will be calculated if CaclulateNormals of RegisterFrame flags set.
CaptureTextureMethod captureTexture
How to capture texture from scanner.
Texture will be captured automatically.
Convert textures from raw to color format.
int maxFrameCount
0 means no limit, negative values are not valid
#define ASCANNINGSDK_LINK_SPEC
CaptureTextureMethod
Note. This setting define condition for full-size texture capturing.
ErrorCode ASCANNINGSDK_LINK_SPEC createScanningProcedure(IScanningProcedure **job, artec::sdk::capturing::IScanner *scanner, const ScanningProcedureSettings *desc=NULL)
ErrorCode ASCANNINGSDK_LINK_SPEC initializeScanningProcedureSettings(ScanningProcedureSettings *desc)
Initializes scanning procedure descriptor with defaults settings.
int pipelineConfiguration
Combination of ScanningPipeline values.