40 #ifndef PCL_OCTREE_POINTCLOUD_ADJACENCY_H_
41 #define PCL_OCTREE_POINTCLOUD_ADJACENCY_H_
43 #include <pcl/common/geometry.h>
44 #include <pcl/octree/boost.h>
45 #include <pcl/octree/octree_base.h>
46 #include <pcl/octree/octree_iterator.h>
47 #include <pcl/octree/octree_pointcloud.h>
48 #include <pcl/octree/octree_pointcloud_adjacency_container.h>
54 #include <pcl/common/time.h>
81 typename LeafContainerT = OctreePointCloudAdjacencyContainer <PointT>,
82 typename BranchContainerT = OctreeContainerEmpty >
91 typedef boost::shared_ptr<OctreeAdjacencyT>
Ptr;
92 typedef boost::shared_ptr<const OctreeAdjacencyT>
ConstPtr;
122 typedef boost::adjacency_list<boost::setS, boost::setS, boost::undirectedS, PointT, float>
VoxelAdjacencyList;
123 typedef typename VoxelAdjacencyList::vertex_descriptor
VoxelID;
124 typedef typename VoxelAdjacencyList::edge_descriptor
EdgeID;
134 inline size_t size ()
const {
return leaf_vector_.size (); }
174 setTransformFunction (boost::function<
void (
PointT &p)> transform_func)
176 transform_func_ = transform_func;
217 boost::function<void (PointT &p)> transform_func_;
233 #include <pcl/octree/impl/octree_pointcloud_adjacency.hpp>
236 #endif //PCL_OCTREE_POINTCLOUD_SUPER_VOXEL_H_
LeafContainerT * getLeafContainerAtPoint(const PointT &point_arg) const
Gets the leaf container for a given point.
virtual ~OctreePointCloudAdjacency()
Empty class destructor.
OctreePointCloudAdjacency(const double resolution_arg)
Constructor.
OctreePointCloud< PointT, LeafContainerT, BranchContainerT, OctreeBaseT > OctreePointCloudT
Octree pointcloud voxel class used for adjacency calculation
Iterator depth_begin(unsigned int maxDepth_arg=0)
LeafVectorT::iterator iterator
VoxelAdjacencyList::vertex_descriptor VoxelID
LeafVectorT::const_iterator const_iterator
OctreeLeafNodeIterator< OctreeAdjacencyT > LeafNodeIterator
OctreePointCloudT::LeafNode LeafNode
Octree leaf node iterator class.
VoxelAdjacencyList::edge_descriptor EdgeID
OctreePointCloudT::BranchNode BranchNode
PointCloudConstPtr input_
Pointer to input point cloud dataset.
LeafNodeIterator leaf_begin(unsigned int maxDepth_arg=0)
void genOctreeKeyforPoint(const PointT &point_arg, OctreeKey &key_arg) const
Generates octree key for specified point (uses transform if provided)
const Iterator depth_end()
void computeNeighbors(OctreeKey &key_arg, LeafContainerT *leaf_container)
Fills in the neighbors fields for new voxels.
const OctreeLeafNodeIterator< OctreeAdjacencyT > ConstLeafNodeIterator
A point structure representing Euclidean xyz coordinates.
std::vector< LeafContainerT * > LeafVectorT
OctreePointCloudAdjacency< PointT, LeafContainerT, BranchContainerT > OctreeAdjacencyT
OctreeBase< LeafContainerT, BranchContainerT > OctreeBaseT
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.
const LeafNodeIterator leaf_end()
boost::shared_ptr< OctreeAdjacencyT > Ptr
boost::shared_ptr< const OctreeAdjacencyT > ConstPtr
boost::adjacency_list< boost::setS, boost::setS, boost::undirectedS, PointT, float > VoxelAdjacencyList
OctreeT::LeafNode LeafNode
virtual void addPointIdx(const int pointIdx_arg)
Add point at index from input pointcloud dataset to octree.
Abstract octree iterator class
OctreeT::BranchNode BranchNode
pcl::PointCloud< PointT > CloudT
void computeVoxelAdjacencyGraph(VoxelAdjacencyList &voxel_adjacency_graph)
Computes an adjacency graph of voxel relations.
A point structure representing Euclidean xyz coordinates, and the RGB color.
OctreeDepthFirstIterator< OctreeAdjacencyT > Iterator
double resolution_
Octree resolution.
void addPointsFromInputCloud()
Adds points from cloud to the octree.
const OctreeDepthFirstIterator< OctreeAdjacencyT > ConstIterator