42 #include <pcl/octree/octree_pointcloud.h>
43 #include <pcl/octree/octree_pointcloud_adjacency_container.h>
45 #include <boost/graph/adjacency_list.hpp>
76 typename LeafContainerT = OctreePointCloudAdjacencyContainer<PointT>,
77 typename BranchContainerT = OctreeContainerEmpty>
86 using Ptr = shared_ptr<OctreeAdjacencyT>;
87 using ConstPtr = shared_ptr<const OctreeAdjacencyT>;
100 adjacency_list<boost::setS, boost::setS, boost::undirectedS, PointT, float>;
101 using VoxelID =
typename VoxelAdjacencyList::vertex_descriptor;
102 using EdgeID =
typename VoxelAdjacencyList::edge_descriptor;
114 return (leaf_vector_.begin());
119 return (leaf_vector_.end());
121 inline LeafContainerT*
124 return leaf_vector_.at(idx);
131 return leaf_vector_.size();
175 transform_func_ = transform_func;
239 std::function<void(
PointT& p)> transform_func_;
248 #include <pcl/octree/impl/octree_pointcloud_adjacency.hpp>
PointCloud represents the base class in PCL for storing collections of 3D points.
shared_ptr< PointCloud< PointT > > Ptr
shared_ptr< const PointCloud< PointT > > ConstPtr
Abstract octree branch class
Abstract octree leaf class
Octree pointcloud voxel class which maintains adjacency information for its voxels.
void setTransformFunction(std::function< void(PointT &p)> transform_func)
Sets a point transform (and inverse) used to transform the space of the input cloud.
typename VoxelAdjacencyList::vertex_descriptor VoxelID
void genOctreeKeyforPoint(const PointT &point_arg, OctreeKey &key_arg) const
Generates octree key for specified point (uses transform if provided).
bool testForOcclusion(const PointT &point_arg, const PointXYZ &camera_pos=PointXYZ(0, 0, 0))
Tests whether input point is occluded from specified camera point by other voxels.
typename PointCloud::ConstPtr PointCloudConstPtr
shared_ptr< OctreeAdjacencyT > Ptr
typename PointCloud::Ptr PointCloudPtr
void computeVoxelAdjacencyGraph(VoxelAdjacencyList &voxel_adjacency_graph)
Computes an adjacency graph of voxel relations.
LeafContainerT * getLeafContainerAtPoint(const PointT &point_arg) const
Gets the leaf container for a given point.
void addPointsFromInputCloud()
Adds points from cloud to the octree.
typename LeafVectorT::iterator iterator
typename VoxelAdjacencyList::edge_descriptor EdgeID
typename LeafVectorT::const_iterator const_iterator
void addPointIdx(uindex_t point_idx_arg) override
Add point at index from input pointcloud dataset to octree.
std::vector< LeafContainerT * > LeafVectorT
shared_ptr< const OctreeAdjacencyT > ConstPtr
void computeNeighbors(OctreeKey &key_arg, LeafContainerT *leaf_container)
Fills in the neighbors fields for new voxels.
OctreePointCloudAdjacency(const double resolution_arg)
Constructor.
boost::adjacency_list< boost::setS, boost::setS, boost::undirectedS, PointT, float > VoxelAdjacencyList
LeafContainerT * at(std::size_t idx)
PointCloudConstPtr input_
Pointer to input point cloud dataset.
void addPointFromCloud(uindex_t point_idx_arg, IndicesPtr indices_arg)
Add point at given index from input point cloud to octree.
void addPointToCloud(const PointT &point_arg, PointCloudPtr cloud_arg)
Add point simultaneously to octree and input point cloud.
typename OctreeT::LeafNode LeafNode
typename OctreeT::BranchNode BranchNode
double resolution_
Octree resolution.
detail::int_type_t< detail::index_type_size, false > uindex_t
Type used for an unsigned index in PCL.
A point structure representing Euclidean xyz coordinates.
A point structure representing Euclidean xyz coordinates, and the RGB color.