search::Octree is a wrapper class which implements nearest neighbor search operations based on the pcl::octree::Octree structure. More...
#include <pcl/search/octree.h>
Public Member Functions |
|
Octree (const double resolution) | |
Octree constructor. More... |
|
~Octree () | |
Empty Destructor. More... |
|
void | setInputCloud (const PointCloudConstPtr &cloud) |
Provide a pointer to the input dataset. More... |
|
void | setInputCloud (const PointCloudConstPtr &cloud, const IndicesConstPtr &indices) override |
Provide a pointer to the input dataset. More... |
|
int | nearestKSearch (const PointCloud &cloud, index_t index, int k, Indices &k_indices, std::vector< float > &k_sqr_distances) const override |
Search for the k-nearest neighbors for the given query point. More... |
|
int | nearestKSearch (const PointT &point, int k, Indices &k_indices, std::vector< float > &k_sqr_distances) const override |
Search for the k-nearest neighbors for the given query point. More... |
|
int | nearestKSearch (index_t index, int k, Indices &k_indices, std::vector< float > &k_sqr_distances) const override |
Search for the k-nearest neighbors for the given query point (zero-copy). More... |
|
int | radiusSearch (const PointCloud &cloud, index_t index, double radius, Indices &k_indices, std::vector< float > &k_sqr_distances, unsigned int max_nn=0) const override |
search for all neighbors of query point that are within a given radius. More... |
|
int | radiusSearch (const PointT &p_q, double radius, Indices &k_indices, std::vector< float > &k_sqr_distances, unsigned int max_nn=0) const override |
search for all neighbors of query point that are within a given radius. More... |
|
int | radiusSearch (index_t index, double radius, Indices &k_indices, std::vector< float > &k_sqr_distances, unsigned int max_nn=0) const override |
search for all neighbors of query point that are within a given radius. More... |
|
void | approxNearestSearch (const PointCloudConstPtr &cloud, index_t query_index, index_t &result_index, float &sqr_distance) |
Search for approximate nearest neighbor at the query point. More... |
|
void | approxNearestSearch (const PointT &p_q, index_t &result_index, float &sqr_distance) |
Search for approximate nearest neighbor at the query point. More... |
|
void | approxNearestSearch (index_t query_index, index_t &result_index, float &sqr_distance) |
Search for approximate nearest neighbor at the query point. More... |
|
uindex_t | boxSearch (const Eigen::Vector3f &min_pt, const Eigen::Vector3f &max_pt, Indices &k_indices) const |
Search for points within rectangular search area. More... |
|
Public Member Functions inherited from pcl::search::Search< PointT > | |
Search (const std::string &name="", bool sorted=false) | |
Constructor. More... |
|
virtual | ~Search () |
Destructor. More... |
|
virtual const std::string & | getName () const |
Returns the search method name. More... |
|
virtual void | setSortedResults (bool sorted) |
sets whether the results should be sorted (ascending in the distance) or not More... |
|
virtual bool | getSortedResults () |
Gets whether the results should be sorted (ascending in the distance) or not Otherwise the results may be returned in any order. More... |
|
virtual PointCloudConstPtr | getInputCloud () const |
Get a pointer to the input point cloud dataset. More... |
|
virtual IndicesConstPtr | getIndices () const |
Get a pointer to the vector of indices used. More... |
|
template<typename PointTDiff > | |
int | nearestKSearchT (const PointTDiff &point, int k, Indices &k_indices, std::vector< float > &k_sqr_distances) const |
Search for k-nearest neighbors for the given query point. More... |
|
virtual void | nearestKSearch (const PointCloud &cloud, const Indices &indices, int k, std::vector< Indices > &k_indices, std::vector< std::vector< float > > &k_sqr_distances) const |
Search for the k-nearest neighbors for the given query point. More... |
|
template<typename PointTDiff > | |
void | nearestKSearchT (const pcl::PointCloud< PointTDiff > &cloud, const Indices &indices, int k, std::vector< Indices > &k_indices, std::vector< std::vector< float > > &k_sqr_distances) const |
Search for the k-nearest neighbors for the given query point. More... |
|
template<typename PointTDiff > | |
int | radiusSearchT (const PointTDiff &point, double radius, Indices &k_indices, std::vector< float > &k_sqr_distances, unsigned int max_nn=0) const |
Search for all the nearest neighbors of the query point in a given radius. More... |
|
virtual void | radiusSearch (const PointCloud &cloud, const Indices &indices, double radius, std::vector< Indices > &k_indices, std::vector< std::vector< float > > &k_sqr_distances, unsigned int max_nn=0) const |
Search for all the nearest neighbors of the query point in a given radius. More... |
|
template<typename PointTDiff > | |
void | radiusSearchT (const pcl::PointCloud< PointTDiff > &cloud, const Indices &indices, double radius, std::vector< Indices > &k_indices, std::vector< std::vector< float > > &k_sqr_distances, unsigned int max_nn=0) const |
Search for all the nearest neighbors of the query points in a given radius. More... |
|
Public Attributes |
|
OctreePointCloudSearchPtr | tree_ |
Additional Inherited Members |
|
Protected Member Functions inherited from pcl::search::Search< PointT > | |
void | sortResults (Indices &indices, std::vector< float > &distances) const |
Protected Attributes inherited from pcl::search::Search< PointT > | |
PointCloudConstPtr | input_ |
IndicesConstPtr | indices_ |
bool | sorted_results_ |
std::string | name_ |
Detailed Description
template<typename PointT, typename LeafTWrap = pcl::octree::OctreeContainerPointIndices, typename BranchTWrap = pcl::octree::OctreeContainerEmpty, typename OctreeT = pcl::octree::OctreeBase<LeafTWrap, BranchTWrap >>
class pcl::search::Octree< PointT, LeafTWrap, BranchTWrap, OctreeT >
search::Octree is a wrapper class which implements nearest neighbor search operations based on the pcl::octree::Octree structure.
The octree pointcloud class needs to be initialized with its voxel resolution. Its bounding box is automatically adjusted according to the pointcloud dimension or it can be predefined. Note: The tree depth equates to the resolution and the bounding box dimensions of the octree.
- Note
- typename: PointT: type of point used in pointcloud
- typename: LeafT: leaf node class (usuallt templated with integer indices values)
- typename: OctreeT: octree implementation ()
Member Typedef Documentation
ConstPtr
using pcl::search::Octree< PointT, LeafTWrap, BranchTWrap, OctreeT >::ConstPtr = shared_ptr<const pcl::search::Octree<PointT,LeafTWrap,BranchTWrap,OctreeT> > |
OctreePointCloudSearchConstPtr
using pcl::search::Octree< PointT, LeafTWrap, BranchTWrap, OctreeT >::OctreePointCloudSearchConstPtr = typename pcl::octree::OctreePointCloudSearch<PointT, LeafTWrap, BranchTWrap>::ConstPtr |
OctreePointCloudSearchPtr
using pcl::search::Octree< PointT, LeafTWrap, BranchTWrap, OctreeT >::OctreePointCloudSearchPtr = typename pcl::octree::OctreePointCloudSearch<PointT, LeafTWrap, BranchTWrap>::Ptr |
PointCloud
using pcl::search::Octree< PointT, LeafTWrap, BranchTWrap, OctreeT >::PointCloud = pcl::PointCloud<PointT> |
PointCloudConstPtr
using pcl::search::Octree< PointT, LeafTWrap, BranchTWrap, OctreeT >::PointCloudConstPtr = typename PointCloud::ConstPtr |
PointCloudPtr
using pcl::search::Octree< PointT, LeafTWrap, BranchTWrap, OctreeT >::PointCloudPtr = typename PointCloud::Ptr |
Ptr
using pcl::search::Octree< PointT, LeafTWrap, BranchTWrap, OctreeT >::Ptr = shared_ptr<pcl::search::Octree<PointT,LeafTWrap,BranchTWrap,OctreeT> > |
Constructor & Destructor Documentation
Octree()
|
inline |
~Octree()
|
inline |
Member Function Documentation
approxNearestSearch() [1/3]
|
inline |
Search for approximate nearest neighbor at the query point.
- Parameters
-
[in] cloud the point cloud data [in] query_index the index in cloud representing the query point [out] result_index the resultant index of the neighbor point [out] sqr_distance the resultant squared distance to the neighboring point
- Returns
- number of neighbors found
approxNearestSearch() [2/3]
|
inline |
approxNearestSearch() [3/3]
|
inline |
Search for approximate nearest neighbor at the query point.
- Parameters
-
query_index index representing the query point in the dataset given by setInputCloud. If indices were given in setInputCloud, index will be the position in the indices vector. result_index the resultant index of the neighbor point sqr_distance the resultant squared distance to the neighboring point
- Returns
- number of neighbors found
boxSearch()
|
inline |
nearestKSearch() [1/3]
|
inlineoverridevirtual |
Search for the k-nearest neighbors for the given query point.
- Parameters
-
[in] cloud the point cloud data [in] index the index in cloud representing the 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!)
- Returns
- number of neighbors found
Reimplemented from pcl::search::Search< PointT >.
nearestKSearch() [2/3]
|
inlineoverridevirtual |
Search for the k-nearest neighbors for the given query point.
- Parameters
-
[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!)
- Returns
- number of neighbors found
Implements pcl::search::Search< PointT >.
nearestKSearch() [3/3]
|
inlineoverridevirtual |
Search for the k-nearest neighbors for the given query point (zero-copy).
- Parameters
-
[in] index the index representing the query point in the dataset given by setInputCloud if indices were given in setInputCloud, index will be the position in the indices vector [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!)
- Returns
- number of neighbors found
Reimplemented from pcl::search::Search< PointT >.
radiusSearch() [1/3]
|
inlineoverridevirtual |
search for all neighbors of query point that are within a given radius.
- Parameters
-
cloud the point cloud data index the index in cloud representing the query point radius the radius of the sphere bounding all of p_q's neighbors k_indices the resultant indices of the neighboring points k_sqr_distances the resultant squared distances to the neighboring points max_nn if given, bounds the maximum returned neighbors to this value
- Returns
- number of neighbors found in radius
Reimplemented from pcl::search::Search< PointT >.
radiusSearch() [2/3]
|
inlineoverridevirtual |
search for all neighbors of query point that are within a given radius.
- Parameters
-
p_q the given query point radius the radius of the sphere bounding all of p_q's neighbors k_indices the resultant indices of the neighboring points k_sqr_distances the resultant squared distances to the neighboring points max_nn if given, bounds the maximum returned neighbors to this value
- Returns
- number of neighbors found in radius
Implements pcl::search::Search< PointT >.
radiusSearch() [3/3]
|
inlineoverridevirtual |
search for all neighbors of query point that are within a given radius.
- Parameters
-
index index representing the query point in the dataset given by setInputCloud. If indices were given in setInputCloud, index will be the position in the indices vector radius radius of the sphere bounding all of p_q's neighbors k_indices the resultant indices of the neighboring points k_sqr_distances the resultant squared distances to the neighboring points max_nn if given, bounds the maximum returned neighbors to this value
- Returns
- number of neighbors found in radius
Reimplemented from pcl::search::Search< PointT >.
setInputCloud() [1/2]
|
inline |
Provide a pointer to the input dataset.
- Parameters
-
[in] cloud the const boost shared pointer to a PointCloud message
setInputCloud() [2/2]
|
inlineoverridevirtual |
Provide a pointer to the input dataset.
- Parameters
-
[in] cloud the const boost shared pointer to a PointCloud message [in] indices the point indices subset that is to be used from cloud
Reimplemented from pcl::search::Search< PointT >.
Member Data Documentation
tree_
OctreePointCloudSearchPtr pcl::search::Octree< PointT, LeafTWrap, BranchTWrap, OctreeT >::tree_ |
Definition at line 82 of file octree.h.
Referenced by pcl::search::Octree< PointInT >::approxNearestSearch(), pcl::search::Octree< PointInT >::boxSearch(), pcl::search::Octree< PointInT >::nearestKSearch(), pcl::search::Octree< PointInT >::radiusSearch(), and pcl::search::Octree< PointInT >::setInputCloud().
The documentation for this class was generated from the following file:
- pcl/search/octree.h
© 2009–2012, Willow Garage, Inc.
© 2012–, Open Perception, Inc.
Licensed under the BSD License.
https://pointclouds.org/documentation/classpcl_1_1search_1_1_octree.html