PointsetSurface.hpp
Go to the documentation of this file.
1 
35 #ifndef LVR2_RECONSTRUCTION_POINTSETSURFACE_HPP_
36 #define LVR2_RECONSTRUCTION_POINTSETSURFACE_HPP_
37 
38 #include <memory>
39 #include <utility>
40 
41 #include "lvr2/geometry/Normal.hpp"
42 #include "lvr2/io/PointBuffer.hpp"
45 
46 using std::pair;
47 
48 namespace lvr2
49 {
50 
51 
60 template<typename BaseVecT>
62 {
63 public:
64 
74  virtual pair<typename BaseVecT::CoordType, typename BaseVecT::CoordType>
75  distance(BaseVecT v) const = 0;
81  virtual void calculateSurfaceNormals() = 0;
82 
83 
84 
91  virtual Normal<float> getInterpolatedNormal(const BaseVecT& position) const;
92 
98  virtual PointBufferPtr pointBuffer() const;
99 
103  std::shared_ptr<SearchTree<BaseVecT>> searchTree() const;
104 
108  const BoundingBox<BaseVecT>& getBoundingBox() const;
109 
114  void setKi(int k) { m_ki = k; }
115 
120  void setKn(int k) { m_kn = k; }
121 
128  void setKd(int k) { m_kd = k; }
129 
130 protected:
131 
137  PointsetSurface(PointBufferPtr pointcloud);
138 
140 
143 
145  std::shared_ptr<SearchTree<BaseVecT>> m_searchTree;
146 
149 
151  int m_kn;
152 
154  int m_ki;
155 
157  int m_kd;
158 };
159 
160 template <typename BaseVecT>
161 using PointsetSurfacePtr = std::shared_ptr<PointsetSurface<BaseVecT>>;
162 
163 } // namespace lvr2
164 
165 #include "PointsetSurface.tcc"
166 
167 #endif /* LVR2_RECONSTRUCTION_POINTSETSURFACE_HPP_ */
lvr2::PointsetSurface::m_pointBuffer
PointBufferPtr m_pointBuffer
The point cloud used for surface approximation.
Definition: PointsetSurface.hpp:139
lvr2::PointsetSurface::PointsetSurface
PointsetSurface()
Definition: PointsetSurface.hpp:139
lvr2::PointsetSurface::getBoundingBox
const BoundingBox< BaseVecT > & getBoundingBox() const
Returns the bounding box of the point set.
lvr2::PointBufferPtr
std::shared_ptr< PointBuffer > PointBufferPtr
Definition: PointBuffer.hpp:130
SearchTree.hpp
lvr2::PointsetSurface::m_searchTree
std::shared_ptr< SearchTree< BaseVecT > > m_searchTree
The search tree that is built from the point cloud data.
Definition: PointsetSurface.hpp:145
lvr2::PointsetSurface::m_boundingBox
BoundingBox< BaseVecT > m_boundingBox
The bounding box of the point cloud.
Definition: PointsetSurface.hpp:148
lvr2::PointsetSurface::m_kd
int m_kd
The number of points used for distance function evaluation.
Definition: PointsetSurface.hpp:157
lvr2::PointsetSurface::getInterpolatedNormal
virtual Normal< float > getInterpolatedNormal(const BaseVecT &position) const
Interpolates a surface normal at the given position.
lvr2::PointsetSurface::setKi
void setKi(int k)
If k is > 0, each normal will be averaged with its k neighbors.
Definition: PointsetSurface.hpp:114
lvr2::PointsetSurfacePtr
std::shared_ptr< PointsetSurface< BaseVecT > > PointsetSurfacePtr
Definition: PointsetSurface.hpp:161
lvr2::Normal< float >
lvr2::PointsetSurface::searchTree
std::shared_ptr< SearchTree< BaseVecT > > searchTree() const
Returns a pointer to the search tree.
PointBuffer.hpp
lvr2::PointsetSurface::setKn
void setKn(int k)
Sets the size of the k-neighborhood that is used for normal estimation.
Definition: PointsetSurface.hpp:120
lvr2::PointsetSurface
An interface class to wrap all functionality that is needed to generate a surface approximation from ...
Definition: PointsetSurface.hpp:61
lvr2::PointsetSurface::calculateSurfaceNormals
virtual void calculateSurfaceNormals()=0
Calculates surface normals for each data point in the given PointBuffeer. If the buffer alreay contai...
lvr2::BoundingBox
A dynamic bounding box class.
Definition: BoundingBox.hpp:49
lvr2::PointsetSurface::m_ki
int m_ki
The number of points used for normal interpolation.
Definition: PointsetSurface.hpp:154
lvr2
Definition: BaseBufferManipulators.hpp:39
lvr2::PointsetSurface::setKd
void setKd(int k)
Sets the number of points that is used for distance evaluation, i.e. an average of the distance to th...
Definition: PointsetSurface.hpp:128
lvr2::PointsetSurface::distance
virtual pair< typename BaseVecT::CoordType, typename BaseVecT::CoordType > distance(BaseVecT v) const =0
Returns the distance of vertex v from the nearest tangent plane.
BoundingBox.hpp
Normal.hpp
lvr2::PointsetSurface::m_kn
int m_kn
The number of points used for normal estimation.
Definition: PointsetSurface.hpp:151
lvr2::PointsetSurface::pointBuffer
virtual PointBufferPtr pointBuffer() const
Returns the internal point buffer. After a call of calculateSurfaceNormals the buffer will contain no...


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:24