GrowingCellStructure.hpp
Go to the documentation of this file.
1 //
2 // Created by patrick on 10.02.19.
3 //
4 
5 #ifndef LAS_VEGAS_GROWINGCELLSTRUCTURE_HPP
6 #define LAS_VEGAS_GROWINGCELLSTRUCTURE_HPP
7 
14 
15 namespace lvr2
16 {
17 
18 template <typename BaseVecT, typename NormalT>
20 {
21  public:
27 
34 
35  int getRuntime() const { return m_runtime; }
36 
37  int getBasicSteps() const { return m_basicSteps; }
38 
39  int getNumSplits() const { return m_numSplits; }
40 
41  float getBoxFactor() const { return m_boxFactor; }
42 
43  bool isWithCollapse() const { return m_withCollapse; }
44 
45  float getLearningRate() const { return m_learningRate; }
46 
48 
49  float getDecreaseFactor() const { return m_decreaseFactor; }
50 
51  int getAllowMiss() const { return m_allowMiss; }
52 
53  float getCollapseThreshold() const { return m_collapseThreshold; }
54 
55  bool isFilterChain() const { return m_filterChain; }
56 
58 
59  bool isInterior() const { return m_interior; }
60 
62 
64 
66 
68 
70  {
72  }
73 
75  {
77  }
78 
80  {
82  }
83 
85  {
87  }
88 
90 
92  {
94  }
95 
97 
99  {
101  }
102 
104 
106 
107  private:
110 
111  // SHARED members
112  int m_runtime; // how many steps?
113  int m_basicSteps; // how many steps until collapse?
114  int m_numSplits; // how many splits
115  float m_boxFactor; // for initial mesh
116  bool m_withCollapse; // should we collapse?
117  float m_learningRate; // learning rate of the algorithm
119  bool m_filterChain; // should a filter chain be applied?
120  bool m_interior; // should the interior be reconstructed or the exterior?
123 
124  // "GCS" related members
127  std::vector<Cell*> cellArr; // TODO: OUTSOURCE IT INTO THE TUMBLETREE CLASS, NEW PARAMETER FOR
128  // THE TUMBLE TREE CONSTRUCTOR
129  // CONTAINING THE MAXMIMUM SIZE OF THE MESH
130  float m_decreaseFactor; // for sc calc
132  float m_collapseThreshold; // threshold for the collapse - when does it make sense
135  int flipCounter = 0;
136 
137  // "GSS" related members
138  bool m_useGSS = false;
140  faceAgeErrorMap; // hashmap for mapping a FaceHandle to <age, error>
141  float m_avgFaceSize = 0;
142  float m_avgEdgeLength = 0;
143 
144  float m_limSkip;
145  float m_limSingle;
146  float m_maxAge;
148 
149  // SHARED MEMBER FUNCTIONS
150 
151  void executeBasicStep(PacmanProgressBar& progress_bar);
152 
153  void executeVertexSplit();
154 
155  void executeEdgeCollapse();
156 
157  void getInitialMesh();
158 
159  BaseVecT getRandomPointFromPointcloud();
160 
161  VertexHandle getClosestPointInMesh(BaseVecT point, PacmanProgressBar& progress_bar);
162 
163  void initTestMesh(); // test
164 
165  // GCS MEMBER FUNCTIONS
166 
167  void performLaplacianSmoothing(VertexHandle vertexH, BaseVecT random, float factor = 0.01);
168 
170 
172 
173  int numVertexValences(int minValence);
174 
175  std::pair<double, double> equilaterality();
176 
177  double avgValence();
178 
179  // void coalescing();
180 
181  // ADDITIONAL FUNCTIONS
182 
183  void removeWrongFaces();
184 
185  int cellVecSize();
186 
187  // TODO: add gss related functions
188 };
189 } // namespace lvr2
190 
191 #include "lvr2/reconstruction/gs2/GrowingCellStructure.tcc"
192 
193 #endif // LAS_VEGAS_GROWINGCELLSTRUCTURE_HPP
void setNumBalances(int m_balances)
Handle to access vertices of the mesh.
Definition: Handles.hpp:146
HalfEdgeMesh< Vec > mesh
void setWithCollapse(bool m_withCollapse)
int numVertexValences(int minValence)
VertexHandle getClosestPointInMesh(BaseVecT point, PacmanProgressBar &progress_bar)
std::pair< double, double > equilaterality()
void setDeleteLongEdgesFactor(int m_deleteLongEdgesFactor)
void setBoxFactor(float m_boxFactor)
double avgDistanceBetweenPointsInPointcloud()
void setNumSplits(int m_numSplits)
HashMap< FaceHandle, std::pair< float, float > > faceAgeErrorMap
void executeBasicStep(PacmanProgressBar &progress_bar)
BaseVecT getRandomPointFromPointcloud()
void aggressiveCutOut(VertexHandle vH)
void setCollapseThreshold(float m_collapseThreshold)
PointsetSurfacePtr< BaseVecT > * m_surface
void setLearningRate(float m_learningRate)
DynamicKDTree< BaseVecT > * kd_tree
void setInterior(bool m_interior)
Half-edge data structure implementing the BaseMesh interface.
void setBasicSteps(int m_basicSteps)
void getMesh(HalfEdgeMesh< BaseVecT > &mesh)
void setFilterChain(bool m_filterChain)
void setNeighborLearningRate(float m_neighborLearningRate)
GrowingCellStructure(PointsetSurfacePtr< BaseVecT > &surface)
void setAllowMiss(int m_allowMiss)
std::shared_ptr< PointsetSurface< BaseVecT > > PointsetSurfacePtr
HalfEdgeMesh< BaseVecT > * m_mesh
void setDecreaseFactor(float m_decreaseFactor)
void performLaplacianSmoothing(VertexHandle vertexH, BaseVecT random, float factor=0.01)


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Mon Feb 28 2022 22:46:06