SearchTree.hpp
Go to the documentation of this file.
1 
28 /*
29 * SearchTree.hpp
30 *
31 * Created on: 02.01.2012
32 * Author: Florian Otte, Thomas Wiemann
33  */
34 
35 #ifndef LVR2_RECONSTRUCTION_SEARCHTREE_H_
36 #define LVR2_RECONSTRUCTION_SEARCHTREE_H_
37 
38 #include <vector>
39 
40 namespace lvr2
41 {
42 
49 template< typename BaseVecT>
51 {
52 private:
53  using CoordT = typename BaseVecT::CoordType;
54 
55 public:
56 
57  virtual ~SearchTree() = default;
58 
71  virtual int kSearch(
72  const BaseVecT& qp,
73  int k,
74  std::vector<size_t>& indices,
75  std::vector<CoordT>& distances
76  ) const = 0;
77 
86  virtual void radiusSearch(
87  const BaseVecT& qp,
88  CoordT r,
89  std::vector<size_t>& indices
90  ) const = 0;
91 
93  virtual int kSearch(
94  const BaseVecT& qp,
95  int k,
96  std::vector<size_t>& indices
97  ) const;
98 
99  // /**
100  // * @brief Set the number of neighbours used to estimate and interpolate normals.
101  // */
102  // virtual void setKi(int ki);
103 
104 
105  // /**
106  // * @brief Set the number of neighbours used for normal estimation
107  // */
108  // virtual void setKd(int kd);
109 
110  // /**
111  // * @brief Get the number of tangent planes used for distance determination
112  // */
113  // virtual int getKi();
114 
115 
116  // /**
117  // * @brief Get the number of neighbours used to estimate and interpolate normals.
118  // */
119  // virtual int getKd();
120 
121 
122 protected:
124  int m_ki;
125 
127  int m_kd;
128 };
129 
130 template <typename BaseVecT>
131 using SearchTreePtr = std::shared_ptr<SearchTree<BaseVecT>>;
132 
133 } // namespace lvr2
134 
135 #include "SearchTree.tcc"
136 
137 #endif // LVR2_RECONSTRUCTION_SEARCHTREE_H_
lvr2::SearchTree::CoordT
typename BaseVecT::CoordType CoordT
Definition: SearchTree.hpp:53
lvr2::SearchTree::radiusSearch
virtual void radiusSearch(const BaseVecT &qp, CoordT r, std::vector< size_t > &indices) const =0
Returns all points within the radius r of qp.
lvr2::SearchTree::~SearchTree
virtual ~SearchTree()=default
lvr2::SearchTree::m_kd
int m_kd
The number of tangent planes used for distance determination.
Definition: SearchTree.hpp:127
lvr2::SearchTreePtr
std::shared_ptr< SearchTree< BaseVecT > > SearchTreePtr
Definition: SearchTree.hpp:131
lvr2::SearchTree::m_ki
int m_ki
The number of neighbors used for normal interpolation.
Definition: SearchTree.hpp:124
lvr2
Definition: BaseBufferManipulators.hpp:39
lvr2::SearchTree
Abstract interface for storing and searching through a set of points. Query functions for nearest nei...
Definition: SearchTree.hpp:50
lvr2::SearchTree::kSearch
virtual int kSearch(const BaseVecT &qp, int k, std::vector< size_t > &indices, std::vector< CoordT > &distances) const =0
This function performs a k-next-neighbor search on the data that was given in the constructor.


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