Go to the documentation of this file.
38 #ifndef PCL_GRAPH_NEAREST_NEIGHBORS_GRAPH_BUILDER_H
39 #define PCL_GRAPH_NEAREST_NEIGHBORS_GRAPH_BUILDER_H
41 #include <pcl/search/search.h>
66 template <
typename Po
intT,
typename GraphT>
70 using PCLBase<PointT>::initCompute;
71 using PCLBase<PointT>::deinitCompute;
72 using PCLBase<PointT>::indices_;
73 using PCLBase<PointT>::input_;
74 using PCLBase<PointT>::use_indices_;
75 using PCLBase<PointT>::fake_indices_;
84 typedef pcl::search::Search<PointOutT>
Search;
92 : num_neighbors_(num_neighbors)
97 compute(GraphT& graph);
119 num_neighbors_ = num_neighbors;
126 return (num_neighbors_);
136 size_t num_neighbors_;
This is an abstract base class for building a BGL-compatible point cloud graph from a point cloud.
point_cloud_graph_traits< GraphT >::point_type PointOutT
Type of points in the output graph.
PointT PointInT
Type of points in the input cloud.
SearchPtr getSearchMethod() const
Get the search method used for finding nearest neighbors when building a graph.
boost::graph_traits< GraphT >::vertex_descriptor VertexId
This class builds a point cloud graph representing an input dataset by using nearest neighbor search.
pcl::search::Search< PointOutT > Search
void setSearchMethod(const SearchPtr &search)
Set search method that will be used for finding K nearest neighbors when building a graph.
size_t getNumberOfNeighbors() const
Returns the number of neighbors to find when building a graph.
NearestNeighborsGraphBuilder(size_t num_neighbors=14)
Constructor.
void setNumberOfNeighbors(size_t num_neighbors)
Set the number of neighbors to find when building a graph.