40 #ifndef PCL_OCTREE_POINTCLOUD_ADJACENCY_H_ 41 #define PCL_OCTREE_POINTCLOUD_ADJACENCY_H_ 43 #include <pcl/octree/boost.h> 44 #include <pcl/octree/octree_pointcloud.h> 45 #include <pcl/octree/octree_pointcloud_adjacency_container.h> 77 typename LeafContainerT = OctreePointCloudAdjacencyContainer<PointT>,
78 typename BranchContainerT = OctreeContainerEmpty>
87 typedef boost::shared_ptr<OctreeAdjacencyT>
Ptr;
88 typedef boost::shared_ptr<const OctreeAdjacencyT>
ConstPtr;
99 typedef boost::adjacency_list<boost::setS, boost::setS, boost::undirectedS, PointT, float>
VoxelAdjacencyList;
100 typedef typename VoxelAdjacencyList::vertex_descriptor
VoxelID;
101 typedef typename VoxelAdjacencyList::edge_descriptor
EdgeID;
110 inline iterator
begin () {
return (leaf_vector_.begin ()); }
111 inline iterator
end () {
return (leaf_vector_.end ()); }
112 inline LeafContainerT*
at (
size_t idx) {
return leaf_vector_.at (idx); }
115 inline size_t size ()
const {
return leaf_vector_.size (); }
160 transform_func_ = transform_func;
218 LeafVectorT leaf_vector_;
220 boost::function<void (PointT &p)> transform_func_;
229 #include <pcl/octree/impl/octree_pointcloud_adjacency.hpp> 231 #endif // PCL_OCTREE_POINTCLOUD_ADJACENCY_H_ void genOctreeKeyforPoint(const PointT &point_arg, OctreeKey &key_arg) const
Generates octree key for specified point (uses transform if provided).
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.
This file defines compatibility wrappers for low level I/O functions.
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
OctreePointCloudT::LeafNode LeafNode
VoxelAdjacencyList::edge_descriptor EdgeID
OctreePointCloudT::BranchNode BranchNode
PointCloudConstPtr input_
Pointer to input point cloud dataset.
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
OctreePointCloudAdjacency< PointT, LeafContainerT, BranchContainerT > OctreeAdjacencyT
LeafContainerT * getLeafContainerAtPoint(const PointT &point_arg) const
Gets the leaf container for a given point.
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.
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
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
LeafContainerT * at(size_t idx)
double resolution_
Octree resolution.
void addPointsFromInputCloud()
Adds points from cloud to the octree.