Octree class. More...
#include <octree_base.h>
Public Types | |
typedef BranchContainerT | BranchContainer |
typedef OctreeBranchNode < BranchContainerT > | BranchNode |
typedef OctreeBreadthFirstIterator < OctreeT > | BreadthFirstIterator |
typedef const OctreeBreadthFirstIterator < OctreeT > | ConstBreadthFirstIterator |
typedef const OctreeDepthFirstIterator < OctreeT > | ConstDepthFirstIterator |
typedef const OctreeDepthFirstIterator < OctreeT > | ConstIterator |
typedef const OctreeLeafNodeIterator < OctreeT > | ConstLeafNodeIterator |
typedef OctreeDepthFirstIterator < OctreeT > | DepthFirstIterator |
typedef OctreeDepthFirstIterator < OctreeT > | Iterator |
typedef LeafContainerT | LeafContainer |
typedef OctreeLeafNode < LeafContainerT > | LeafNode |
typedef OctreeLeafNodeIterator < OctreeT > | LeafNodeIterator |
typedef OctreeBase < LeafContainerT, BranchContainerT > | OctreeT |
Public Member Functions | |
Iterator | begin (unsigned int max_depth_arg=0) |
BreadthFirstIterator | breadth_begin (unsigned int max_depth_arg=0) |
const BreadthFirstIterator | breadth_end () |
LeafContainerT * | createLeaf (unsigned int idx_x_arg, unsigned int idx_y_arg, unsigned int idx_z_arg) |
Create new leaf node at (idx_x_arg, idx_y_arg, idx_z_arg). | |
void | deleteTree () |
Delete the octree structure and its leaf nodes. | |
DepthFirstIterator | depth_begin (unsigned int max_depth_arg=0) |
const DepthFirstIterator | depth_end () |
void | deserializeTree (std::vector< char > &binary_tree_input_arg) |
Deserialize a binary octree description vector and create a corresponding octree structure. Leaf nodes are initialized with getDataTByKey(..). | |
void | deserializeTree (std::vector< char > &binary_tree_input_arg, std::vector< LeafContainerT * > &leaf_container_vector_arg) |
Deserialize a binary octree description and create a corresponding octree structure. Leaf nodes are initialized with LeafContainerT elements from the dataVector. | |
const Iterator | end () |
bool | existLeaf (unsigned int idx_x_arg, unsigned int idx_y_arg, unsigned int idx_z_arg) const |
idx_x_arg for the existence of leaf node at (idx_x_arg, idx_y_arg, idx_z_arg). | |
LeafContainerT * | findLeaf (unsigned int idx_x_arg, unsigned int idx_y_arg, unsigned int idx_z_arg) |
Find leaf node at (idx_x_arg, idx_y_arg, idx_z_arg). | |
std::size_t | getBranchCount () const |
Return the amount of existing branch nodes in the octree. | |
std::size_t | getLeafCount () const |
Return the amount of existing leafs in the octree. | |
unsigned int | getTreeDepth () const |
Get the maximum depth of the octree. | |
LeafNodeIterator | leaf_begin (unsigned int max_depth_arg=0) |
const LeafNodeIterator | leaf_end () |
OctreeBase () | |
Empty constructor. | |
OctreeBase (const OctreeBase &source) | |
Copy constructor. | |
OctreeBase & | operator= (const OctreeBase &source) |
Copy operator. | |
void | removeLeaf (unsigned int idx_x_arg, unsigned int idx_y_arg, unsigned int idx_z_arg) |
Remove leaf node at (idx_x_arg, idx_y_arg, idx_z_arg). | |
void | serializeLeafs (std::vector< LeafContainerT * > &leaf_container_vector_arg) |
Outputs a vector of all LeafContainerT elements that are stored within the octree leaf nodes. | |
void | serializeTree (std::vector< char > &binary_tree_out_arg) |
Serialize octree into a binary output vector describing its branch node structure. | |
void | serializeTree (std::vector< char > &binary_tree_out_arg, std::vector< LeafContainerT * > &leaf_container_vector_arg) |
Serialize octree into a binary output vector describing its branch node structure and push all LeafContainerT elements stored in the octree to a vector. | |
void | setMaxVoxelIndex (unsigned int max_voxel_index_arg) |
Set the maximum amount of voxels per dimension. | |
void | setTreeDepth (unsigned int max_depth_arg) |
Set the maximum depth of the octree. | |
virtual | ~OctreeBase () |
Empty deconstructor. | |
Protected Member Functions | |
bool | branchHasChild (const BranchNode &branch_arg, unsigned char child_idx_arg) const |
Check if branch is pointing to a particular child node. | |
BranchNode * | createBranchChild (BranchNode &branch_arg, unsigned char child_idx_arg) |
Create and add a new branch child to a branch class. | |
LeafContainerT * | createLeaf (const OctreeKey &key_arg) |
Create a leaf node. | |
LeafNode * | createLeafChild (BranchNode &branch_arg, unsigned char child_idx_arg) |
Create and add a new leaf child to a branch class. | |
unsigned int | createLeafRecursive (const OctreeKey &key_arg, unsigned int depth_mask_arg, BranchNode *branch_arg, LeafNode *&return_leaf_arg, BranchNode *&parent_of_leaf_arg) |
Create a leaf node at octree key. If leaf node does already exist, it is returned. | |
void | deleteBranch (BranchNode &branch_arg) |
Delete branch and all its subchilds from octree. | |
void | deleteBranchChild (BranchNode &branch_arg, unsigned char child_idx_arg) |
Delete child node and all its subchilds from octree. | |
bool | deleteLeafRecursive (const OctreeKey &key_arg, unsigned int depth_mask_arg, BranchNode *branch_arg) |
Recursively search and delete leaf node. | |
virtual void | deserializeTreeCallback (LeafContainerT &, const OctreeKey &) |
Callback executed for every leaf node during deserialization. | |
void | deserializeTreeRecursive (BranchNode *branch_arg, unsigned int depth_mask_arg, OctreeKey &key_arg, typename std::vector< char >::const_iterator &binary_tree_input_it_arg, typename std::vector< char >::const_iterator &binary_tree_input_it_end_arg, typename std::vector< LeafContainerT * >::const_iterator *leaf_container_vector_it_arg, typename std::vector< LeafContainerT * >::const_iterator *leaf_container_vector_it_end_arg) |
Recursive method for deserializing octree structure. | |
bool | existLeaf (const OctreeKey &key_arg) const |
Check for existance of a leaf node in the octree. | |
LeafContainerT * | findLeaf (const OctreeKey &key_arg) const |
Find leaf node. | |
void | findLeafRecursive (const OctreeKey &key_arg, unsigned int depth_mask_arg, BranchNode *branch_arg, LeafContainerT *&result_arg) const |
Recursively search for a given leaf node and return a pointer. | |
char | getBranchBitPattern (const BranchNode &branch_arg) const |
Generate bit pattern reflecting the existence of child node pointers. | |
OctreeNode * | getBranchChildPtr (const BranchNode &branch_arg, unsigned char child_idx_arg) const |
Retrieve a child node pointer for child node at child_idx. | |
OctreeNode * | getRootNode () const |
Retrieve root node. | |
double | Log2 (double n_arg) |
Helper function to calculate the binary logarithm. | |
bool | octreeCanResize () |
Test if octree is able to dynamically change its depth. This is required for adaptive bounding box adjustment. | |
void | removeLeaf (const OctreeKey &key_arg) |
Remove leaf node from octree. | |
virtual void | serializeTreeCallback (LeafContainerT &, const OctreeKey &) const |
Callback executed for every leaf node during serialization. | |
void | serializeTreeRecursive (const BranchNode *branch_arg, OctreeKey &key_arg, std::vector< char > *binary_tree_out_arg, typename std::vector< LeafContainerT * > *leaf_container_vector_arg) const |
Recursively explore the octree and output binary octree description together with a vector of leaf node LeafContainerTs. | |
void | setBranchChildPtr (BranchNode &branch_arg, unsigned char child_idx_arg, OctreeNode *new_child_arg) |
Assign new child node to branch. | |
Protected Attributes | |
std::size_t | branch_count_ |
Amount of branch nodes. | |
unsigned int | depth_mask_ |
Depth mask based on octree depth. | |
bool | dynamic_depth_enabled_ |
Enable dynamic_depth. | |
std::size_t | leaf_count_ |
Amount of leaf nodes. | |
OctreeKey | max_key_ |
key range | |
unsigned int | octree_depth_ |
Octree depth. | |
BranchNode * | root_node_ |
Pointer to root branch node of octree. | |
Friends | |
class | OctreeBreadthFirstIterator< OctreeT > |
class | OctreeDepthFirstIterator< OctreeT > |
class | OctreeIteratorBase< OctreeT > |
class | OctreeLeafNodeIterator< OctreeT > |
Octree class.
Definition at line 63 of file octree/include/pcl/octree/octree_base.h.
typedef BranchContainerT pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::BranchContainer |
Definition at line 73 of file octree/include/pcl/octree/octree_base.h.
typedef OctreeBranchNode<BranchContainerT> pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::BranchNode |
Reimplemented in pcl::octree::OctreePointCloudVoxelCentroid< PointT, LeafContainerT, BranchContainerT >, pcl::octree::OctreePointCloudVoxelCentroid< pcl::PointXYZ >, pcl::octree::OctreePointCloudAdjacency< PointT, LeafContainerT, BranchContainerT >, pcl::octree::OctreePointCloud< PointT, LeafContainerT, BranchContainerT >, pcl::octree::OctreePointCloud< PointT, LeafContainerT, BranchContainerT, OctreeBase< LeafContainerT, BranchContainerT > >, pcl::octree::OctreePointCloud< pcl::PointXYZ, OctreePointCloudVoxelCentroidContainer< pcl::PointXYZ >, OctreeContainerEmpty >, and pcl::octree::OctreePointCloudSearch< PointT, LeafContainerT, BranchContainerT >.
Definition at line 70 of file octree/include/pcl/octree/octree_base.h.
typedef OctreeBreadthFirstIterator<OctreeT> pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::BreadthFirstIterator |
Reimplemented in pcl::octree::OctreePointCloud< PointT, LeafContainerT, BranchContainerT >, pcl::octree::OctreePointCloud< PointT, LeafContainerT, BranchContainerT, OctreeBase< LeafContainerT, BranchContainerT > >, and pcl::octree::OctreePointCloud< pcl::PointXYZ, OctreePointCloudVoxelCentroidContainer< pcl::PointXYZ >, OctreeContainerEmpty >.
Definition at line 98 of file octree/include/pcl/octree/octree_base.h.
typedef const OctreeBreadthFirstIterator<OctreeT> pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::ConstBreadthFirstIterator |
Reimplemented in pcl::octree::OctreePointCloud< PointT, LeafContainerT, BranchContainerT >, pcl::octree::OctreePointCloud< PointT, LeafContainerT, BranchContainerT, OctreeBase< LeafContainerT, BranchContainerT > >, and pcl::octree::OctreePointCloud< pcl::PointXYZ, OctreePointCloudVoxelCentroidContainer< pcl::PointXYZ >, OctreeContainerEmpty >.
Definition at line 102 of file octree/include/pcl/octree/octree_base.h.
typedef const OctreeDepthFirstIterator<OctreeT> pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::ConstDepthFirstIterator |
Reimplemented in pcl::octree::OctreePointCloud< PointT, LeafContainerT, BranchContainerT >, pcl::octree::OctreePointCloud< PointT, LeafContainerT, BranchContainerT, OctreeBase< LeafContainerT, BranchContainerT > >, and pcl::octree::OctreePointCloud< pcl::PointXYZ, OctreePointCloudVoxelCentroidContainer< pcl::PointXYZ >, OctreeContainerEmpty >.
Definition at line 96 of file octree/include/pcl/octree/octree_base.h.
typedef const OctreeDepthFirstIterator<OctreeT> pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::ConstIterator |
Reimplemented in pcl::octree::OctreePointCloudAdjacency< PointT, LeafContainerT, BranchContainerT >, pcl::octree::OctreePointCloud< PointT, LeafContainerT, BranchContainerT >, pcl::octree::OctreePointCloud< PointT, LeafContainerT, BranchContainerT, OctreeBase< LeafContainerT, BranchContainerT > >, and pcl::octree::OctreePointCloud< pcl::PointXYZ, OctreePointCloudVoxelCentroidContainer< pcl::PointXYZ >, OctreeContainerEmpty >.
Definition at line 84 of file octree/include/pcl/octree/octree_base.h.
typedef const OctreeLeafNodeIterator<OctreeT> pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::ConstLeafNodeIterator |
Reimplemented in pcl::octree::OctreePointCloudAdjacency< PointT, LeafContainerT, BranchContainerT >, pcl::octree::OctreePointCloud< PointT, LeafContainerT, BranchContainerT >, pcl::octree::OctreePointCloud< PointT, LeafContainerT, BranchContainerT, OctreeBase< LeafContainerT, BranchContainerT > >, and pcl::octree::OctreePointCloud< pcl::PointXYZ, OctreePointCloudVoxelCentroidContainer< pcl::PointXYZ >, OctreeContainerEmpty >.
Definition at line 90 of file octree/include/pcl/octree/octree_base.h.
typedef OctreeDepthFirstIterator<OctreeT> pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::DepthFirstIterator |
Reimplemented in pcl::octree::OctreePointCloud< PointT, LeafContainerT, BranchContainerT >, pcl::octree::OctreePointCloud< PointT, LeafContainerT, BranchContainerT, OctreeBase< LeafContainerT, BranchContainerT > >, and pcl::octree::OctreePointCloud< pcl::PointXYZ, OctreePointCloudVoxelCentroidContainer< pcl::PointXYZ >, OctreeContainerEmpty >.
Definition at line 92 of file octree/include/pcl/octree/octree_base.h.
typedef OctreeDepthFirstIterator<OctreeT> pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::Iterator |
Reimplemented in pcl::octree::OctreePointCloudAdjacency< PointT, LeafContainerT, BranchContainerT >, pcl::octree::OctreePointCloud< PointT, LeafContainerT, BranchContainerT >, pcl::octree::OctreePointCloud< PointT, LeafContainerT, BranchContainerT, OctreeBase< LeafContainerT, BranchContainerT > >, and pcl::octree::OctreePointCloud< pcl::PointXYZ, OctreePointCloudVoxelCentroidContainer< pcl::PointXYZ >, OctreeContainerEmpty >.
Definition at line 83 of file octree/include/pcl/octree/octree_base.h.
typedef LeafContainerT pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::LeafContainer |
Definition at line 74 of file octree/include/pcl/octree/octree_base.h.
typedef OctreeLeafNode<LeafContainerT> pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::LeafNode |
Reimplemented in pcl::octree::OctreePointCloudVoxelCentroid< PointT, LeafContainerT, BranchContainerT >, pcl::octree::OctreePointCloudVoxelCentroid< pcl::PointXYZ >, pcl::octree::OctreePointCloudAdjacency< PointT, LeafContainerT, BranchContainerT >, pcl::octree::OctreePointCloud< PointT, LeafContainerT, BranchContainerT >, pcl::octree::OctreePointCloud< PointT, LeafContainerT, BranchContainerT, OctreeBase< LeafContainerT, BranchContainerT > >, pcl::octree::OctreePointCloud< pcl::PointXYZ, OctreePointCloudVoxelCentroidContainer< pcl::PointXYZ >, OctreeContainerEmpty >, and pcl::octree::OctreePointCloudSearch< PointT, LeafContainerT, BranchContainerT >.
Definition at line 71 of file octree/include/pcl/octree/octree_base.h.
typedef OctreeLeafNodeIterator<OctreeT> pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::LeafNodeIterator |
Reimplemented in pcl::octree::OctreePointCloudAdjacency< PointT, LeafContainerT, BranchContainerT >, pcl::octree::OctreePointCloud< PointT, LeafContainerT, BranchContainerT >, pcl::octree::OctreePointCloud< PointT, LeafContainerT, BranchContainerT, OctreeBase< LeafContainerT, BranchContainerT > >, and pcl::octree::OctreePointCloud< pcl::PointXYZ, OctreePointCloudVoxelCentroidContainer< pcl::PointXYZ >, OctreeContainerEmpty >.
Definition at line 86 of file octree/include/pcl/octree/octree_base.h.
typedef OctreeBase<LeafContainerT, BranchContainerT> pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::OctreeT |
Reimplemented in pcl::octree::OctreePointCloudVoxelCentroid< PointT, LeafContainerT, BranchContainerT >, pcl::octree::OctreePointCloudVoxelCentroid< pcl::PointXYZ >, and pcl::octree::OctreePointCloudSearch< PointT, LeafContainerT, BranchContainerT >.
Definition at line 68 of file octree/include/pcl/octree/octree_base.h.
pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::OctreeBase | ( | ) |
Empty constructor.
Definition at line 54 of file octree/include/pcl/octree/impl/octree_base.hpp.
pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::~OctreeBase | ( | ) | [virtual] |
Empty deconstructor.
Definition at line 67 of file octree/include/pcl/octree/impl/octree_base.hpp.
pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::OctreeBase | ( | const OctreeBase< LeafContainerT, BranchContainerT > & | source | ) | [inline] |
Copy constructor.
Definition at line 115 of file octree/include/pcl/octree/octree_base.h.
Iterator pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::begin | ( | unsigned int | max_depth_arg = 0 | ) | [inline] |
Definition at line 85 of file octree/include/pcl/octree/octree_base.h.
bool pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::branchHasChild | ( | const BranchNode & | branch_arg, |
unsigned char | child_idx_arg | ||
) | const [inline, protected] |
Check if branch is pointing to a particular child node.
branch_arg,: | reference to octree branch class |
child_idx_arg,: | index to child node |
Definition at line 325 of file octree/include/pcl/octree/octree_base.h.
BreadthFirstIterator pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::breadth_begin | ( | unsigned int | max_depth_arg = 0 | ) | [inline] |
Definition at line 103 of file octree/include/pcl/octree/octree_base.h.
const BreadthFirstIterator pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::breadth_end | ( | ) | [inline] |
Definition at line 104 of file octree/include/pcl/octree/octree_base.h.
BranchNode* pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::createBranchChild | ( | BranchNode & | branch_arg, |
unsigned char | child_idx_arg | ||
) | [inline, protected] |
Create and add a new branch child to a branch class.
branch_arg,: | reference to octree branch class |
child_idx_arg,: | index to child node |
Definition at line 431 of file octree/include/pcl/octree/octree_base.h.
LeafContainerT * pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::createLeaf | ( | unsigned int | idx_x_arg, |
unsigned int | idx_y_arg, | ||
unsigned int | idx_z_arg | ||
) |
Create new leaf node at (idx_x_arg, idx_y_arg, idx_z_arg).
idx_x_arg,: | index of leaf node in the X axis. |
idx_y_arg,: | index of leaf node in the Y axis. |
idx_z_arg,: | index of leaf node in the Z axis. |
Definition at line 124 of file octree/include/pcl/octree/impl/octree_base.hpp.
LeafContainerT* pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::createLeaf | ( | const OctreeKey & | key_arg | ) | [inline, protected] |
Create a leaf node.
key_arg,: | octree key addressing a leaf node. |
Definition at line 263 of file octree/include/pcl/octree/octree_base.h.
LeafNode* pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::createLeafChild | ( | BranchNode & | branch_arg, |
unsigned char | child_idx_arg | ||
) | [inline, protected] |
Create and add a new leaf child to a branch class.
branch_arg,: | reference to octree branch class |
child_idx_arg,: | index to child node |
Definition at line 446 of file octree/include/pcl/octree/octree_base.h.
unsigned int pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::createLeafRecursive | ( | const OctreeKey & | key_arg, |
unsigned int | depth_mask_arg, | ||
BranchNode * | branch_arg, | ||
LeafNode *& | return_leaf_arg, | ||
BranchNode *& | parent_of_leaf_arg | ||
) | [protected] |
Create a leaf node at octree key. If leaf node does already exist, it is returned.
key_arg,: | reference to an octree key |
depth_mask_arg,: | depth mask used for octree key analysis and for branch depth indicator |
branch_arg,: | current branch node |
return_leaf_arg,: | return pointer to leaf node |
parent_of_leaf_arg,: | return pointer to parent of leaf node |
Definition at line 286 of file octree/include/pcl/octree/impl/octree_base.hpp.
void pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::deleteBranch | ( | BranchNode & | branch_arg | ) | [inline, protected] |
Delete branch and all its subchilds from octree.
branch_arg,: | reference to octree branch class |
Definition at line 417 of file octree/include/pcl/octree/octree_base.h.
void pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::deleteBranchChild | ( | BranchNode & | branch_arg, |
unsigned char | child_idx_arg | ||
) | [inline, protected] |
Delete child node and all its subchilds from octree.
branch_arg,: | reference to octree branch class |
child_idx_arg,: | index to child node |
Definition at line 381 of file octree/include/pcl/octree/octree_base.h.
bool pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::deleteLeafRecursive | ( | const OctreeKey & | key_arg, |
unsigned int | depth_mask_arg, | ||
BranchNode * | branch_arg | ||
) | [protected] |
Recursively search and delete leaf node.
key_arg,: | reference to an octree key |
depth_mask_arg,: | depth mask used for octree key analysis and branch depth indicator |
branch_arg,: | current branch node |
Definition at line 386 of file octree/include/pcl/octree/impl/octree_base.hpp.
void pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::deleteTree | ( | ) |
Delete the octree structure and its leaf nodes.
Reimplemented in pcl::octree::OctreePointCloud< PointT, LeafContainerT, BranchContainerT >, pcl::octree::OctreePointCloud< PointT, LeafContainerT, BranchContainerT, OctreeBase< LeafContainerT, BranchContainerT > >, and pcl::octree::OctreePointCloud< pcl::PointXYZ, OctreePointCloudVoxelCentroidContainer< pcl::PointXYZ >, OctreeContainerEmpty >.
Definition at line 166 of file octree/include/pcl/octree/impl/octree_base.hpp.
DepthFirstIterator pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::depth_begin | ( | unsigned int | max_depth_arg = 0 | ) | [inline] |
Reimplemented in pcl::octree::OctreePointCloudAdjacency< PointT, LeafContainerT, BranchContainerT >.
Definition at line 97 of file octree/include/pcl/octree/octree_base.h.
const DepthFirstIterator pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::depth_end | ( | ) | [inline] |
Reimplemented in pcl::octree::OctreePointCloudAdjacency< PointT, LeafContainerT, BranchContainerT >.
Definition at line 98 of file octree/include/pcl/octree/octree_base.h.
void pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::deserializeTree | ( | std::vector< char > & | binary_tree_input_arg | ) |
Deserialize a binary octree description vector and create a corresponding octree structure. Leaf nodes are initialized with getDataTByKey(..).
binary_tree_input_arg,: | reference to input vector for reading binary tree structure. |
Definition at line 231 of file octree/include/pcl/octree/impl/octree_base.hpp.
void pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::deserializeTree | ( | std::vector< char > & | binary_tree_input_arg, |
std::vector< LeafContainerT * > & | leaf_container_vector_arg | ||
) |
Deserialize a binary octree description and create a corresponding octree structure. Leaf nodes are initialized with LeafContainerT elements from the dataVector.
binary_tree_input_arg,: | reference to input vector for reading binary tree structure. |
leaf_container_vector_arg,: | pointer to container vector. |
Definition at line 255 of file octree/include/pcl/octree/impl/octree_base.hpp.
virtual void pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::deserializeTreeCallback | ( | LeafContainerT & | , |
const OctreeKey & | |||
) | [inline, protected, virtual] |
Callback executed for every leaf node during deserialization.
Definition at line 541 of file octree/include/pcl/octree/octree_base.h.
void pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::deserializeTreeRecursive | ( | BranchNode * | branch_arg, |
unsigned int | depth_mask_arg, | ||
OctreeKey & | key_arg, | ||
typename std::vector< char >::const_iterator & | binary_tree_input_it_arg, | ||
typename std::vector< char >::const_iterator & | binary_tree_input_it_end_arg, | ||
typename std::vector< LeafContainerT * >::const_iterator * | leaf_container_vector_it_arg, | ||
typename std::vector< LeafContainerT * >::const_iterator * | leaf_container_vector_it_end_arg | ||
) | [protected] |
Recursive method for deserializing octree structure.
branch_arg,: | current branch node |
depth_mask_arg,: | depth mask used for octree key analysis and branch depth indicator |
key_arg,: | reference to an octree key |
binary_tree_input_it_arg,: | iterator to binary input vector |
binary_tree_input_it_end_arg,: | end iterator of binary input vector |
leaf_container_vector_it_arg,: | iterator pointing to current LeafContainerT object to be added to a leaf node |
leaf_container_vector_it_end_arg,: | iterator pointing to last object in LeafContainerT input vector. |
Definition at line 505 of file octree/include/pcl/octree/impl/octree_base.hpp.
const Iterator pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::end | ( | ) | [inline] |
Reimplemented in pcl::octree::OctreePointCloudAdjacency< PointT, LeafContainerT, BranchContainerT >.
Definition at line 86 of file octree/include/pcl/octree/octree_base.h.
bool pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::existLeaf | ( | unsigned int | idx_x_arg, |
unsigned int | idx_y_arg, | ||
unsigned int | idx_z_arg | ||
) | const |
idx_x_arg for the existence of leaf node at (idx_x_arg, idx_y_arg, idx_z_arg).
idx_x_arg,: | index of leaf node in the X axis. |
idx_y_arg,: | index of leaf node in the Y axis. |
idx_z_arg,: | index of leaf node in the Z axis. |
Definition at line 138 of file octree/include/pcl/octree/impl/octree_base.hpp.
bool pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::existLeaf | ( | const OctreeKey & | key_arg | ) | const [inline, protected] |
Check for existance of a leaf node in the octree.
key_arg,: | octree key addressing a leaf node. |
Definition at line 293 of file octree/include/pcl/octree/octree_base.h.
LeafContainerT * pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::findLeaf | ( | unsigned int | idx_x_arg, |
unsigned int | idx_y_arg, | ||
unsigned int | idx_z_arg | ||
) |
Find leaf node at (idx_x_arg, idx_y_arg, idx_z_arg).
idx_x_arg,: | index of leaf node in the X axis. |
idx_y_arg,: | index of leaf node in the Y axis. |
idx_z_arg,: | index of leaf node in the Z axis. |
Definition at line 110 of file octree/include/pcl/octree/impl/octree_base.hpp.
LeafContainerT* pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::findLeaf | ( | const OctreeKey & | key_arg | ) | const [inline, protected] |
Find leaf node.
key_arg,: | octree key addressing a leaf node. |
Definition at line 281 of file octree/include/pcl/octree/octree_base.h.
void pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::findLeafRecursive | ( | const OctreeKey & | key_arg, |
unsigned int | depth_mask_arg, | ||
BranchNode * | branch_arg, | ||
LeafContainerT *& | result_arg | ||
) | const [protected] |
Recursively search for a given leaf node and return a pointer.
key_arg,: | reference to an octree key |
depth_mask_arg,: | depth mask used for octree key analysis and for branch depth indicator |
branch_arg,: | current branch node |
result_arg,: | pointer to leaf node class |
Definition at line 347 of file octree/include/pcl/octree/impl/octree_base.hpp.
char pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::getBranchBitPattern | ( | const BranchNode & | branch_arg | ) | const [inline, protected] |
Generate bit pattern reflecting the existence of child node pointers.
branch_arg,: | reference to octree branch class |
Definition at line 361 of file octree/include/pcl/octree/octree_base.h.
OctreeNode* pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::getBranchChildPtr | ( | const BranchNode & | branch_arg, |
unsigned char | child_idx_arg | ||
) | const [inline, protected] |
Retrieve a child node pointer for child node at child_idx.
branch_arg,: | reference to octree branch class |
child_idx_arg,: | index to child node |
Definition at line 338 of file octree/include/pcl/octree/octree_base.h.
std::size_t pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::getBranchCount | ( | ) | const [inline] |
Return the amount of existing branch nodes in the octree.
Definition at line 210 of file octree/include/pcl/octree/octree_base.h.
std::size_t pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::getLeafCount | ( | ) | const [inline] |
Return the amount of existing leafs in the octree.
Definition at line 201 of file octree/include/pcl/octree/octree_base.h.
OctreeNode* pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::getRootNode | ( | ) | const [inline, protected] |
Retrieve root node.
Definition at line 314 of file octree/include/pcl/octree/octree_base.h.
unsigned int pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::getTreeDepth | ( | ) | const [inline] |
Get the maximum depth of the octree.
Reimplemented in pcl::octree::OctreePointCloud< PointT, LeafContainerT, BranchContainerT >, pcl::octree::OctreePointCloud< PointT, LeafContainerT, BranchContainerT, OctreeBase< LeafContainerT, BranchContainerT > >, and pcl::octree::OctreePointCloud< pcl::PointXYZ, OctreePointCloudVoxelCentroidContainer< pcl::PointXYZ >, OctreeContainerEmpty >.
Definition at line 155 of file octree/include/pcl/octree/octree_base.h.
LeafNodeIterator pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::leaf_begin | ( | unsigned int | max_depth_arg = 0 | ) | [inline] |
Reimplemented in pcl::octree::OctreePointCloudAdjacency< PointT, LeafContainerT, BranchContainerT >.
Definition at line 91 of file octree/include/pcl/octree/octree_base.h.
const LeafNodeIterator pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::leaf_end | ( | ) | [inline] |
Reimplemented in pcl::octree::OctreePointCloudAdjacency< PointT, LeafContainerT, BranchContainerT >.
Definition at line 92 of file octree/include/pcl/octree/octree_base.h.
double pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::Log2 | ( | double | n_arg | ) | [inline, protected] |
Helper function to calculate the binary logarithm.
n_arg,: | some value |
Definition at line 555 of file octree/include/pcl/octree/octree_base.h.
bool pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::octreeCanResize | ( | ) | [inline, protected] |
Test if octree is able to dynamically change its depth. This is required for adaptive bounding box adjustment.
Definition at line 564 of file octree/include/pcl/octree/octree_base.h.
OctreeBase& pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::operator= | ( | const OctreeBase< LeafContainerT, BranchContainerT > & | source | ) | [inline] |
Copy operator.
Definition at line 128 of file octree/include/pcl/octree/octree_base.h.
void pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::removeLeaf | ( | unsigned int | idx_x_arg, |
unsigned int | idx_y_arg, | ||
unsigned int | idx_z_arg | ||
) |
Remove leaf node at (idx_x_arg, idx_y_arg, idx_z_arg).
idx_x_arg,: | index of leaf node in the X axis. |
idx_y_arg,: | index of leaf node in the Y axis. |
idx_z_arg,: | index of leaf node in the Z axis. |
Definition at line 152 of file octree/include/pcl/octree/impl/octree_base.hpp.
void pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::removeLeaf | ( | const OctreeKey & | key_arg | ) | [inline, protected] |
Remove leaf node from octree.
key_arg,: | octree key addressing a leaf node. |
Definition at line 302 of file octree/include/pcl/octree/octree_base.h.
void pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::serializeLeafs | ( | std::vector< LeafContainerT * > & | leaf_container_vector_arg | ) |
Outputs a vector of all LeafContainerT elements that are stored within the octree leaf nodes.
leaf_container_vector_arg,: | pointers to LeafContainerT vector that receives a copy of all LeafContainerT objects in the octree. |
Definition at line 216 of file octree/include/pcl/octree/impl/octree_base.hpp.
void pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::serializeTree | ( | std::vector< char > & | binary_tree_out_arg | ) |
Serialize octree into a binary output vector describing its branch node structure.
binary_tree_out_arg,: | reference to output vector for writing binary tree structure. |
Definition at line 182 of file octree/include/pcl/octree/impl/octree_base.hpp.
void pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::serializeTree | ( | std::vector< char > & | binary_tree_out_arg, |
std::vector< LeafContainerT * > & | leaf_container_vector_arg | ||
) |
Serialize octree into a binary output vector describing its branch node structure and push all LeafContainerT elements stored in the octree to a vector.
binary_tree_out_arg,: | reference to output vector for writing binary tree structure. |
leaf_container_vector_arg,: | pointer to all LeafContainerT objects in the octree |
Definition at line 197 of file octree/include/pcl/octree/impl/octree_base.hpp.
virtual void pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::serializeTreeCallback | ( | LeafContainerT & | , |
const OctreeKey & | |||
) | const [inline, protected, virtual] |
Callback executed for every leaf node during serialization.
Definition at line 533 of file octree/include/pcl/octree/octree_base.h.
void pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::serializeTreeRecursive | ( | const BranchNode * | branch_arg, |
OctreeKey & | key_arg, | ||
std::vector< char > * | binary_tree_out_arg, | ||
typename std::vector< LeafContainerT * > * | leaf_container_vector_arg | ||
) | const [protected] |
Recursively explore the octree and output binary octree description together with a vector of leaf node LeafContainerTs.
branch_arg,: | current branch node |
key_arg,: | reference to an octree key |
binary_tree_out_arg,: | binary output vector |
leaf_container_vector_arg,: | writes LeafContainerT pointers to this LeafContainerT* vector. |
Definition at line 443 of file octree/include/pcl/octree/impl/octree_base.hpp.
void pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::setBranchChildPtr | ( | BranchNode & | branch_arg, |
unsigned char | child_idx_arg, | ||
OctreeNode * | new_child_arg | ||
) | [inline, protected] |
Assign new child node to branch.
branch_arg,: | reference to octree branch class |
child_idx_arg,: | index to child node |
new_child_arg,: | pointer to new child node |
Definition at line 349 of file octree/include/pcl/octree/octree_base.h.
void pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::setMaxVoxelIndex | ( | unsigned int | max_voxel_index_arg | ) |
Set the maximum amount of voxels per dimension.
[in] | max_voxel_index_arg | maximum amount of voxels per dimension |
Definition at line 77 of file octree/include/pcl/octree/impl/octree_base.hpp.
void pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::setTreeDepth | ( | unsigned int | max_depth_arg | ) |
Set the maximum depth of the octree.
max_depth_arg,: | maximum depth of octree |
Definition at line 93 of file octree/include/pcl/octree/impl/octree_base.hpp.
friend class OctreeBreadthFirstIterator< OctreeT > [friend] |
Reimplemented in pcl::octree::OctreePointCloud< PointT, LeafContainerT, BranchContainerT >, pcl::octree::OctreePointCloud< PointT, LeafContainerT, BranchContainerT, OctreeBase< LeafContainerT, BranchContainerT > >, and pcl::octree::OctreePointCloud< pcl::PointXYZ, OctreePointCloudVoxelCentroidContainer< pcl::PointXYZ >, OctreeContainerEmpty >.
Definition at line 79 of file octree/include/pcl/octree/octree_base.h.
friend class OctreeDepthFirstIterator< OctreeT > [friend] |
Reimplemented in pcl::octree::OctreePointCloud< PointT, LeafContainerT, BranchContainerT >, pcl::octree::OctreePointCloud< PointT, LeafContainerT, BranchContainerT, OctreeBase< LeafContainerT, BranchContainerT > >, and pcl::octree::OctreePointCloud< pcl::PointXYZ, OctreePointCloudVoxelCentroidContainer< pcl::PointXYZ >, OctreeContainerEmpty >.
Definition at line 78 of file octree/include/pcl/octree/octree_base.h.
friend class OctreeIteratorBase< OctreeT > [friend] |
Reimplemented in pcl::octree::OctreePointCloud< PointT, LeafContainerT, BranchContainerT >, pcl::octree::OctreePointCloud< PointT, LeafContainerT, BranchContainerT, OctreeBase< LeafContainerT, BranchContainerT > >, and pcl::octree::OctreePointCloud< pcl::PointXYZ, OctreePointCloudVoxelCentroidContainer< pcl::PointXYZ >, OctreeContainerEmpty >.
Definition at line 77 of file octree/include/pcl/octree/octree_base.h.
friend class OctreeLeafNodeIterator< OctreeT > [friend] |
Reimplemented in pcl::octree::OctreePointCloud< PointT, LeafContainerT, BranchContainerT >, pcl::octree::OctreePointCloud< PointT, LeafContainerT, BranchContainerT, OctreeBase< LeafContainerT, BranchContainerT > >, and pcl::octree::OctreePointCloud< pcl::PointXYZ, OctreePointCloudVoxelCentroidContainer< pcl::PointXYZ >, OctreeContainerEmpty >.
Definition at line 80 of file octree/include/pcl/octree/octree_base.h.
std::size_t pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::branch_count_ [protected] |
Amount of branch nodes.
Definition at line 577 of file octree/include/pcl/octree/octree_base.h.
unsigned int pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::depth_mask_ [protected] |
Depth mask based on octree depth.
Definition at line 583 of file octree/include/pcl/octree/octree_base.h.
bool pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::dynamic_depth_enabled_ [protected] |
Enable dynamic_depth.
Definition at line 589 of file octree/include/pcl/octree/octree_base.h.
std::size_t pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::leaf_count_ [protected] |
Amount of leaf nodes.
Definition at line 574 of file octree/include/pcl/octree/octree_base.h.
OctreeKey pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::max_key_ [protected] |
key range
Definition at line 592 of file octree/include/pcl/octree/octree_base.h.
unsigned int pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::octree_depth_ [protected] |
Octree depth.
Definition at line 586 of file octree/include/pcl/octree/octree_base.h.
BranchNode* pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::root_node_ [protected] |
Pointer to root branch node of octree.
Definition at line 580 of file octree/include/pcl/octree/octree_base.h.