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 (); }
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_
virtual ~OctreePointCloudAdjacency()
Empty class destructor.
const LeafNodeIterator leaf_end()
OctreeLeafNodeIterator< OctreeAdjacencyT > LeafNodeIterator
VoxelAdjacencyList::edge_descriptor EdgeID
OctreePointCloud< PointT, LeafContainerT, BranchContainerT, OctreeBaseT > OctreePointCloudT
VoxelAdjacencyList::vertex_descriptor VoxelID
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 OctreeLeafNodeIterator< OctreeAdjacencyT > ConstLeafNodeIterator
std::vector< LeafContainerT * > LeafVectorT
LeafContainerT * getLeafContainerAtPoint(const PointT &point_arg) const
Gets the leaf container for a given point.
void genOctreeKeyforPoint(const PointT &point_arg, OctreeKey &key_arg) const
Generates octree key for specified point (uses transform if provided)
virtual void addPointIdx(const int pointIdx_arg)
Add point at index from input pointcloud dataset to octree.
LeafNodeIterator leaf_begin(unsigned int maxDepth_arg=0)
Octree pointcloud voxel class used for adjacency calculation
double resolution_
Octree resolution.
OctreeDepthFirstIterator< OctreeAdjacencyT > Iterator
OctreeT::LeafNode LeafNode
OctreeT::BranchNode BranchNode
void computeNeighbors(OctreeKey &key_arg, LeafContainerT *leaf_container)
Fills in the neighbors fields for new voxels.
OctreeBase< LeafContainerT, BranchContainerT > OctreeBaseT
Octree leaf node iterator class.
void setTransformFunction(boost::function< void(PointT &p)> transform_func)
Sets a point transform (and inverse) used to transform the space of the input cloud This is useful fo...
OctreePointCloudT::BranchNode BranchNode
pcl::PointCloud< PointT > CloudT
PointCloudConstPtr input_
Pointer to input point cloud dataset.
LeafVectorT::iterator iterator
void computeVoxelAdjacencyGraph(VoxelAdjacencyList &voxel_adjacency_graph)
Computes an adjacency graph of voxel relations.
boost::shared_ptr< OctreeAdjacencyT > Ptr
const OctreeDepthFirstIterator< OctreeAdjacencyT > ConstIterator
boost::adjacency_list< boost::setS, boost::setS, boost::undirectedS, PointT, float > VoxelAdjacencyList
A point structure representing Euclidean xyz coordinates, and the RGB color.
OctreePointCloudAdjacency(const double resolution_arg)
Constructor.
LeafVectorT::const_iterator const_iterator
boost::shared_ptr< const OctreeAdjacencyT > ConstPtr
OctreePointCloudAdjacency< PointT, LeafContainerT, BranchContainerT > OctreeAdjacencyT
A point structure representing Euclidean xyz coordinates.
void addPointsFromInputCloud()
Adds points from cloud to the octree.
Abstract octree iterator class
OctreePointCloudT::LeafNode LeafNode
Iterator depth_begin(unsigned int maxDepth_arg=0)
const Iterator depth_end()