40 #ifndef PCL_OCTREE_POINTCLOUD_ADJACENCY_H_ 41 #define PCL_OCTREE_POINTCLOUD_ADJACENCY_H_ 43 #include <pcl/console/print.h> 44 #include <pcl/common/geometry.h> 45 #include <pcl/octree/boost.h> 46 #include <pcl/octree/octree_impl.h> 47 #include <pcl/octree/octree_pointcloud_adjacency_container.h> 79 typename LeafContainerT = OctreePointCloudAdjacencyContainer<PointT>,
80 typename BranchContainerT = OctreeContainerEmpty>
89 typedef boost::shared_ptr<OctreeAdjacencyT>
Ptr;
90 typedef boost::shared_ptr<const OctreeAdjacencyT>
ConstPtr;
121 typedef boost::adjacency_list<boost::setS, boost::setS, boost::undirectedS, PointT, float>
VoxelAdjacencyList;
122 typedef typename VoxelAdjacencyList::vertex_descriptor
VoxelID;
123 typedef typename VoxelAdjacencyList::edge_descriptor
EdgeID;
132 inline iterator
begin () {
return (leaf_vector_.begin ()); }
133 inline iterator
end () {
return (leaf_vector_.end ()); }
134 inline LeafContainerT*
at (
size_t idx) {
return leaf_vector_.at (idx); }
137 inline size_t size ()
const {
return leaf_vector_.size (); }
182 transform_func_ = transform_func;
240 LeafVectorT leaf_vector_;
242 boost::function<void (PointT &p)> transform_func_;
251 #include <pcl/octree/impl/octree_pointcloud_adjacency.hpp> 254 #endif // PCL_OCTREE_POINTCLOUD_ADJACENCY_H_ LeafContainerT * getLeafContainerAtPoint(const PointT &point_arg) const
Gets the leaf container for a given point.
virtual ~OctreePointCloudAdjacency()
Empty class destructor.
pcl::PointCloud< PointT > PointCloud
OctreePointCloudAdjacency(const double resolution_arg)
Constructor.
void addPointToCloud(const PointT &point_arg, PointCloudPtr cloud_arg)
Add point simultaneously to octree and input point cloud.
Octree pointcloud voxel class which maintains adjacency information for its voxels.
LeafVectorT::iterator iterator
VoxelAdjacencyList::vertex_descriptor VoxelID
LeafVectorT::const_iterator const_iterator
void setTransformFunction(boost::function< void(PointT &p)> transform_func)
Sets a point transform (and inverse) used to transform the space of the input cloud.
boost::shared_ptr< const PointCloud > PointCloudConstPtr
OctreeLeafNodeIterator< OctreeAdjacencyT > LeafNodeIterator
OctreePointCloudT::LeafNode LeafNode
Octree leaf node iterator class.
Iterator depth_begin(unsigned int max_depth_arg=0)
VoxelAdjacencyList::edge_descriptor EdgeID
OctreePointCloudT::BranchNode BranchNode
PointCloudConstPtr input_
Pointer to input point cloud dataset.
const OctreeLeafNodeIterator< OctreeAdjacencyT > ConstLeafNodeIterator
void genOctreeKeyforPoint(const PointT &point_arg, OctreeKey &key_arg) const
Generates octree key for specified point (uses transform if provided).
const Iterator depth_end()
virtual void addPointIdx(const int point_idx_arg)
Add point at index from input pointcloud dataset to octree.
void computeNeighbors(OctreeKey &key_arg, LeafContainerT *leaf_container)
Fills in the neighbors fields for new voxels.
A point structure representing Euclidean xyz coordinates.
std::vector< LeafContainerT * > LeafVectorT
LeafNodeIterator leaf_begin(unsigned int max_depth_arg=0)
OctreePointCloudAdjacency< PointT, LeafContainerT, BranchContainerT > OctreeAdjacencyT
PointCloud represents the base class in PCL for storing collections of 3D points. ...
OctreeBase< LeafContainerT, BranchContainerT > OctreeBaseT
boost::shared_ptr< PointCloud > PointCloudPtr
void addPointFromCloud(const int point_idx_arg, IndicesPtr indices_arg)
Add point at given index from input point cloud to octree.
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
Abstract octree iterator class
OctreeT::BranchNode BranchNode
void computeVoxelAdjacencyGraph(VoxelAdjacencyList &voxel_adjacency_graph)
Computes an adjacency graph of voxel relations.
A point structure representing Euclidean xyz coordinates, and the RGB color.
OctreePointCloud< PointT, LeafContainerT, BranchContainerT, OctreeBaseT > OctreePointCloudT
OctreeDepthFirstIterator< OctreeAdjacencyT > Iterator
LeafContainerT * at(size_t idx)
double resolution_
Octree resolution.
void addPointsFromInputCloud()
Adds points from cloud to the octree.
const OctreeDepthFirstIterator< OctreeAdjacencyT > ConstIterator