
This class builds a point cloud graph representing an input dataset by using nearest neighbor search. More...
#include <VisionX/libraries/PointCloudGraph/nearest_neighbors_graph_builder.h>
Public Types  
typedef pcl::search::Search< PointOutT >  Search 
typedef Search::Ptr  SearchPtr 
Public Types inherited from GraphBuilder< PointT, GraphT >  
typedef PointT  PointInT 
Type of points in the input cloud. More...  
typedef point_cloud_graph_traits< GraphT >::point_type  PointOutT 
Type of points in the output graph. More...  
typedef boost::shared_ptr< GraphBuilder< PointT, GraphT > >  Ptr 
typedef boost::graph_traits< GraphT >::vertex_descriptor  VertexId 
Public Member Functions  
virtual void  compute (GraphT &graph) 
Build a graph based on the provided input data. More...  
size_t  getNumberOfNeighbors () const 
Returns the number of neighbors to find when building a graph. More...  
SearchPtr  getSearchMethod () const 
Get the search method used for finding nearest neighbors when building a graph. More...  
NearestNeighborsGraphBuilder (size_t num_neighbors=14)  
Constructor. More...  
void  setNumberOfNeighbors (size_t num_neighbors) 
Set the number of neighbors to find when building a graph. More...  
void  setSearchMethod (const SearchPtr &search) 
Set search method that will be used for finding K nearest neighbors when building a graph. More...  
Public Member Functions inherited from GraphBuilder< PointT, GraphT >  
const std::vector< VertexId > &  getPointToVertexMap () const 
Get a mapping between points in the input cloud and the vertices in the output graph. More...  
Additional Inherited Members  
Protected Attributes inherited from GraphBuilder< PointT, GraphT >  
std::vector< VertexId >  point_to_vertex_map_ 
This class builds a point cloud graph representing an input dataset by using nearest neighbor search.
The points from the input cloud become vertices and the edges are established between each point and its neighbors (as found by the search object provided with setSearchMethod()). The user may choose to use the default search method, which will be either KdTree or OrganizedNeighbor depending on whether the input point cloud is organized or not.
The data contained in the points of the input cloud will be copied inside the vertices of the newly created graph. Note that the points in the input cloud and the output graph may have different types, in which case only the intersecting fields will be copied over.
For additional information see documentation for GraphBuilder.
Definition at line 67 of file nearest_neighbors_graph_builder.h.
Definition at line 84 of file nearest_neighbors_graph_builder.h.
typedef Search::Ptr SearchPtr 
Definition at line 85 of file nearest_neighbors_graph_builder.h.

inline 
Constructor.
[in]  num_neighbors  number of neighbors to find when building a graph (default: 14 ) 
Definition at line 91 of file nearest_neighbors_graph_builder.h.

virtual 
Build a graph based on the provided input data.
Implements GraphBuilder< PointT, GraphT >.
Definition at line 50 of file nearest_neighbors_graph_builder.hpp.

inline 
Returns the number of neighbors to find when building a graph.
Definition at line 124 of file nearest_neighbors_graph_builder.h.

inline 
Get the search method used for finding nearest neighbors when building a graph.
Definition at line 110 of file nearest_neighbors_graph_builder.h.

inline 
Set the number of neighbors to find when building a graph.
Definition at line 117 of file nearest_neighbors_graph_builder.h.

inline 
Set search method that will be used for finding K nearest neighbors when building a graph.
Definition at line 102 of file nearest_neighbors_graph_builder.h.