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_;
83 typedef pcl::search::Search<PointOutT>
Search;
94 virtual void compute(GraphT&
graph);
116 num_neighbors_ = num_neighbors;
123 return (num_neighbors_);
132 size_t num_neighbors_;
This is an abstract base class for building a BGL-compatible point cloud graph from a point cloud.
boost::graph_traits< GraphT >::vertex_descriptor VertexId
point_cloud_graph_traits< GraphT >::point_type PointOutT
Type of points in the output graph.
std::vector< VertexId > point_to_vertex_map_
PointT PointInT
Type of points in the input cloud.
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.
void setNumberOfNeighbors(size_t num_neighbors)
Set the number of neighbors to find when building a graph.
NearestNeighborsGraphBuilder(size_t num_neighbors=14)
Constructor.
pcl::search::Search< PointOutT > Search
SearchPtr getSearchMethod() const
Get the search method used for finding nearest neighbors when building a graph.