![]() |
NDEVR
API Documentation
|
Adapts the NDEVR RTree spatial index to the PCL search interface for nearest-neighbor queries. More...
Public Member Functions | |
| PCLRTreeWrapper (const Buffer< Vertex< 3, fltp04 > > &vertices, const RTree< 3, fltp04 > &tree, uint04 &total_search_ptr, uint04 search_count, LogPtr log=LogPtr()) | |
| Constructor for KdTree. | |
| virtual | ~PCLRTreeWrapper () |
| Destructor for KdTree. | |
| int | nearestKSearch (const PointT &point, int k, std::vector< int > &k_indices, std::vector< float > &k_sqr_distances) const final override |
| Search for the k-nearest neighbors for the given query point. | |
| int | radiusSearch (const PointT &point, double radius, std::vector< int > &k_indices, std::vector< float > &k_sqr_distances, unsigned int k=0) const final override |
| Search for all the nearest neighbors of the query point in a given radius. | |
Protected Attributes | |
| const RTree< 3, fltp04 > & | m_tree |
| A pointer to the internal KdTree object. | |
Adapts the NDEVR RTree spatial index to the PCL search interface for nearest-neighbor queries.
Definition at line 17 of file PCLTreeWrapper.h.
|
inline |
Constructor for KdTree.
| [in] | sorted | set to true if the nearest neighbor search results need to be sorted in ascending order based on their distance to the query point |
Definition at line 37 of file PCLTreeWrapper.h.
References m_tree.
|
inlinefinaloverride |
Search for the k-nearest neighbors for the given query point.
| [in] | point | the given query point |
| [in] | k | the number of neighbors to search for |
| [out] | k_indices | the resultant indices of the neighboring points (must be resized to k a priori!) |
| [out] | k_sqr_distances | the resultant squared distances to the neighboring points (must be resized to k a priori!) |
Definition at line 75 of file PCLTreeWrapper.h.
References cast(), and radiusSearch().
|
inlinefinaloverride |
Search for all the nearest neighbors of the query point in a given radius.
| [in] | point | the given query point |
| [in] | radius | the radius of the sphere bounding all of p_q's neighbors |
| [out] | k_indices | the resultant indices of the neighboring points |
| [out] | k_sqr_distances | the resultant squared distances to the neighboring points |
| [in] | max_nn | if given, bounds the maximum returned neighbors to this value. If max_nn is set to 0 or to a number higher than the number of points in the input cloud, all neighbors in radius will be returned. |
Definition at line 94 of file PCLTreeWrapper.h.
References cast(), getMin(), IsInvalid(), and m_tree.
Referenced by nearestKSearch().