|
Point Cloud Library (PCL)
1.6.0
|
Octree class. More...
#include <pcl/octree/octree_base.h>
Public Types | |
| typedef OctreeBase< DataT, OctreeContainerDataT< DataT > , OctreeContainerEmpty< DataT > > | SingleObjLeafContainer |
| typedef OctreeBase< DataT, OctreeContainerDataTVector < DataT > , OctreeContainerEmpty< DataT > > | MultipleObjsLeafContainer |
| typedef OctreeBase< DataT, LeafT, BranchT > | OctreeT |
| typedef OctreeBranchNode< BranchT > | BranchNode |
| typedef OctreeLeafNode< LeafT > | LeafNode |
| typedef OctreeDepthFirstIterator < DataT, OctreeT > | Iterator |
| typedef const OctreeDepthFirstIterator < DataT, OctreeT > | ConstIterator |
| typedef OctreeLeafNodeIterator < DataT, OctreeT > | LeafNodeIterator |
| typedef const OctreeLeafNodeIterator< DataT, OctreeT > | ConstLeafNodeIterator |
| typedef OctreeDepthFirstIterator < DataT, OctreeT > | DepthFirstIterator |
| typedef const OctreeDepthFirstIterator < DataT, OctreeT > | ConstDepthFirstIterator |
| typedef OctreeBreadthFirstIterator < DataT, OctreeT > | BreadthFirstIterator |
| typedef const OctreeBreadthFirstIterator < DataT, OctreeT > | ConstBreadthFirstIterator |
Public Member Functions | |
| OctreeBase () | |
| Empty constructor. | |
| virtual | ~OctreeBase () |
| Empty deconstructor. | |
| OctreeBase (const OctreeBase &source) | |
| Copy constructor. | |
| OctreeBase & | operator= (const OctreeBase &source) |
| Copy operator. | |
| void | setMaxVoxelIndex (unsigned int maxVoxelIndex_arg) |
| Set the maximum amount of voxels per dimension. | |
| void | setTreeDepth (unsigned int depth_arg) |
| Set the maximum depth of the octree. | |
| unsigned int | getTreeDepth () const |
| Get the maximum depth of the octree. | |
| void | enableDynamicDepth (size_t maxObjsPerLeaf) |
| Enable dynamic octree structure. | |
| void | addData (unsigned int idxX_arg, unsigned int idxY_arg, unsigned int idxZ_arg, const DataT &data_arg) |
| Add a const DataT element to leaf node at (idxX, idxY, idxZ). | |
| bool | getData (unsigned int idxX_arg, unsigned int idxY_arg, unsigned int idxZ_arg, DataT &data_arg) const |
| Retrieve a DataT element from leaf node at (idxX, idxY, idxZ). | |
| bool | existLeaf (unsigned int idxX_arg, unsigned int idxY_arg, unsigned int idxZ_arg) const |
| Check for the existence of leaf node at (idxX, idxY, idxZ). | |
| void | removeLeaf (unsigned int idxX_arg, unsigned int idxY_arg, unsigned int idxZ_arg) |
| Remove leaf node at (idxX_arg, idxY_arg, idxZ_arg). | |
| std::size_t | getLeafCount () const |
| Return the amount of existing leafs in the octree. | |
| std::size_t | getBranchCount () const |
| Return the amount of existing branches in the octree. | |
| void | deleteTree (bool freeMemory_arg=true) |
| Delete the octree structure and its leaf nodes. | |
| void | serializeTree (std::vector< char > &binaryTreeOut_arg) |
| Serialize octree into a binary output vector describing its branch node structure. | |
| void | serializeTree (std::vector< char > &binaryTreeOut_arg, std::vector< DataT > &dataVector_arg) |
| Serialize octree into a binary output vector describing its branch node structure and push all DataT elements stored in the octree to a vector. | |
| void | serializeLeafs (std::vector< DataT > &dataVector_arg) |
| Outputs a vector of all DataT elements that are stored within the octree leaf nodes. | |
| void | deserializeTree (std::vector< char > &binaryTreeIn_arg) |
| Deserialize a binary octree description vector and create a corresponding octree structure. | |
| void | deserializeTree (std::vector< char > &binaryTreeIn_arg, std::vector< DataT > &dataVector_arg) |
| Deserialize a binary octree description and create a corresponding octree structure. | |
Friends | |
| class | OctreeIteratorBase< DataT, OctreeT > |
| class | OctreeDepthFirstIterator< DataT, OctreeT > |
| class | OctreeBreadthFirstIterator< DataT, OctreeT > |
| class | OctreeLeafNodeIterator< DataT, OctreeT > |
Octree class.
Definition at line 64 of file octree_base.h.
| typedef OctreeBranchNode<BranchT> pcl::octree::OctreeBase< DataT, LeafT, BranchT >::BranchNode |
Reimplemented in pcl::octree::OctreePointCloud< PointT, LeafT, BranchT, OctreeBase< int, LeafT, BranchT > >, pcl::octree::OctreePointCloud< PointT, LeafT, BranchT >, and pcl::octree::OctreePointCloudSearch< PointT, LeafT, BranchT >.
Definition at line 80 of file octree_base.h.
| typedef OctreeBreadthFirstIterator<DataT, OctreeT> pcl::octree::OctreeBase< DataT, LeafT, BranchT >::BreadthFirstIterator |
Reimplemented in pcl::octree::OctreePointCloud< PointT, LeafT, BranchT, OctreeBase< int, LeafT, BranchT > >, and pcl::octree::OctreePointCloud< PointT, LeafT, BranchT >.
Definition at line 92 of file octree_base.h.
| typedef const OctreeBreadthFirstIterator<DataT, OctreeT> pcl::octree::OctreeBase< DataT, LeafT, BranchT >::ConstBreadthFirstIterator |
Reimplemented in pcl::octree::OctreePointCloud< PointT, LeafT, BranchT, OctreeBase< int, LeafT, BranchT > >, and pcl::octree::OctreePointCloud< PointT, LeafT, BranchT >.
Definition at line 93 of file octree_base.h.
| typedef const OctreeDepthFirstIterator<DataT, OctreeT> pcl::octree::OctreeBase< DataT, LeafT, BranchT >::ConstDepthFirstIterator |
Reimplemented in pcl::octree::OctreePointCloud< PointT, LeafT, BranchT, OctreeBase< int, LeafT, BranchT > >, and pcl::octree::OctreePointCloud< PointT, LeafT, BranchT >.
Definition at line 91 of file octree_base.h.
| typedef const OctreeDepthFirstIterator<DataT, OctreeT> pcl::octree::OctreeBase< DataT, LeafT, BranchT >::ConstIterator |
Reimplemented in pcl::octree::OctreePointCloud< PointT, LeafT, BranchT, OctreeBase< int, LeafT, BranchT > >, and pcl::octree::OctreePointCloud< PointT, LeafT, BranchT >.
Definition at line 85 of file octree_base.h.
| typedef const OctreeLeafNodeIterator<DataT, OctreeT> pcl::octree::OctreeBase< DataT, LeafT, BranchT >::ConstLeafNodeIterator |
Reimplemented in pcl::octree::OctreePointCloud< PointT, LeafT, BranchT, OctreeBase< int, LeafT, BranchT > >, and pcl::octree::OctreePointCloud< PointT, LeafT, BranchT >.
Definition at line 88 of file octree_base.h.
| typedef OctreeDepthFirstIterator<DataT, OctreeT> pcl::octree::OctreeBase< DataT, LeafT, BranchT >::DepthFirstIterator |
Reimplemented in pcl::octree::OctreePointCloud< PointT, LeafT, BranchT, OctreeBase< int, LeafT, BranchT > >, and pcl::octree::OctreePointCloud< PointT, LeafT, BranchT >.
Definition at line 90 of file octree_base.h.
| typedef OctreeDepthFirstIterator<DataT, OctreeT> pcl::octree::OctreeBase< DataT, LeafT, BranchT >::Iterator |
Reimplemented in pcl::octree::OctreePointCloud< PointT, LeafT, BranchT, OctreeBase< int, LeafT, BranchT > >, and pcl::octree::OctreePointCloud< PointT, LeafT, BranchT >.
Definition at line 84 of file octree_base.h.
| typedef OctreeLeafNode<LeafT> pcl::octree::OctreeBase< DataT, LeafT, BranchT >::LeafNode |
Reimplemented in pcl::octree::OctreePointCloud< PointT, LeafT, BranchT, OctreeBase< int, LeafT, BranchT > >, pcl::octree::OctreePointCloud< PointT, LeafT, BranchT >, and pcl::octree::OctreePointCloudSearch< PointT, LeafT, BranchT >.
Definition at line 81 of file octree_base.h.
| typedef OctreeLeafNodeIterator<DataT, OctreeT> pcl::octree::OctreeBase< DataT, LeafT, BranchT >::LeafNodeIterator |
Reimplemented in pcl::octree::OctreePointCloud< PointT, LeafT, BranchT, OctreeBase< int, LeafT, BranchT > >, and pcl::octree::OctreePointCloud< PointT, LeafT, BranchT >.
Definition at line 87 of file octree_base.h.
| typedef OctreeBase<DataT, OctreeContainerDataTVector<DataT>, OctreeContainerEmpty<DataT> > pcl::octree::OctreeBase< DataT, LeafT, BranchT >::MultipleObjsLeafContainer |
Definition at line 70 of file octree_base.h.
| typedef OctreeBase<DataT, LeafT, BranchT> pcl::octree::OctreeBase< DataT, LeafT, BranchT >::OctreeT |
Reimplemented in pcl::octree::OctreePointCloudSearch< PointT, LeafT, BranchT >.
Definition at line 72 of file octree_base.h.
| typedef OctreeBase<DataT, OctreeContainerDataT<DataT>, OctreeContainerEmpty<DataT> > pcl::octree::OctreeBase< DataT, LeafT, BranchT >::SingleObjLeafContainer |
Definition at line 69 of file octree_base.h.
| pcl::octree::OctreeBase< DataT, LeafT, BranchT >::OctreeBase | ( | ) |
Empty constructor.
Definition at line 57 of file octree_base.hpp.
| pcl::octree::OctreeBase< DataT, LeafT, BranchT >::~OctreeBase | ( | ) | [virtual] |
Empty deconstructor.
Definition at line 73 of file octree_base.hpp.
| pcl::octree::OctreeBase< DataT, LeafT, BranchT >::OctreeBase | ( | const OctreeBase< DataT, LeafT, BranchT > & | source | ) | [inline] |
Copy constructor.
Definition at line 104 of file octree_base.h.
| void pcl::octree::OctreeBase< DataT, LeafT, BranchT >::addData | ( | unsigned int | idxX_arg, |
| unsigned int | idxY_arg, | ||
| unsigned int | idxZ_arg, | ||
| const DataT & | data_arg | ||
| ) |
Add a const DataT element to leaf node at (idxX, idxY, idxZ).
If leaf node does not exist, it is created and added to the octree.
| idxX_arg,: | index of leaf node in the X axis. |
| idxY_arg,: | index of leaf node in the Y axis. |
| idxZ_arg,: | index of leaf node in the Z axis. |
| data_arg,: | const reference to DataT object to be added. |
Definition at line 117 of file octree_base.hpp.
| void pcl::octree::OctreeBase< DataT, LeafT, BranchT >::deleteTree | ( | bool | freeMemory_arg = true | ) |
Delete the octree structure and its leaf nodes.
| freeMemory_arg,: | if "true", allocated octree nodes are deleted, otherwise they are pushed to the octree node pool |
Reimplemented in pcl::octree::OctreePointCloud< PointT, LeafT, BranchT, OctreeBase< int, LeafT, BranchT > >, and pcl::octree::OctreePointCloud< PointT, LeafT, BranchT >.
Definition at line 173 of file octree_base.hpp.
| void pcl::octree::OctreeBase< DataT, LeafT, BranchT >::deserializeTree | ( | std::vector< char > & | binaryTreeIn_arg | ) |
Deserialize a binary octree description vector and create a corresponding octree structure.
Leaf nodes are initialized with getDataTByKey(..).
| binaryTreeIn_arg,: | reference to input vector for reading binary tree structure. |
Definition at line 249 of file octree_base.hpp.
| void pcl::octree::OctreeBase< DataT, LeafT, BranchT >::deserializeTree | ( | std::vector< char > & | binaryTreeIn_arg, |
| std::vector< DataT > & | dataVector_arg | ||
| ) |
Deserialize a binary octree description and create a corresponding octree structure.
Leaf nodes are initialized with DataT elements from the dataVector.
| binaryTreeIn_arg,: | reference to input vector for reading binary tree structure. |
| dataVector_arg,: | reference to DataT vector that provides DataT objects for initializing leaf nodes. |
Definition at line 271 of file octree_base.hpp.
| void pcl::octree::OctreeBase< DataT, LeafT, BranchT >::enableDynamicDepth | ( | size_t | maxObjsPerLeaf | ) | [inline] |
Enable dynamic octree structure.
Definition at line 157 of file octree_base.h.
| bool pcl::octree::OctreeBase< DataT, LeafT, BranchT >::existLeaf | ( | unsigned int | idxX_arg, |
| unsigned int | idxY_arg, | ||
| unsigned int | idxZ_arg | ||
| ) | const |
Check for the existence of leaf node at (idxX, idxY, idxZ).
| idxX_arg,: | index of leaf node in the X axis. |
| idxY_arg,: | index of leaf node in the Y axis. |
| idxZ_arg,: | index of leaf node in the Z axis. |
Definition at line 149 of file octree_base.hpp.
| std::size_t pcl::octree::OctreeBase< DataT, LeafT, BranchT >::getBranchCount | ( | ) | const [inline] |
Return the amount of existing branches in the octree.
Definition at line 213 of file octree_base.h.
| bool pcl::octree::OctreeBase< DataT, LeafT, BranchT >::getData | ( | unsigned int | idxX_arg, |
| unsigned int | idxY_arg, | ||
| unsigned int | idxZ_arg, | ||
| DataT & | data_arg | ||
| ) | const |
Retrieve a DataT element from leaf node at (idxX, idxY, idxZ).
It returns false if leaf node does not exist.
| idxX_arg,: | index of leaf node in the X axis. |
| idxY_arg,: | index of leaf node in the Y axis. |
| idxZ_arg,: | index of leaf node in the Z axis. |
| data_arg,: | reference to DataT object that contains content of leaf node if search was successful. |
Definition at line 129 of file octree_base.hpp.
| std::size_t pcl::octree::OctreeBase< DataT, LeafT, BranchT >::getLeafCount | ( | ) | const [inline] |
Return the amount of existing leafs in the octree.
Definition at line 204 of file octree_base.h.
| unsigned int pcl::octree::OctreeBase< DataT, LeafT, BranchT >::getTreeDepth | ( | ) | const [inline] |
Get the maximum depth of the octree.
Reimplemented in pcl::octree::OctreePointCloud< PointT, LeafT, BranchT, OctreeBase< int, LeafT, BranchT > >, and pcl::octree::OctreePointCloud< PointT, LeafT, BranchT >.
Definition at line 147 of file octree_base.h.
| OctreeBase& pcl::octree::OctreeBase< DataT, LeafT, BranchT >::operator= | ( | const OctreeBase< DataT, LeafT, BranchT > & | source | ) | [inline] |
Copy operator.
Definition at line 119 of file octree_base.h.
| void pcl::octree::OctreeBase< DataT, LeafT, BranchT >::removeLeaf | ( | unsigned int | idxX_arg, |
| unsigned int | idxY_arg, | ||
| unsigned int | idxZ_arg | ||
| ) |
Remove leaf node at (idxX_arg, idxY_arg, idxZ_arg).
| idxX_arg,: | index of leaf node in the X axis. |
| idxY_arg,: | index of leaf node in the Y axis. |
| idxZ_arg,: | index of leaf node in the Z axis. |
Definition at line 161 of file octree_base.hpp.
| void pcl::octree::OctreeBase< DataT, LeafT, BranchT >::serializeLeafs | ( | std::vector< DataT > & | dataVector_arg | ) |
Outputs a vector of all DataT elements that are stored within the octree leaf nodes.
| dataVector_arg,: | reference to DataT vector that receives a copy of all DataT objects in the octree. |
Definition at line 231 of file octree_base.hpp.
| void pcl::octree::OctreeBase< DataT, LeafT, BranchT >::serializeTree | ( | std::vector< char > & | binaryTreeOut_arg | ) |
Serialize octree into a binary output vector describing its branch node structure.
| binaryTreeOut_arg,: | reference to output vector for writing binary tree structure. |
Definition at line 194 of file octree_base.hpp.
| void pcl::octree::OctreeBase< DataT, LeafT, BranchT >::serializeTree | ( | std::vector< char > & | binaryTreeOut_arg, |
| std::vector< DataT > & | dataVector_arg | ||
| ) |
Serialize octree into a binary output vector describing its branch node structure and push all DataT elements stored in the octree to a vector.
| binaryTreeOut_arg,: | reference to output vector for writing binary tree structure. |
| dataVector_arg,: | reference of DataT vector that receives a copy of all DataT objects in the octree |
Definition at line 211 of file octree_base.hpp.
| void pcl::octree::OctreeBase< DataT, LeafT, BranchT >::setMaxVoxelIndex | ( | unsigned int | maxVoxelIndex_arg | ) |
Set the maximum amount of voxels per dimension.
| [in] | maxVoxelIndex_arg | maximum amount of voxels per dimension |
Definition at line 83 of file octree_base.hpp.
| void pcl::octree::OctreeBase< DataT, LeafT, BranchT >::setTreeDepth | ( | unsigned int | depth_arg | ) |
Set the maximum depth of the octree.
| depth_arg,: | maximum depth of octree |
Definition at line 101 of file octree_base.hpp.
friend class OctreeBreadthFirstIterator< DataT, OctreeT > [friend] |
Definition at line 77 of file octree_base.h.
friend class OctreeDepthFirstIterator< DataT, OctreeT > [friend] |
Definition at line 76 of file octree_base.h.
friend class OctreeIteratorBase< DataT, OctreeT > [friend] |
Definition at line 75 of file octree_base.h.
friend class OctreeLeafNodeIterator< DataT, OctreeT > [friend] |
Definition at line 78 of file octree_base.h.
1.7.6.1