SCENE C++ API  2.0.22
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 
9 namespace SCENE_API {
10 
11 // Forward declarations
12 class LSScan_Implementation;
13 
18 class LSScan : public LSObject
19 {
20  LS_UNCOPYABLE(LSScan)
21 
22 public:
23 
27  {
28  DXF = 0,
29  E57 = 1,
30  FLS = 2,
31  IGS = 3,
32  POD = 4,
33  PTS = 5,
34  PTX = 6,
35  WRL = 7,
36  XYB = 8,
37  XYZ = 9,
38  CPE = 10,
39  BMP = 11,
40  JPG = 12,
41  PNG = 13,
42  TIF = 14,
43  LAS = 15
44  };
45 
49  {
53  };
54 
60  CORE_API_EXPORT bool dataAvailable(DataFormat format = AUTO) const;
61 
67  CORE_API_EXPORT bool dataLoaded(DataFormat format = AUTO) const;
68 
75  CORE_API_EXPORT LSResult::Result loadData(DataFormat format = AUTO);
76 
79  CORE_API_EXPORT void unloadData();
80 
88  CORE_API_EXPORT LSResult::Result exportData(
89  LSString filePath,
90  ExportFormat format);
91 
101 
109 
113  CORE_API_EXPORT bool spatialDataAvailable() const;
114 
120  CORE_API_EXPORT LSResult::Result exportSpatialData(
121  LSString filePath,
122  ExportFormat format);
123 
129 
135 
141 
145  CORE_API_EXPORT int getNumCols() const;
146 
150  CORE_API_EXPORT int getNumRows() const;
151 
160  CORE_API_EXPORT void setPointColor(int col, int row, uint8_t r, uint8_t g, uint8_t b);
161 
168  CORE_API_EXPORT void setPointReflection(int col, int row, float reflection);
169 
175  CORE_API_EXPORT void deletePoint(int col, int row);
176 
183  CORE_API_EXPORT void select2d(int colLeft, int colRight, int rowTop, int rowBottom);
184 
194  CORE_API_EXPORT LSResult::Result getOverlap(int& startColumn1, int& columns1, int& startColumn2, int& columns2) const;
195 
203  CORE_API_EXPORT bool isUnstructured() const;
204 
214  CORE_API_EXPORT bool getPointColor(int col, int row, uint8_t& r, uint8_t& g, uint8_t& b) const;
215 
223  CORE_API_EXPORT bool getPointReflection(int col, int row, float& reflection) const;
224 
225 protected:
226  LS_INTERFACE(LSScan, LSObject)
227 };
228 
229 }