SCENE C++ API  2.1.6
lsscan.h
1 #pragma once
2 
3 #include <core_api/lsglobaldefinitions.h>
4 #include <core_api/ref_ptr.h>
5 #include <core_api/lsobject.h>
6 #include <core_api/lspointtypes.h>
7 #include <core_api/lsscaniterator.h>
8 #include <core_api/lssphericaliterator.h>
9 #include <core_api/lspanoramapicture.h>
10 
11 namespace SCENE_API {
12 
13 // Forward declarations
14 class LSScan_Implementation;
15 
20 class LSScan : public LSObject
21 {
22  LS_UNCOPYABLE(LSScan)
23 
24 public:
25 
29  {
30  DXF = 0,
31  E57 = 1,
32  FLS = 2,
33  IGS = 3,
34  POD = 4,
35  PTS = 5,
36  PTX = 6,
37  WRL = 7,
38  XYB = 8,
39  XYZ = 9,
40  CPE = 10,
41  BMP = 11,
42  JPG = 12,
43  PNG = 13,
44  TIF = 14,
45  LAS = 15
46  };
47 
51  {
54  AUTO,
56  };
57 
63  CORE_API_EXPORT bool dataAvailable(DataFormat format = AUTO) const;
64 
70  CORE_API_EXPORT bool dataLoaded(DataFormat format = AUTO) const;
71 
78  CORE_API_EXPORT LSResult::Result loadData(DataFormat format = AUTO);
79 
82  CORE_API_EXPORT void unloadData();
83 
91  CORE_API_EXPORT LSResult::Result exportData(
92  LSString filePath,
93  ExportFormat format);
94 
104 
112 
116  CORE_API_EXPORT bool spatialDataAvailable() const;
117 
123  CORE_API_EXPORT LSResult::Result exportSpatialData(
124  LSString filePath,
125  ExportFormat format);
126 
133 
158 
164 
170 
174  CORE_API_EXPORT int getNumCols() const;
175 
179  CORE_API_EXPORT int getNumRows() const;
180 
189  CORE_API_EXPORT void setPointColor(int col, int row, uint8_t r, uint8_t g, uint8_t b);
190 
197  CORE_API_EXPORT void setPointReflection(int col, int row, float reflection);
198 
204  CORE_API_EXPORT void deletePoint(int col, int row);
205 
212  CORE_API_EXPORT void select2d(int colLeft, int colRight, int rowTop, int rowBottom);
213 
223  CORE_API_EXPORT LSResult::Result getOverlap(int& startColumn1, int& columns1, int& startColumn2, int& columns2) const;
224 
232  CORE_API_EXPORT bool isUnstructured() const;
233 
243  CORE_API_EXPORT bool getPointColor(int col, int row, uint8_t& r, uint8_t& g, uint8_t& b) const;
244 
256  CORE_API_EXPORT bool getPointColor(int col, int row, uint8_t& r, uint8_t& g, uint8_t& b, bool& isRGB) const;
257 
265  CORE_API_EXPORT bool getPointReflection(int col, int row, float& reflection) const;
266 
276 
288  CORE_API_EXPORT bool getPointNormal(int col, int row, float& nX, float& nY, float& nZ) const;
289 
299 
300 
303  CORE_API_EXPORT LSResult::Result getNearestScanPoint(const uint64_t& time, int& row, int& col) const;
304 
306  CORE_API_EXPORT LSResult::Result getTimeOfScanPoint(int row, int col, uint64_t& time) const;
307 
310  CORE_API_EXPORT LSResult::Result getTimeOfSyncPulse(int col, uint64_t& time) const;
311 
316  CORE_API_EXPORT void createObjectMarker(unsigned int row, unsigned int col);
317 
321  CORE_API_EXPORT void selectPoly2d(LSPod<std::vector<Eigen::Vector2i>> poly);
322 
326  CORE_API_EXPORT LSPod<std::vector<ref_ptr<LSPanoramaPicture>>> getPanos() const;
327 
328 protected:
329  LS_INTERFACE(LSScan, LSObject)
330 };
331 
332 }