GraphBuilder< PointT, GraphT > Class Template Referenceabstract

This is an abstract base class for building a BGL-compatible point cloud graph from a point cloud. More...

#include <VisionX/libraries/PointCloudGraph/graph_builder.h>

+ Inheritance diagram for GraphBuilder< PointT, GraphT >:

Public Types

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)=0
 Build a graph based on the provided input data. More...
 
const std::vector< VertexId > & getPointToVertexMap () const
 Get a mapping between points in the input cloud and the vertices in the output graph. More...
 

Protected Attributes

std::vector< VertexIdpoint_to_vertex_map_
 

Detailed Description

template<typename PointT, typename GraphT>
class pcl::graph::GraphBuilder< PointT, GraphT >

This is an abstract base class for building a BGL-compatible point cloud graph from a point cloud.

Building a graph involves creating vertices and establishing edges between them. (A particular algorithm for doing these depends on the extending class.)

The two template parameters are the type of points in input cloud and the output graph type. The graph type should be a model of concepts::PointCloudGraphConcept (i.e. either point_cloud_graph or boost::subgraph wrapped around the former). The type of input points and points bundled in graph vertices do not need to be the same.

Author
Sergey Alexandrov

Definition at line 67 of file graph_builder.h.

Member Typedef Documentation

◆ PointInT

typedef PointT PointInT

Type of points in the input cloud.

Definition at line 77 of file graph_builder.h.

◆ PointOutT

typedef point_cloud_graph_traits<GraphT>::point_type PointOutT

Type of points in the output graph.

Definition at line 79 of file graph_builder.h.

◆ Ptr

typedef boost::shared_ptr<GraphBuilder<PointT, GraphT> > Ptr

Definition at line 74 of file graph_builder.h.

◆ VertexId

typedef boost::graph_traits<GraphT>::vertex_descriptor VertexId

Definition at line 81 of file graph_builder.h.

Member Function Documentation

◆ compute()

virtual void compute ( GraphT &  graph)
pure virtual

Build a graph based on the provided input data.

Implemented in NearestNeighborsGraphBuilder< PointT, GraphT >, and VoxelGridGraphBuilder< PointT, GraphT >.

◆ getPointToVertexMap()

const std::vector<VertexId>& getPointToVertexMap ( ) const
inline

Get a mapping between points in the input cloud and the vertices in the output graph.

Warning
Some points may have no corresponding vertex. This happens e.g. for NaN points, or if the user intentionally excluded some points from graph building process by providing indices vector with setIndices(). For such points the "nil" vertex id will be assigned, which is equal to std::numeric_limits<VertexId>::max ().

Definition at line 96 of file graph_builder.h.

Member Data Documentation

◆ point_to_vertex_map_

std::vector<VertexId> point_to_vertex_map_
protected

Definition at line 103 of file graph_builder.h.


The documentation for this class was generated from the following file: