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/PointIndices.h>
45#include <pcl/point_cloud.h>
46#include <pcl/point_types.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<point_cloud_graph<PointT,
314 typename pcl::PointCloud<PointT>::Ptr,
320 public boost::graph::maybe_named_graph<
321 point_cloud_graph<PointT,
327 typename boost::adjacency_list_traits<OutEdgeListS, boost::vecS, DirectedS, EdgeListS>::
334 typedef typename boost::detail::adj_list_gen<self,
340 typename pcl::PointCloud<PointT>::Ptr,
341 EdgeListS>::type Base;
345 (boost::is_same<typename Base::vertex_bundled, boost::no_property>::value));
443 this->clearing_graph();
488 template <
typename T>
510 return (boost::get(boost::vertex_bundle, *
this)[v]);
516 return (boost::get(boost::vertex_bundle, *
this)[v]);
522 return (boost::get(boost::edge_bundle, *
this)[e]);
528 return (boost::get(boost::edge_bundle, *
this)[e]);
540 template <
typename Graph>
556 template <
typename Graph>
566 template <
typename Graph>
568 public boost::put_get_helper<
569 typename std::iterator_traits<
570 typename point_cloud_graph_traits<Graph>::point_cloud_type::iterator>::reference,
571 point_cloud_property_map<Graph>>
575 typedef typename boost::property_traits<boost::identity_property_map>::key_type
key_type;
579 typedef typename std::iterator_traits<iterator>::reference
reference;
584 data(g->m_point_cloud), index(
boost::identity_property_map())
591 return (data->begin());
597 return (data->end());
603 return (data->begin());
609 return (data->end());
612 boost::identity_property_map&
618 const boost::identity_property_map&
627 return ((*data)[get(index, v)]);
632 boost::identity_property_map
index;
637#define PCG_PARAMS typename P, typename OEL, typename D, typename VP, typename EP, typename EL
638#define PCG pcl::graph::point_cloud_graph<P, OEL, D, VP, EP, EL>
649 template <PCG_PARAMS>
650 struct property_map<
PCG, vertex_bundle_t>
659 template <
typename Directed,
typename Vertex, PCG_PARAMS>
661 source(
const detail::edge_base<Directed, Vertex>& e,
const PCG&)
666 template <
typename Directed,
typename Vertex, PCG_PARAMS>
668 target(
const detail::edge_base<Directed, Vertex>& e,
const PCG&)
673 template <PCG_PARAMS>
674 struct graph_mutability_traits<
PCG>
688 template <PCG_PARAMS>
689 inline typename pcl::PointCloud<P>::Ptr
692 return (g.m_point_cloud);
699 template <PCG_PARAMS>
700 inline typename pcl::PointCloud<P>::ConstPtr
703 return (g.m_point_cloud);
715 template <PCG_PARAMS>
716 inline pcl::PointIndices::Ptr
719 pcl::PointIndices::Ptr
indices(
new pcl::PointIndices);
720 indices->indices.resize(g.m_point_cloud->size());
721 for (
size_t i = 0; i < g.m_point_cloud->size(); ++i)
737 template <PCG_PARAMS>
738 inline typename pcl::PointCloud<P>::Ptr
741 return (g.root().m_graph.m_point_cloud);
749 template <PCG_PARAMS>
750 inline typename pcl::PointCloud<P>::ConstPtr
753 return (g.root().m_graph.m_point_cloud);
766 template <PCG_PARAMS>
767 inline pcl::PointIndices::Ptr
774 pcl::PointIndices::Ptr
indices(
new pcl::PointIndices);
775 indices->indices.resize(boost::num_vertices(g));
776 for (
size_t i = 0; i < boost::num_vertices(g); ++i)
778 indices->indices[i] = g.m_global_vertex[i];
A sibling of boost::adjacency_list with PCL points bundled in vertices and copy-free access to them a...
pcl::graph::point_cloud_graph< PointWithNormalT, boost::vecS, boost::undirectedS, boost::property< boost::vertex_color_t, uint32_t, boost::property< boost::vertex_timestamp_t, double, boost::property< boost::vertex_confidence_t, float > > >, boost::property< boost::edge_weight_t, float, boost::property< boost::edge_index_t, int > > >::point_cloud_const_ptr point_cloud_type::ConstPtr point_cloud_const_ptr
const edge_bundled & operator[](edge_descriptor e) const
pcl::graph::point_cloud_graph< PointWithNormalT, boost::vecS, boost::undirectedS, boost::property< boost::vertex_color_t, uint32_t, boost::property< boost::vertex_timestamp_t, double, boost::property< boost::vertex_confidence_t, float > > >, boost::property< boost::edge_weight_t, float, boost::property< boost::edge_index_t, int > > >::point_type PointWithNormalT point_type
pcl::graph::point_cloud_graph< PointWithNormalT, boost::vecS, boost::undirectedS, boost::property< boost::vertex_color_t, uint32_t, boost::property< boost::vertex_timestamp_t, double, boost::property< boost::vertex_confidence_t, float > > >, boost::property< boost::edge_weight_t, float, boost::property< boost::edge_index_t, int > > >::vertices_size_type Base::vertices_size_type vertices_size_type
pcl::graph::point_cloud_graph< PointWithNormalT, boost::vecS, boost::undirectedS, boost::property< boost::vertex_color_t, uint32_t, boost::property< boost::vertex_timestamp_t, double, boost::property< boost::vertex_confidence_t, float > > >, boost::property< boost::edge_weight_t, float, boost::property< boost::edge_index_t, int > > >::point_cloud_ptr point_cloud_type::Ptr point_cloud_ptr
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.
pcl::graph::point_cloud_graph< PointWithNormalT, boost::vecS, boost::undirectedS, boost::property< boost::vertex_color_t, uint32_t, boost::property< boost::vertex_timestamp_t, double, boost::property< boost::vertex_confidence_t, float > > >, boost::property< boost::edge_weight_t, float, boost::property< boost::edge_index_t, int > > >::directed_selector boost::undirectedS directed_selector
pcl::graph::point_cloud_graph< PointWithNormalT, boost::vecS, boost::undirectedS, boost::property< boost::vertex_color_t, uint32_t, boost::property< boost::vertex_timestamp_t, double, boost::property< boost::vertex_confidence_t, float > > >, boost::property< boost::edge_weight_t, float, boost::property< boost::edge_index_t, int > > >::m_point_cloud point_cloud_ptr m_point_cloud
pcl::graph::point_cloud_graph< PointWithNormalT, boost::vecS, boost::undirectedS, boost::property< boost::vertex_color_t, uint32_t, boost::property< boost::vertex_timestamp_t, double, boost::property< boost::vertex_confidence_t, float > > >, boost::property< boost::edge_weight_t, float, boost::property< boost::edge_index_t, int > > >::point_cloud_type pcl::PointCloud< PointWithNormalT > point_cloud_type
void removing_vertex(vertex_descriptor vertex)
point_cloud_graph & operator=(const point_cloud_graph &x)
Assignment operator.
pcl::graph::point_cloud_graph< PointWithNormalT, boost::vecS, boost::undirectedS, boost::property< boost::vertex_color_t, uint32_t, boost::property< boost::vertex_timestamp_t, double, boost::property< boost::vertex_confidence_t, float > > >, boost::property< boost::edge_weight_t, float, boost::property< boost::edge_index_t, int > > >::edge_property_type Base::edge_property_type edge_property_type
pcl::graph::point_cloud_graph< PointWithNormalT, boost::vecS, boost::undirectedS, boost::property< boost::vertex_color_t, uint32_t, boost::property< boost::vertex_timestamp_t, double, boost::property< boost::vertex_confidence_t, float > > >, boost::property< boost::edge_weight_t, float, boost::property< boost::edge_index_t, int > > >::vertex_descriptor Base::vertex_descriptor vertex_descriptor
pcl::graph::point_cloud_graph< PointWithNormalT, boost::vecS, boost::undirectedS, boost::property< boost::vertex_color_t, uint32_t, boost::property< boost::vertex_timestamp_t, double, boost::property< boost::vertex_confidence_t, float > > >, boost::property< boost::edge_weight_t, float, boost::property< boost::edge_index_t, int > > >::edge_descriptor Base::edge_descriptor edge_descriptor
edge_bundled & operator[](edge_descriptor e)
void added_vertex(vertex_descriptor)
pcl::graph::point_cloud_graph< PointWithNormalT, boost::vecS, boost::undirectedS, boost::property< boost::vertex_color_t, uint32_t, boost::property< boost::vertex_timestamp_t, double, boost::property< boost::vertex_confidence_t, float > > >, boost::property< boost::edge_weight_t, float, boost::property< boost::edge_index_t, int > > >::edges_size_type Base::edges_size_type edges_size_type
pcl::graph::point_cloud_graph< PointWithNormalT, boost::vecS, boost::undirectedS, boost::property< boost::vertex_color_t, uint32_t, boost::property< boost::vertex_timestamp_t, double, boost::property< boost::vertex_confidence_t, float > > >, boost::property< boost::edge_weight_t, float, boost::property< boost::edge_index_t, int > > >::stored_vertex Base::stored_vertex stored_vertex
vertex_bundled & operator[](vertex_descriptor v)
pcl::graph::point_cloud_graph< PointWithNormalT, boost::vecS, boost::undirectedS, boost::property< boost::vertex_color_t, uint32_t, boost::property< boost::vertex_timestamp_t, double, boost::property< boost::vertex_confidence_t, float > > >, boost::property< boost::edge_weight_t, float, boost::property< boost::edge_index_t, int > > >::vertex_list_selector boost::vecS vertex_list_selector
pcl::graph::point_cloud_graph< PointWithNormalT, boost::vecS, boost::undirectedS, boost::property< boost::vertex_color_t, uint32_t, boost::property< boost::vertex_timestamp_t, double, boost::property< boost::vertex_confidence_t, float > > >, boost::property< boost::edge_weight_t, float, boost::property< boost::edge_index_t, int > > >::degree_size_type Base::degree_size_type degree_size_type
pcl::graph::point_cloud_graph< PointWithNormalT, boost::vecS, boost::undirectedS, boost::property< boost::vertex_color_t, uint32_t, boost::property< boost::vertex_timestamp_t, double, boost::property< boost::vertex_confidence_t, float > > >, boost::property< boost::edge_weight_t, float, boost::property< boost::edge_index_t, int > > >::out_edge_list_selector boost::vecS out_edge_list_selector
void clear()
Remove all of the edges and vertices from the graph.
pcl::graph::point_cloud_graph< PointWithNormalT, boost::vecS, boost::undirectedS, boost::property< boost::vertex_color_t, uint32_t, boost::property< boost::vertex_timestamp_t, double, boost::property< boost::vertex_confidence_t, float > > >, boost::property< boost::edge_weight_t, float, boost::property< boost::edge_index_t, int > > >::edge_bundled Base::edge_bundled edge_bundled
void removing_vertex(vertex_descriptor vertex, T)
pcl::graph::point_cloud_graph< PointWithNormalT, boost::vecS, boost::undirectedS, boost::property< boost::vertex_color_t, uint32_t, boost::property< boost::vertex_timestamp_t, double, boost::property< boost::vertex_confidence_t, float > > >, boost::property< boost::edge_weight_t, float, boost::property< boost::edge_index_t, int > > >::graph_property_type pcl::PointCloud< PointWithNormalT >::Ptr graph_property_type
point_cloud_graph(const point_cloud_graph &x)
Copy constructor.
pcl::graph::point_cloud_graph< PointWithNormalT, boost::vecS, boost::undirectedS, boost::property< boost::vertex_color_t, uint32_t, boost::property< boost::vertex_timestamp_t, double, boost::property< boost::vertex_confidence_t, float > > >, boost::property< boost::edge_weight_t, float, boost::property< boost::edge_index_t, int > > >::edge_list_selector boost::listS edge_list_selector
pcl::graph::point_cloud_graph< PointWithNormalT, boost::vecS, boost::undirectedS, boost::property< boost::vertex_color_t, uint32_t, boost::property< boost::vertex_timestamp_t, double, boost::property< boost::vertex_confidence_t, float > > >, boost::property< boost::edge_weight_t, float, boost::property< boost::edge_index_t, int > > >::vertex_bundled PointWithNormalT vertex_bundled
point_cloud_graph(const point_cloud_ptr &p=point_cloud_ptr(new point_cloud_type))
Construct a graph based on existing point cloud.
pcl::graph::point_cloud_graph< PointWithNormalT, boost::vecS, boost::undirectedS, boost::property< boost::vertex_color_t, uint32_t, boost::property< boost::vertex_timestamp_t, double, boost::property< boost::vertex_confidence_t, float > > >, boost::property< boost::edge_weight_t, float, boost::property< boost::edge_index_t, int > > >::graph_bundled pcl::PointCloud< PointWithNormalT >::Ptr graph_bundled
pcl::graph::point_cloud_graph< PointWithNormalT, boost::vecS, boost::undirectedS, boost::property< boost::vertex_color_t, uint32_t, boost::property< boost::vertex_timestamp_t, double, boost::property< boost::vertex_confidence_t, float > > >, boost::property< boost::edge_weight_t, float, boost::property< boost::edge_index_t, int > > >::vertex_property_type Base::vertex_property_type vertex_property_type
const vertex_bundled & operator[](vertex_descriptor v) const
This class is to expose the point cloud stored in the point_cloud_graph as a vertex bundle property m...
const boost::identity_property_map & get_index_map() const
point_cloud_graph_traits< Graph >::point_cloud_type::iterator iterator
boost::property_traits< boost::identity_property_map >::key_type key_type
point_cloud_graph_traits< Graph >::point_type value_type
point_cloud_graph_traits< Graph >::point_cloud_type::const_iterator const_iterator
std::iterator_traits< iterator >::reference reference
point_cloud_property_map(const Graph *g, boost::vertex_bundle_t)
const_iterator storage_end() const
reference operator[](const key_type &v) const
const_iterator storage_begin() const
boost::identity_property_map & get_index_map()
boost::lvalue_property_map_tag category
This file offers overloads of toIce() and fromIce() functions for STL container types.
Vertex source(const detail::edge_base< Directed, Vertex > &e, const PCG &)
Vertex target(const detail::edge_base< Directed, Vertex > &e, const PCG &)
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...
pcl::PointCloud< P >::Ptr point_cloud(PCG &g)
Retrieve the point cloud stored in a point cloud graph.
mutable_property_graph_tag category
pcl::graph::point_cloud_property_map< PCG > type
Traits struct to access the types associated with point_cloud_graph.
GraphT::point_cloud_ptr point_cloud_ptr
GraphT::point_cloud_type point_cloud_type
GraphT::point_type point_type
GraphT::point_cloud_const_ptr point_cloud_const_ptr