Go to the documentation of this file.
38 #ifndef PCL_GRAPH_POINT_CLOUD_GRAPH_H
39 #define PCL_GRAPH_POINT_CLOUD_GRAPH_H
41 #include <boost/graph/adjacency_list.hpp>
42 #include <boost/graph/subgraph.hpp>
44 #include <pcl/point_cloud.h>
45 #include <pcl/point_types.h>
46 #include <pcl/PointIndices.h>
296 template <
typename PointT,
297 typename OutEdgeListS = boost::vecS,
298 typename DirectedS = boost::undirectedS,
299 typename VertexProperty = boost::no_property,
300 typename EdgeProperty = boost::no_property,
301 typename EdgeListS = boost::listS>
303 :
public boost::detail::adj_list_gen <
317 , typename pcl::PointCloud<PointT>::Ptr
323 ,
public boost::graph::maybe_named_graph <
332 , typename boost::adjacency_list_traits <
346 typename boost::detail::adj_list_gen <
353 ,
typename pcl::PointCloud<PointT>::Ptr
459 this->clearing_graph();
504 template <
typename T>
void
525 return (boost::get(boost::vertex_bundle, *
this)[
v]);
531 return (boost::get(boost::vertex_bundle, *
this)[
v]);
537 return (boost::get(boost::edge_bundle, *
this)[e]);
543 return (boost::get(boost::edge_bundle, *
this)[e]);
556 template <
typename Graph>
572 template <
typename Graph>
581 template <
typename Graph>
583 :
public boost::put_get_helper <
584 typename std::iterator_traits <
585 typename point_cloud_graph_traits<Graph>::point_cloud_type::iterator
587 , point_cloud_property_map<Graph>
593 typedef typename boost::property_traits<boost::identity_property_map>::key_type
key_type;
596 typedef typename std::iterator_traits<iterator>::reference
reference;
601 : data(g->m_point_cloud)
602 , index(
boost::identity_property_map())
609 return (data->begin());
615 return (data->end());
621 return (data->begin());
627 return (data->end());
630 boost::identity_property_map&
636 const boost::identity_property_map&
645 return ((*data)[get(index,
v)]);
651 boost::identity_property_map index;
657 #define PCG_PARAMS typename P, typename OEL, typename D, typename VP, typename EP, typename EL
658 #define PCG pcl::graph::point_cloud_graph<P, OEL, D, VP, EP, EL>
669 template <PCG_PARAMS>
670 struct property_map<
PCG, vertex_bundle_t>
679 template <
typename Directed,
typename Vertex, PCG_PARAMS>
681 source(
const detail::edge_base<Directed, Vertex>& e,
const PCG&)
686 template <
typename Directed,
typename Vertex, PCG_PARAMS>
688 target(
const detail::edge_base<Directed, Vertex>& e,
const PCG&)
693 template <PCG_PARAMS>
694 struct graph_mutability_traits<
PCG>
708 template <PCG_PARAMS>
709 inline typename pcl::PointCloud<P>::Ptr
712 return (g.m_point_cloud);
719 template <PCG_PARAMS>
720 inline typename pcl::PointCloud<P>::ConstPtr
723 return (g.m_point_cloud);
735 template <PCG_PARAMS>
736 inline pcl::PointIndices::Ptr
739 pcl::PointIndices::Ptr
indices(
new pcl::PointIndices);
740 indices->indices.resize(g.m_point_cloud->size());
741 for (
size_t i = 0; i < g.m_point_cloud->size(); ++i)
757 template <PCG_PARAMS>
758 inline typename pcl::PointCloud<P>::Ptr
761 return (g.root().m_graph.m_point_cloud);
769 template <PCG_PARAMS>
770 inline typename pcl::PointCloud<P>::ConstPtr
773 return (g.root().m_graph.m_point_cloud);
786 template <PCG_PARAMS>
787 inline pcl::PointIndices::Ptr
794 pcl::PointIndices::Ptr
indices(
new pcl::PointIndices);
795 indices->indices.resize(boost::num_vertices(g));
796 for (
size_t i = 0; i < boost::num_vertices(g); ++i)
798 indices->indices[i] = g.m_global_vertex[i];
boost::identity_property_map & get_index_map()
reference operator[](const key_type &v) const
Base::vertex_descriptor vertex_descriptor
const vertex_bundled & operator[](vertex_descriptor v) const
pcl::graph::point_cloud_property_map< PCG > type
OutEdgeListS out_edge_list_selector
Base::edge_bundled edge_bundled
Base::vertices_size_type vertices_size_type
point_cloud_graph_traits< Graph >::point_cloud_type::const_iterator const_iterator
point_cloud_graph & operator=(const point_cloud_graph &x)
Assignment operator.
Vertex target(const detail::edge_base< Directed, Vertex > &e, const PCG &)
pcl::PointCloud< PointT >::Ptr graph_property_type
const_iterator storage_begin() const
point_cloud_ptr m_point_cloud
Storage for the internal cloud data.
edge_bundled & operator[](edge_descriptor e)
void removing_vertex(vertex_descriptor vertex)
Graph::point_cloud_type point_cloud_type
The type of PCL point cloud the graph can be viewed as.
pcl::PointCloud< PointT >::Ptr graph_bundled
Base::edge_property_type edge_property_type
boost::geometry::model::d2::point_xy< float > point_type
point_cloud_type::ConstPtr point_cloud_const_ptr
point_cloud_graph(const point_cloud_ptr &p=point_cloud_ptr(new point_cloud_type))
Construct a graph based on existing point cloud.
mutable_property_graph_tag category
std::shared_ptr< Value > value()
pcl::PointIndices::Ptr indices(const PCG &g)
Retrieve the indices of the points of the point cloud stored in a point cloud graph that actually bel...
Graph::point_cloud_ptr point_cloud_ptr
The type of a shared pointer to PCL point cloud the graph can be viewed as.
void added_vertex(vertex_descriptor)
Base::degree_size_type degree_size_type
PointT point_type
Type of PCL points bundled in graph vertices.
std::iterator_traits< iterator >::reference reference
point_cloud_graph_traits< Graph >::point_type value_type
boost::lvalue_property_map_tag category
Base::vertex_property_type vertex_property_type
pcl::PointCloud< P >::Ptr point_cloud(PCG &g)
Retrieve the point cloud stored in a point cloud graph.
boost::subgraph< CloudGraph > Graph
boost::property_traits< boost::identity_property_map >::key_type key_type
void removing_vertex(vertex_descriptor vertex, T)
Vertex source(const detail::edge_base< Directed, Vertex > &e, const PCG &)
Graph::point_type point_type
The type of PCL points bundled in vertices.
EdgeListS edge_list_selector
point_cloud_graph(vertices_size_type num_vertices, const point_cloud_ptr &=point_cloud_ptr(new point_cloud_type))
Construct a graph with a given number of vertices.
Graph::point_cloud_const_ptr point_cloud_const_ptr
The type of a shared pointer to const PCL point cloud the graph can be viewed as.
void clear()
Remove all of the edges and vertices from the graph.
vertex_bundled & operator[](vertex_descriptor v)
double v(double t, double v0, double a0, double j)
const_iterator storage_end() const
point_cloud_graph(const point_cloud_graph &x)
Copy constructor.
const edge_bundled & operator[](edge_descriptor e) const
const boost::identity_property_map & get_index_map() const
Base::edge_descriptor edge_descriptor
Traits struct to access the types associated with point_cloud_graph.
point_cloud_property_map(const Graph *g, boost::vertex_bundle_t)
boost::vecS vertex_list_selector
point_cloud_graph_traits< Graph >::point_cloud_type::iterator iterator
DirectedS directed_selector
point_cloud_type::Ptr point_cloud_ptr
pcl::PointCloud< PointT > point_cloud_type
Base::stored_vertex stored_vertex
This class is to expose the point cloud stored in the point_cloud_graph as a vertex bundle property m...
Base::edges_size_type edges_size_type