42#include <pcl/octree/octree_pointcloud.h>
43#include <pcl/octree/octree_pointcloud_adjacency_container.h>
45#include <boost/graph/adjacency_list.hpp>
75template <
typename PointT,
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
Octree container class that does not store any information.
Octree adjacency leaf container class- stores a list of pointers to neighbors, number of points added...
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
OctreePointCloudAdjacency< PointT, LeafContainerT, BranchContainerT > OctreeAdjacencyT
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.
LeafContainerT * at(std::size_t idx)
typename LeafVectorT::iterator iterator
typename VoxelAdjacencyList::edge_descriptor EdgeID
typename LeafVectorT::const_iterator const_iterator
OctreeBase< LeafContainerT, BranchContainerT > OctreeBaseT
boost::adjacency_list< boost::setS, boost::setS, boost::undirectedS, PointT, float > VoxelAdjacencyList
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
OctreePointCloud< PointT, LeafContainerT, BranchContainerT, OctreeBaseT > OctreePointCloudT
void computeNeighbors(OctreeKey &key_arg, LeafContainerT *leaf_container)
Fills in the neighbors fields for new voxels.
OctreePointCloudAdjacency(const double resolution_arg)
Constructor.
pcl::PointCloud< PointT > PointCloud
typename OctreePointCloudT::BranchNode BranchNode
typename OctreePointCloudT::LeafNode LeafNode
void addPointToCloud(const PointT &point_arg, PointCloudPtr cloud_arg)
PointCloudConstPtr input_
OctreePointCloud(const double resolution_arg)
Octree pointcloud constructor.
void addPointFromCloud(uindex_t point_idx_arg, IndicesPtr indices_arg)
typename OctreeBaseT::LeafNode LeafNode
typename OctreeBaseT::BranchNode BranchNode
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.