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
lvr2::GrowingCellStructure::m_boxFactor
float m_boxFactor
Definition: GrowingCellStructure.hpp:115
lvr2::GrowingCellStructure::getNeighborLearningRate
float getNeighborLearningRate() const
Definition: GrowingCellStructure.hpp:47
BaseOption.hpp
lvr2::GrowingCellStructure
Definition: GrowingCellStructure.hpp:19
lvr2::GrowingCellStructure::cellVecSize
int cellVecSize()
lvr2::GrowingCellStructure::getNumSplits
int getNumSplits() const
Definition: GrowingCellStructure.hpp:39
PointsetSurface.hpp
lvr2::GrowingCellStructure::setNeighborLearningRate
void setNeighborLearningRate(float m_neighborLearningRate)
Definition: GrowingCellStructure.hpp:79
lvr2::HashMap
Definition: HashMap.hpp:47
lvr2::GrowingCellStructure::setBasicSteps
void setBasicSteps(int m_basicSteps)
Definition: GrowingCellStructure.hpp:63
TumbleTree.hpp
lvr2::GrowingCellStructure::m_basicSteps
int m_basicSteps
Definition: GrowingCellStructure.hpp:113
lvr2::GrowingCellStructure::initTestMesh
void initTestMesh()
lvr2::GrowingCellStructure::getMesh
void getMesh(HalfEdgeMesh< BaseVecT > &mesh)
lvr2::GrowingCellStructure::m_avgFaceSize
float m_avgFaceSize
Definition: GrowingCellStructure.hpp:141
lvr2::DynamicKDTree
Definition: DynamicKDTree.hpp:19
lvr2::GrowingCellStructure::getLearningRate
float getLearningRate() const
Definition: GrowingCellStructure.hpp:45
lvr2::GrowingCellStructure::m_avgEdgeLength
float m_avgEdgeLength
Definition: GrowingCellStructure.hpp:142
lvr2::GrowingCellStructure::m_deleteLongEdgesFactor
int m_deleteLongEdgesFactor
Definition: GrowingCellStructure.hpp:133
lvr2::GrowingCellStructure::getAllowMiss
int getAllowMiss() const
Definition: GrowingCellStructure.hpp:51
lvr2::GrowingCellStructure::notFoundCounter
int notFoundCounter
Definition: GrowingCellStructure.hpp:134
lvr2::GrowingCellStructure::setFilterChain
void setFilterChain(bool m_filterChain)
Definition: GrowingCellStructure.hpp:96
lvr2::GrowingCellStructure::m_limSkip
float m_limSkip
Definition: GrowingCellStructure.hpp:144
lvr2::GrowingCellStructure::getRuntime
int getRuntime() const
Definition: GrowingCellStructure.hpp:35
lvr2::GrowingCellStructure::cellArr
std::vector< Cell * > cellArr
Definition: GrowingCellStructure.hpp:127
lvr2::GrowingCellStructure::setAllowMiss
void setAllowMiss(int m_allowMiss)
Definition: GrowingCellStructure.hpp:89
lvr2::GrowingCellStructure::m_mesh
HalfEdgeMesh< BaseVecT > * m_mesh
Definition: GrowingCellStructure.hpp:109
lvr2::GrowingCellStructure::m_maxAge
float m_maxAge
Definition: GrowingCellStructure.hpp:146
HalfEdgeMesh.hpp
lvr2::GrowingCellStructure::m_interior
bool m_interior
Definition: GrowingCellStructure.hpp:120
DynamicKDTree.hpp
lvr2::GrowingCellStructure::m_balances
int m_balances
Definition: GrowingCellStructure.hpp:121
lvr2::GrowingCellStructure::removeWrongFaces
void removeWrongFaces()
lvr2::GrowingCellStructure::GrowingCellStructure
GrowingCellStructure(PointsetSurfacePtr< BaseVecT > &surface)
lvr2::GrowingCellStructure::setDecreaseFactor
void setDecreaseFactor(float m_decreaseFactor)
Definition: GrowingCellStructure.hpp:84
lvr2::PointsetSurfacePtr
std::shared_ptr< PointsetSurface< BaseVecT > > PointsetSurfacePtr
Definition: PointsetSurface.hpp:161
lvr2::GrowingCellStructure::isFilterChain
bool isFilterChain() const
Definition: GrowingCellStructure.hpp:55
lvr2::GrowingCellStructure::performLaplacianSmoothing
void performLaplacianSmoothing(VertexHandle vertexH, BaseVecT random, float factor=0.01)
lvr2::GrowingCellStructure::getBoxFactor
float getBoxFactor() const
Definition: GrowingCellStructure.hpp:41
lvr2::GrowingCellStructure::setNumBalances
void setNumBalances(int m_balances)
Definition: GrowingCellStructure.hpp:105
HashMap.hpp
lvr2::GrowingCellStructure::m_avgSignalCounter
float m_avgSignalCounter
Definition: GrowingCellStructure.hpp:122
lvr2::GrowingCellStructure::setWithCollapse
void setWithCollapse(bool m_withCollapse)
Definition: GrowingCellStructure.hpp:69
lvr2::VertexHandle
Handle to access vertices of the mesh.
Definition: Handles.hpp:146
lvr2::GrowingCellStructure::m_limSingle
float m_limSingle
Definition: GrowingCellStructure.hpp:145
lvr2::GrowingCellStructure::m_collapseThreshold
float m_collapseThreshold
Definition: GrowingCellStructure.hpp:132
lvr2::GrowingCellStructure::avgValence
double avgValence()
lvr2::GrowingCellStructure::m_allowMiss
int m_allowMiss
Definition: GrowingCellStructure.hpp:131
lvr2::GrowingCellStructure::m_runtime
int m_runtime
Definition: GrowingCellStructure.hpp:112
lvr2::GrowingCellStructure::flipCounter
int flipCounter
Definition: GrowingCellStructure.hpp:135
lvr2::GrowingCellStructure::getCollapseThreshold
float getCollapseThreshold() const
Definition: GrowingCellStructure.hpp:53
lvr2::GrowingCellStructure::m_numSplits
int m_numSplits
Definition: GrowingCellStructure.hpp:114
lvr2::GrowingCellStructure::m_filterChain
bool m_filterChain
Definition: GrowingCellStructure.hpp:119
lvr2::PacmanProgressBar
Definition: Progress.hpp:202
lvr2::GrowingCellStructure::m_neighborLearningRate
float m_neighborLearningRate
Definition: GrowingCellStructure.hpp:118
lvr2::GrowingCellStructure::equilaterality
std::pair< double, double > equilaterality()
lvr2::GrowingCellStructure::m_decreaseFactor
float m_decreaseFactor
Definition: GrowingCellStructure.hpp:130
lvr2::GrowingCellStructure::avgDistanceBetweenPointsInPointcloud
double avgDistanceBetweenPointsInPointcloud()
lvr2::GrowingCellStructure::numVertexValences
int numVertexValences(int minValence)
lvr2::GrowingCellStructure::executeBasicStep
void executeBasicStep(PacmanProgressBar &progress_bar)
lvr2::GrowingCellStructure::getDeleteLongEdgesFactor
int getDeleteLongEdgesFactor() const
Definition: GrowingCellStructure.hpp:57
lvr2::GrowingCellStructure::getClosestPointInMesh
VertexHandle getClosestPointInMesh(BaseVecT point, PacmanProgressBar &progress_bar)
lvr2::GrowingCellStructure::getDecreaseFactor
float getDecreaseFactor() const
Definition: GrowingCellStructure.hpp:49
lvr2::GrowingCellStructure::setNumSplits
void setNumSplits(int m_numSplits)
Definition: GrowingCellStructure.hpp:65
lvr2::GrowingCellStructure::setRuntime
void setRuntime(int m_runtime)
Definition: GrowingCellStructure.hpp:61
lvr2
Definition: BaseBufferManipulators.hpp:39
lvr2::GrowingCellStructure::m_withRemove
bool m_withRemove
Definition: GrowingCellStructure.hpp:147
lvr2::GrowingCellStructure::setDeleteLongEdgesFactor
void setDeleteLongEdgesFactor(int m_deleteLongEdgesFactor)
Definition: GrowingCellStructure.hpp:98
lvr2::GrowingCellStructure::setLearningRate
void setLearningRate(float m_learningRate)
Definition: GrowingCellStructure.hpp:74
lvr2::GrowingCellStructure::isInterior
bool isInterior() const
Definition: GrowingCellStructure.hpp:59
lvr2::GrowingCellStructure::m_useGSS
bool m_useGSS
Definition: GrowingCellStructure.hpp:138
lvr2::GrowingCellStructure::executeEdgeCollapse
void executeEdgeCollapse()
lvr2::GrowingCellStructure::faceAgeErrorMap
HashMap< FaceHandle, std::pair< float, float > > faceAgeErrorMap
Definition: GrowingCellStructure.hpp:140
lvr2::GrowingCellStructure::getBasicSteps
int getBasicSteps() const
Definition: GrowingCellStructure.hpp:37
lvr2::GrowingCellStructure::setBoxFactor
void setBoxFactor(float m_boxFactor)
Definition: GrowingCellStructure.hpp:67
lvr2::GrowingCellStructure::setInterior
void setInterior(bool m_interior)
Definition: GrowingCellStructure.hpp:103
lvr2::GrowingCellStructure::getRandomPointFromPointcloud
BaseVecT getRandomPointFromPointcloud()
lvr2::GrowingCellStructure::executeVertexSplit
void executeVertexSplit()
lvr2::GrowingCellStructure::aggressiveCutOut
void aggressiveCutOut(VertexHandle vH)
lvr2::GrowingCellStructure::setCollapseThreshold
void setCollapseThreshold(float m_collapseThreshold)
Definition: GrowingCellStructure.hpp:91
lvr2::GrowingCellStructure::m_withCollapse
bool m_withCollapse
Definition: GrowingCellStructure.hpp:116
lvr2::TumbleTree
Definition: TumbleTree.hpp:24
lvr2::GrowingCellStructure::isWithCollapse
bool isWithCollapse() const
Definition: GrowingCellStructure.hpp:43
mesh
HalfEdgeMesh< Vec > mesh
Definition: src/tools/lvr2_gs_reconstruction/Main.cpp:26
lvr2::GrowingCellStructure::getInitialMesh
void getInitialMesh()
lvr2::GrowingCellStructure::tumble_tree
TumbleTree * tumble_tree
Definition: GrowingCellStructure.hpp:125
lvr2::GrowingCellStructure::m_surface
PointsetSurfacePtr< BaseVecT > * m_surface
Definition: GrowingCellStructure.hpp:108
lvr2::GrowingCellStructure::kd_tree
DynamicKDTree< BaseVecT > * kd_tree
Definition: GrowingCellStructure.hpp:126
lvr2::HalfEdgeMesh
Half-edge data structure implementing the BaseMesh interface.
Definition: HalfEdgeMesh.hpp:70
lvr2::GrowingCellStructure::m_learningRate
float m_learningRate
Definition: GrowingCellStructure.hpp:117


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 Wed Mar 2 2022 00:37:23