SCENE C++ API  2.1.0
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 
10 namespace SCENE_API {
11 
12 // Forward declarations
13 class LSScan_Implementation;
14 
19 class LSScan : public LSObject
20 {
21  LS_UNCOPYABLE(LSScan)
22 
23 public:
24 
28  {
29  DXF = 0,
30  E57 = 1,
31  FLS = 2,
32  IGS = 3,
33  POD = 4,
34  PTS = 5,
35  PTX = 6,
36  WRL = 7,
37  XYB = 8,
38  XYZ = 9,
39  CPE = 10,
40  BMP = 11,
41  JPG = 12,
42  PNG = 13,
43  TIF = 14,
44  LAS = 15
45  };
46 
50  {
53  AUTO,
55  };
56 
62  CORE_API_EXPORT bool dataAvailable(DataFormat format = AUTO) const;
63 
69  CORE_API_EXPORT bool dataLoaded(DataFormat format = AUTO) const;
70 
77  CORE_API_EXPORT LSResult::Result loadData(DataFormat format = AUTO);
78 
81  CORE_API_EXPORT void unloadData();
82 
90  CORE_API_EXPORT LSResult::Result exportData(
91  LSString filePath,
92  ExportFormat format);
93 
103 
111 
115  CORE_API_EXPORT bool spatialDataAvailable() const;
116 
122  CORE_API_EXPORT LSResult::Result exportSpatialData(
123  LSString filePath,
124  ExportFormat format);
125 
132 
157 
163 
169 
173  CORE_API_EXPORT int getNumCols() const;
174 
178  CORE_API_EXPORT int getNumRows() const;
179 
188  CORE_API_EXPORT void setPointColor(int col, int row, uint8_t r, uint8_t g, uint8_t b);
189 
196  CORE_API_EXPORT void setPointReflection(int col, int row, float reflection);
197 
203  CORE_API_EXPORT void deletePoint(int col, int row);
204 
211  CORE_API_EXPORT void select2d(int colLeft, int colRight, int rowTop, int rowBottom);
212 
222  CORE_API_EXPORT LSResult::Result getOverlap(int& startColumn1, int& columns1, int& startColumn2, int& columns2) const;
223 
231  CORE_API_EXPORT bool isUnstructured() const;
232 
242  CORE_API_EXPORT bool getPointColor(int col, int row, uint8_t& r, uint8_t& g, uint8_t& b) const;
243 
255  CORE_API_EXPORT bool getPointColor(int col, int row, uint8_t& r, uint8_t& g, uint8_t& b, bool& isRGB) const;
256 
264  CORE_API_EXPORT bool getPointReflection(int col, int row, float& reflection) const;
265 
275 
287  CORE_API_EXPORT bool getPointNormal(int col, int row, float& nX, float& nY, float& nZ) const;
288 
298 
299 
302  CORE_API_EXPORT LSResult::Result getNearestScanPoint(const uint64_t& time, int& row, int& col) const;
303 
305  CORE_API_EXPORT LSResult::Result getTimeOfScanPoint(int row, int col, uint64_t& time) const;
306 
309  CORE_API_EXPORT LSResult::Result getTimeOfSyncPulse(int col, uint64_t& time) const;
310 
311 protected:
312  LS_INTERFACE(LSScan, LSObject)
313 };
314 
315 }