Loading...
Searching...
No Matches
pcl::octree::OctreeBase< LeafContainerT, BranchContainerT > Class Template Reference
Module octree

Octree class. More...

`#include <pcl/octree/octree_base.h>`

Inheritance diagram for pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >:

## Public Types

using | OctreeT = OctreeBase< LeafContainerT, BranchContainerT >
using | BranchNode = OctreeBranchNode< BranchContainerT >
using | LeafNode = OctreeLeafNode< LeafContainerT >
using | BranchContainer = BranchContainerT
using | LeafContainer = LeafContainerT
using | Iterator = OctreeDepthFirstIterator< OctreeT >
using | ConstIterator = OctreeDepthFirstIterator< const OctreeT >
using | LeafNodeIterator = OctreeLeafNodeDepthFirstIterator< OctreeT >
using | ConstLeafNodeIterator = OctreeLeafNodeDepthFirstIterator< const OctreeT >
using | LeafNodeDepthFirstIterator = OctreeLeafNodeDepthFirstIterator< OctreeT >
using | ConstLeafNodeDepthFirstIterator = OctreeLeafNodeDepthFirstIterator< const OctreeT >
using | DepthFirstIterator = OctreeDepthFirstIterator< OctreeT >
using | ConstDepthFirstIterator = OctreeDepthFirstIterator< const OctreeT >
using | BreadthFirstIterator = OctreeBreadthFirstIterator< OctreeT >
using | ConstBreadthFirstIterator = OctreeBreadthFirstIterator< const OctreeT >
using | FixedDepthIterator = OctreeFixedDepthIterator< OctreeT >
using | ConstFixedDepthIterator = OctreeFixedDepthIterator< const OctreeT >
using | LeafNodeBreadthFirstIterator = OctreeLeafNodeBreadthFirstIterator< OctreeT >
using | ConstLeafNodeBreadthFirstIterator = OctreeLeafNodeBreadthFirstIterator< const OctreeT >

## Public Member Functions

Iterator | begin (uindex_t max_depth_arg=0u)
ConstIterator | begin (uindex_t max_depth_arg=0u) const
ConstIterator | cbegin (uindex_t max_depth_arg=0u) const
const Iterator | end ()
const ConstIterator | end () const
const ConstIterator | cend () const
LeafNodeDepthFirstIterator | leaf_depth_begin (uindex_t max_depth_arg=0u)
ConstLeafNodeDepthFirstIterator | leaf_depth_begin (uindex_t max_depth_arg=0u) const
const LeafNodeDepthFirstIterator | leaf_depth_end ()
const ConstLeafNodeDepthFirstIterator | leaf_depth_end () const
DepthFirstIterator | depth_begin (uindex_t max_depth_arg=0u)
ConstDepthFirstIterator | depth_begin (uindex_t max_depth_arg=0u) const
const DepthFirstIterator | depth_end ()
const ConstDepthFirstIterator | depth_end () const
BreadthFirstIterator | breadth_begin (uindex_t max_depth_arg=0u)
ConstBreadthFirstIterator | breadth_begin (uindex_t max_depth_arg=0u) const
const BreadthFirstIterator | breadth_end ()
const ConstBreadthFirstIterator | breadth_end () const
FixedDepthIterator | fixed_depth_begin (uindex_t fixed_depth_arg=0u)
ConstFixedDepthIterator | fixed_depth_begin (uindex_t fixed_depth_arg=0u) const
const FixedDepthIterator | fixed_depth_end ()
const ConstFixedDepthIterator | fixed_depth_end () const
LeafNodeBreadthFirstIterator | leaf_breadth_begin (uindex_t max_depth_arg=0u)
ConstLeafNodeBreadthFirstIterator | leaf_breadth_begin (uindex_t max_depth_arg=0u) const
const LeafNodeBreadthFirstIterator | leaf_breadth_end ()
const ConstLeafNodeBreadthFirstIterator | leaf_breadth_end () const
| OctreeBase ()
| Empty constructor.
virtual | ~OctreeBase ()
| Empty deconstructor.
| OctreeBase (const OctreeBase &source)
| Copy constructor.
OctreeBase & | operator= (const OctreeBase &source)
| Copy operator.
void | setMaxVoxelIndex (uindex_t max_voxel_index_arg)
| Set the maximum amount of voxels per dimension.
void | setTreeDepth (uindex_t max_depth_arg)
| Set the maximum depth of the octree.
uindex_t | getTreeDepth () const
| Get the maximum depth of the octree.
LeafContainerT * | createLeaf (uindex_t idx_x_arg, uindex_t idx_y_arg, uindex_t idx_z_arg)
| Create new leaf node at (idx_x_arg, idx_y_arg, idx_z_arg).
LeafContainerT * | findLeaf (uindex_t idx_x_arg, uindex_t idx_y_arg, uindex_t idx_z_arg) const
| Find leaf node at (idx_x_arg, idx_y_arg, idx_z_arg).
bool | existLeaf (uindex_t idx_x_arg, uindex_t idx_y_arg, uindex_t idx_z_arg) const
| idx_x_arg for the existence of leaf node at (idx_x_arg, idx_y_arg, idx_z_arg).
void | removeLeaf (uindex_t idx_x_arg, uindex_t idx_y_arg, uindex_t idx_z_arg)
| Remove leaf node at (idx_x_arg, idx_y_arg, idx_z_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 branch nodes in the octree.
void | deleteTree ()
| Delete the octree structure and its leaf nodes.
void | serializeTree (std::vector< char > &binary_tree_out_arg) const
| 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) const
| 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 | serializeLeafs (std::vector< LeafContainerT * > &leaf_container_vector_arg)
| Outputs a vector of all LeafContainerT elements that are stored within the octree leaf nodes.
void | deserializeTree (std::vector< char > &binary_tree_input_arg)
| Deserialize a binary octree description vector and create a corresponding octree structure.
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.

## Protected Member Functions

LeafContainerT * | createLeaf (const OctreeKey &key_arg)
| Create a leaf node.
LeafContainerT * | findLeaf (const OctreeKey &key_arg) const
| Find leaf node.
bool | existLeaf (const OctreeKey &key_arg) const
| Check for existence of a leaf node in the octree.
void | removeLeaf (const OctreeKey &key_arg)
| Remove leaf node from octree.
OctreeNode * | getRootNode () const
| Retrieve root node.
bool | branchHasChild (const BranchNode &branch_arg, unsigned char child_idx_arg) const
| Check if branch is pointing to a particular child node.
OctreeNode * | getBranchChildPtr (const BranchNode &branch_arg, unsigned char child_idx_arg) const
| Retrieve a child node pointer for child node at child_idx.
void | setBranchChildPtr (BranchNode &branch_arg, unsigned char child_idx_arg, OctreeNode *new_child_arg)
| Assign new child node to branch.
char | getBranchBitPattern (const BranchNode &branch_arg) const
| Generate bit pattern reflecting the existence of child node pointers.
void | deleteBranchChild (BranchNode &branch_arg, unsigned char child_idx_arg)
| Delete child node and all its subchilds from octree.
void | deleteBranch (BranchNode &branch_arg)
| Delete branch and all its subchilds from octree.
BranchNode * | createBranchChild (BranchNode &branch_arg, unsigned char child_idx_arg)
| Create and add a new branch child to a branch class.
LeafNode * | createLeafChild (BranchNode &branch_arg, unsigned char child_idx_arg)
| Create and add a new leaf child to a branch class.
uindex_t | createLeafRecursive (const OctreeKey &key_arg, uindex_t depth_mask_arg, BranchNode *branch_arg, LeafNode *&return_leaf_arg, BranchNode *&parent_of_leaf_arg)
| Create a leaf node at octree key.
void | findLeafRecursive (const OctreeKey &key_arg, uindex_t depth_mask_arg, BranchNode *branch_arg, LeafContainerT *&result_arg) const
| Recursively search for a given leaf node and return a pointer.
bool | deleteLeafRecursive (const OctreeKey &key_arg, uindex_t depth_mask_arg, BranchNode *branch_arg)
| Recursively search and delete leaf node.
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

deserializeTreeRecursive (BranchNode *branch_arg, uindex_t 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.
virtual void | serializeTreeCallback (LeafContainerT &, const OctreeKey &) const
| Callback executed for every leaf node during serialization.
virtual void | deserializeTreeCallback (LeafContainerT &, const OctreeKey &)
| Callback executed for every leaf node during deserialization.
bool | octreeCanResize () const
| Test if octree is able to dynamically change its depth.

## Protected Attributes

std::size_t | leaf_count_ {0}
| Amount of leaf nodes
std::size_t | branch_count_ {1}
| Amount of branch nodes
BranchNode * | root_node_
| Pointer to root branch node of octree
uindex_t | depth_mask_ {0}
| Depth mask based on octree depth
uindex_t | octree_depth_ {0}
| Octree depth.
bool | dynamic_depth_enabled_ {false}
| Enable dynamic_depth.
OctreeKey | max_key_
| key range

## Friends

class | OctreeIteratorBase< OctreeT >
class | OctreeDepthFirstIterator< OctreeT >
class | OctreeBreadthFirstIterator< OctreeT >
class | OctreeFixedDepthIterator< OctreeT >
class | OctreeLeafNodeDepthFirstIterator< OctreeT >
class | OctreeLeafNodeBreadthFirstIterator< OctreeT >
class | OctreeIteratorBase< const OctreeT >
class | OctreeDepthFirstIterator< const OctreeT >
class | OctreeBreadthFirstIterator< const OctreeT >
class | OctreeFixedDepthIterator< const OctreeT >
class | OctreeLeafNodeDepthFirstIterator< const OctreeT >
class | OctreeLeafNodeBreadthFirstIterator< const OctreeT >

## Detailed Description

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>
class pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >

Octree class.

Note
  The tree depth defines the maximum amount of octree voxels / leaf nodes (should be initially defined).
  All leaf nodes are addressed by integer indices.
  The tree depth equates to the bit length of the voxel indices.

Author
  Julius Kammerl (juliu.nosp@m.s@ka.nosp@m.mmerl.nosp@m..de)

Definition at line 62 of file octree_base.h.

## Member Typedef Documentation

## BranchContainer

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

using pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::BranchContainer = BranchContainerT

Definition at line 69 of file octree_base.h.

## BranchNode

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

using pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::BranchNode = OctreeBranchNode<BranchContainerT>

Definition at line 66 of file octree_base.h.

## BreadthFirstIterator

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

using pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::BreadthFirstIterator = OctreeBreadthFirstIterator<OctreeT>

Definition at line 222 of file octree_base.h.

## ConstBreadthFirstIterator

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

using pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::ConstBreadthFirstIterator = OctreeBreadthFirstIterator<const OctreeT>

Definition at line 223 of file octree_base.h.

## ConstDepthFirstIterator

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

using pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::ConstDepthFirstIterator = OctreeDepthFirstIterator<const OctreeT>

Definition at line 193 of file octree_base.h.

## ConstFixedDepthIterator

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

using pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::ConstFixedDepthIterator = OctreeFixedDepthIterator<const OctreeT>

Definition at line 253 of file octree_base.h.

## ConstIterator

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

using pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::ConstIterator = OctreeDepthFirstIterator<const OctreeT>

Definition at line 115 of file octree_base.h.

## ConstLeafNodeBreadthFirstIterator

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

using pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::ConstLeafNodeBreadthFirstIterator = OctreeLeafNodeBreadthFirstIterator<const OctreeT>

Definition at line 281 of file octree_base.h.

## ConstLeafNodeDepthFirstIterator

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

using pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::ConstLeafNodeDepthFirstIterator = OctreeLeafNodeDepthFirstIterator<const OctreeT>

Definition at line 162 of file octree_base.h.

## ConstLeafNodeIterator

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

using pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::ConstLeafNodeIterator = OctreeLeafNodeDepthFirstIterator<const OctreeT>

Definition at line 158 of file octree_base.h.

## DepthFirstIterator

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

using pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::DepthFirstIterator = OctreeDepthFirstIterator<OctreeT>

Definition at line 192 of file octree_base.h.

## FixedDepthIterator

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

using pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::FixedDepthIterator = OctreeFixedDepthIterator<OctreeT>

Definition at line 252 of file octree_base.h.

## Iterator

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

using pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::Iterator = OctreeDepthFirstIterator<OctreeT>

Definition at line 114 of file octree_base.h.

## LeafContainer

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

using pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::LeafContainer = LeafContainerT

Definition at line 70 of file octree_base.h.

## LeafNode

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

using pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::LeafNode = OctreeLeafNode<LeafContainerT>

Definition at line 67 of file octree_base.h.

## LeafNodeBreadthFirstIterator

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

using pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::LeafNodeBreadthFirstIterator = OctreeLeafNodeBreadthFirstIterator<OctreeT>

Definition at line 280 of file octree_base.h.

## LeafNodeDepthFirstIterator

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

using pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::LeafNodeDepthFirstIterator = OctreeLeafNodeDepthFirstIterator<OctreeT>

Definition at line 161 of file octree_base.h.

## LeafNodeIterator

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

using pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::LeafNodeIterator = OctreeLeafNodeDepthFirstIterator<OctreeT>

Definition at line 157 of file octree_base.h.

## OctreeT

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

using pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::OctreeT = OctreeBase<LeafContainerT, BranchContainerT>

Definition at line 64 of file octree_base.h.

## Constructor & Destructor Documentation

## OctreeBase() [1/2]

template<typename LeafContainerT , typename BranchContainerT >

pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::OctreeBase | ( |  | ) |

Empty constructor.

Definition at line 48 of file octree_base.hpp.

## ~OctreeBase()

template<typename LeafContainerT , typename BranchContainerT >

pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::~OctreeBase | ( |  | ) |

virtual

Empty deconstructor.

Definition at line 54 of file octree_base.hpp.

## OctreeBase() [2/2]

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::OctreeBase | ( | const OctreeBase< LeafContainerT, BranchContainerT > & | source | ) |

inline

Copy constructor.

Definition at line 317 of file octree_base.h.

## Member Function Documentation

## begin() [1/2]

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

Iterator pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::begin | ( | uindex_t | max_depth_arg = `0u` | ) |

inline

Definition at line 118 of file octree_base.h.

References pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::octree_depth_.

## begin() [2/2]

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

ConstIterator pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::begin | ( | uindex_t | max_depth_arg = `0u` | ) | const

inline

Definition at line 124 of file octree_base.h.

References pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::octree_depth_.

## branchHasChild()

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

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.

Parameters

  branch_arg | reference to octree branch class
  child_idx_arg | index to child node

Returns
  "true" if pointer to child node exists; "false" otherwise

Definition at line 542 of file octree_base.h.

References pcl::octree::OctreeBranchNode< ContainerT >::getChildPtr().

## breadth_begin() [1/2]

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

BreadthFirstIterator pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::breadth_begin | ( | uindex_t | max_depth_arg = `0u` | ) |

inline

Definition at line 226 of file octree_base.h.

References pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::octree_depth_.

## breadth_begin() [2/2]

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

ConstBreadthFirstIterator pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::breadth_begin | ( | uindex_t | max_depth_arg = `0u` | ) | const

inline

Definition at line 233 of file octree_base.h.

References pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::octree_depth_.

## breadth_end() [1/2]

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

const BreadthFirstIterator pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::breadth_end | ( |  | ) |

inline

Definition at line 240 of file octree_base.h.

## breadth_end() [2/2]

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

const ConstBreadthFirstIterator pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::breadth_end | ( |  | ) | const

inline

Definition at line 246 of file octree_base.h.

## cbegin()

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

ConstIterator pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::cbegin | ( | uindex_t | max_depth_arg = `0u` | ) | const

inline

Definition at line 130 of file octree_base.h.

References pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::octree_depth_.

## cend()

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

const ConstIterator pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::cend | ( |  | ) | const

inline

Definition at line 148 of file octree_base.h.

## createBranchChild()

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

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.

Parameters

  branch_arg | reference to octree branch class
  child_idx_arg | index to child node

Returns
  pointer of new branch child to this reference

Definition at line 640 of file octree_base.h.

## createLeaf() [1/2]

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

LeafContainerT * pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::createLeaf | ( | const OctreeKey & | key_arg | ) |

inline protected

Create a leaf node.

Parameters

  key_arg | octree key addressing a leaf node.

Returns
  pointer to leaf node

Definition at line 480 of file octree_base.h.

References pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::createLeafRecursive(), pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::depth_mask_, pcl::octree::OctreeLeafNode< ContainerT >::getContainerPtr(), and pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::root_node_.

## createLeaf() [2/2]

template<typename LeafContainerT , typename BranchContainerT >

LeafContainerT * pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::createLeaf | ( | uindex_t | idx_x_arg,
|  | uindex_t | idx_y_arg,
|  | uindex_t | idx_z_arg
| ) |  |

Create new leaf node at (idx_x_arg, idx_y_arg, idx_z_arg).

Note
  If leaf node already exist, this method returns the existing node

Parameters

  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.

Returns
  pointer to new leaf node container.

Definition at line 129 of file octree_base.hpp.

Referenced by pcl::octree::OctreePointCloudVoxelCentroid< PointT, LeafContainerT, BranchContainerT >::addPointIdx(), and pcl::octree::OctreePointCloudOccupancy< PointT, LeafContainerT, BranchContainerT >::setOccupiedVoxelAtPoint().

## createLeafChild()

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

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.

Parameters

  branch_arg | reference to octree branch class
  child_idx_arg | index to child node

Returns
  pointer of new leaf child to this reference

Definition at line 654 of file octree_base.h.

## createLeafRecursive()

template<typename LeafContainerT , typename BranchContainerT >

uindex_t pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::createLeafRecursive | ( | const OctreeKey & | key_arg,
|  | uindex_t | 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.

Parameters

  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

Returns
  depth mask at which leaf node was created

Definition at line 293 of file octree_base.hpp.

References pcl::octree::OctreeKey::getChildIdxWithDepthMask().

Referenced by pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::createLeaf().

## deleteBranch()

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

void pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::deleteBranch | ( | BranchNode & | branch_arg | ) |

inline protected

Delete branch and all its subchilds from octree.

Parameters

  branch_arg | reference to octree branch class

Definition at line 627 of file octree_base.h.

References pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::deleteBranchChild().

Referenced by pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::deleteBranchChild().

## deleteBranchChild()

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

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.

Parameters

  branch_arg | reference to octree branch class
  child_idx_arg | index to child node

Definition at line 596 of file octree_base.h.

References pcl::octree::BRANCH_NODE, pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::deleteBranch(), pcl::octree::OctreeNode::getNodeType(), pcl::octree::OctreeBranchNode< ContainerT >::hasChild(), and pcl::octree::LEAF_NODE.

Referenced by pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::deleteBranch().

## deleteLeafRecursive()

template<typename LeafContainerT , typename BranchContainerT >

bool pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::deleteLeafRecursive | ( | const OctreeKey & | key_arg,
|  | uindex_t | depth_mask_arg,
|  | BranchNode * | branch_arg
| ) |  |

protected

Recursively search and delete leaf node.

Parameters

  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

Returns
  "true" if current branch contains child(ren); "false" otherwise. If it's true, current branch cannot be deleted.

Definition at line 391 of file octree_base.hpp.

Referenced by pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::removeLeaf().

## deleteTree()

template<typename LeafContainerT , typename BranchContainerT >

void pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::deleteTree | ( |  | ) |

Delete the octree structure and its leaf nodes.

Definition at line 171 of file octree_base.hpp.

Referenced by pcl::octree::OctreePointCloud< PointT, LeafContainerT, BranchContainerT, OctreeT >::deleteTree().

## depth_begin() [1/2]

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

DepthFirstIterator pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::depth_begin | ( | uindex_t | max_depth_arg = `0u` | ) |

inline

Definition at line 196 of file octree_base.h.

References pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::octree_depth_.

## depth_begin() [2/2]

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

ConstDepthFirstIterator pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::depth_begin | ( | uindex_t | max_depth_arg = `0u` | ) | const

inline

Definition at line 203 of file octree_base.h.

References pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::octree_depth_.

## depth_end() [1/2]

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

const DepthFirstIterator pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::depth_end | ( |  | ) |

inline

Definition at line 210 of file octree_base.h.

## depth_end() [2/2]

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

const ConstDepthFirstIterator pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::depth_end | ( |  | ) | const

inline

Definition at line 216 of file octree_base.h.

## deserializeTree() [1/2]

template<typename LeafContainerT , typename BranchContainerT >

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(..).

Parameters

  binary_tree_input_arg | reference to input vector for reading binary tree structure.

Definition at line 238 of file octree_base.hpp.

## deserializeTree() [2/2]

template<typename LeafContainerT , typename BranchContainerT >

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.

Parameters

  binary_tree_input_arg | reference to input vector for reading binary tree structure.
  leaf_container_vector_arg | pointer to container vector.

Definition at line 262 of file octree_base.hpp.

## deserializeTreeCallback()

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

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 762 of file octree_base.h.

## deserializeTreeRecursive()

template<typename LeafContainerT , typename BranchContainerT >

void pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::deserializeTreeRecursive | ( | BranchNode * | branch_arg,
|  | uindex_t | 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.

Parameters

  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 500 of file octree_base.hpp.

References pcl::octree::OctreeKey::popBranch(), and pcl::octree::OctreeKey::pushBranch().

## end() [1/2]

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

const Iterator pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::end | ( |  | ) |

inline

Definition at line 136 of file octree_base.h.

## end() [2/2]

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

const ConstIterator pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::end | ( |  | ) | const

inline

Definition at line 142 of file octree_base.h.

## existLeaf() [1/2]

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

bool pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::existLeaf | ( | const OctreeKey & | key_arg | ) | const

inline protected

Check for existence of a leaf node in the octree.

Parameters

  key_arg | octree key addressing a leaf node.

Returns
  "true" if leaf node is found; "false" otherwise

Definition at line 510 of file octree_base.h.

References pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::findLeaf().

## existLeaf() [2/2]

template<typename LeafContainerT , typename BranchContainerT >

bool pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::existLeaf | ( | uindex_t | idx_x_arg,
|  | uindex_t | idx_y_arg,
|  | uindex_t | idx_z_arg
| ) |  | const

idx_x_arg for the existence of leaf node at (idx_x_arg, idx_y_arg, idx_z_arg).

Parameters

  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.

Returns
  "true" if leaf node search is successful, otherwise it returns "false".

Definition at line 143 of file octree_base.hpp.

## findLeaf() [1/2]

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

LeafContainerT * pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::findLeaf | ( | const OctreeKey & | key_arg | ) | const

inline protected

Find leaf node.

Parameters

  key_arg | octree key addressing a leaf node.

Returns
  pointer to leaf node. If leaf node is not found, this pointer returns 0.

Definition at line 498 of file octree_base.h.

References pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::depth_mask_, pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::findLeafRecursive(), and pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::root_node_.

## findLeaf() [2/2]

template<typename LeafContainerT , typename BranchContainerT >

LeafContainerT * pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::findLeaf | ( | uindex_t | idx_x_arg,
|  | uindex_t | idx_y_arg,
|  | uindex_t | idx_z_arg
| ) |  | const

Find leaf node at (idx_x_arg, idx_y_arg, idx_z_arg).

Note
  If leaf node already exist, this method returns the existing node

Parameters

  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.

Returns
  pointer to leaf node container if found, null pointer otherwise.

Definition at line 115 of file octree_base.hpp.

Referenced by pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::existLeaf(), and pcl::octree::OctreePointCloud< PointT, LeafContainerT, BranchContainerT, OctreeT >::findLeafAtPoint().

## findLeafRecursive()

template<typename LeafContainerT , typename BranchContainerT >

void pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::findLeafRecursive | ( | const OctreeKey & | key_arg,
|  | uindex_t | depth_mask_arg,
|  | BranchNode * | branch_arg,
|  | LeafContainerT *& | result_arg
| ) |  | const

protected

Recursively search for a given leaf node and return a pointer.

Note
  If leaf node does not exist, a 0 pointer is returned.

Parameters

  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 353 of file octree_base.hpp.

References pcl::octree::BRANCH_NODE, pcl::octree::OctreeKey::getChildIdxWithDepthMask(), and pcl::octree::OctreeNode::getNodeType().

Referenced by pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::findLeaf().

## fixed_depth_begin() [1/2]

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

FixedDepthIterator pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::fixed_depth_begin | ( | uindex_t | fixed_depth_arg = `0u` | ) |

inline

Definition at line 256 of file octree_base.h.

## fixed_depth_begin() [2/2]

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

ConstFixedDepthIterator pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::fixed_depth_begin | ( | uindex_t | fixed_depth_arg = `0u` | ) | const

inline

Definition at line 262 of file octree_base.h.

## fixed_depth_end() [1/2]

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

const FixedDepthIterator pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::fixed_depth_end | ( |  | ) |

inline

Definition at line 268 of file octree_base.h.

## fixed_depth_end() [2/2]

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

const ConstFixedDepthIterator pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::fixed_depth_end | ( |  | ) | const

inline

Definition at line 274 of file octree_base.h.

## getBranchBitPattern()

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

char pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::getBranchBitPattern | ( | const BranchNode & | branch_arg | ) | const

inline protected

Generate bit pattern reflecting the existence of child node pointers.

Parameters

  branch_arg | reference to octree branch class

Returns
  a single byte with 8 bits of child node information

Definition at line 577 of file octree_base.h.

References pcl::octree::OctreeBranchNode< ContainerT >::getChildPtr().

## getBranchChildPtr()

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

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.

Parameters

  branch_arg | reference to octree branch class
  child_idx_arg | index to child node

Returns
  pointer to octree child node class

Definition at line 554 of file octree_base.h.

References pcl::octree::OctreeBranchNode< ContainerT >::getChildPtr().

## getBranchCount()

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

std::size_t pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::getBranchCount | ( |  | ) | const

inline

Return the amount of existing branch nodes in the octree.

Returns
  amount of branch nodes.

Definition at line 415 of file octree_base.h.

References pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::branch_count_.

## getLeafCount()

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

std::size_t pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::getLeafCount | ( |  | ) | const

inline

Return the amount of existing leafs in the octree.

Returns
  amount of registered leaf nodes.

Definition at line 406 of file octree_base.h.

References pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::leaf_count_.

## getRootNode()

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

OctreeNode * pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::getRootNode | ( |  | ) | const

inline protected

Retrieve root node.

Definition at line 531 of file octree_base.h.

References pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::root_node_.

## getTreeDepth()

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

uindex_t pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::getTreeDepth | ( |  | ) | const

inline

Get the maximum depth of the octree.

Returns
  depth_arg: maximum depth of octree

Definition at line 359 of file octree_base.h.

References pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::octree_depth_.

## leaf_breadth_begin() [1/2]

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

LeafNodeBreadthFirstIterator pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::leaf_breadth_begin | ( | uindex_t | max_depth_arg = `0u` | ) |

inline

Definition at line 285 of file octree_base.h.

References pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::octree_depth_.

## leaf_breadth_begin() [2/2]

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

ConstLeafNodeBreadthFirstIterator pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::leaf_breadth_begin | ( | uindex_t | max_depth_arg = `0u` | ) | const

inline

Definition at line 292 of file octree_base.h.

References pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::octree_depth_.

## leaf_breadth_end() [1/2]

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

const LeafNodeBreadthFirstIterator pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::leaf_breadth_end | ( |  | ) |

inline

Definition at line 299 of file octree_base.h.

## leaf_breadth_end() [2/2]

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

const ConstLeafNodeBreadthFirstIterator pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::leaf_breadth_end | ( |  | ) | const

inline

Definition at line 305 of file octree_base.h.

## leaf_depth_begin() [1/2]

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

LeafNodeDepthFirstIterator pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::leaf_depth_begin | ( | uindex_t | max_depth_arg = `0u` | ) |

inline

Definition at line 166 of file octree_base.h.

References pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::octree_depth_.

## leaf_depth_begin() [2/2]

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

ConstLeafNodeDepthFirstIterator pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::leaf_depth_begin | ( | uindex_t | max_depth_arg = `0u` | ) | const

inline

Definition at line 173 of file octree_base.h.

References pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::octree_depth_.

## leaf_depth_end() [1/2]

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

const LeafNodeDepthFirstIterator pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::leaf_depth_end | ( |  | ) |

inline

Definition at line 180 of file octree_base.h.

## leaf_depth_end() [2/2]

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

const ConstLeafNodeDepthFirstIterator pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::leaf_depth_end | ( |  | ) | const

inline

Definition at line 186 of file octree_base.h.

## octreeCanResize()

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

bool pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::octreeCanResize | ( |  | ) | const

inline protected

Test if octree is able to dynamically change its depth.

This is required for adaptive bounding box adjustment.

Returns
  "true"

Definition at line 774 of file octree_base.h.

## operator=()

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

OctreeBase & pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::operator= | ( | const OctreeBase< LeafContainerT, BranchContainerT > & | source | ) |

inline

Copy operator.

Definition at line 329 of file octree_base.h.

References pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::branch_count_, pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::depth_mask_, pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::dynamic_depth_enabled_, pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::leaf_count_, pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::max_key_, pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::octree_depth_, and pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::root_node_.

## removeLeaf() [1/2]

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

void pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::removeLeaf | ( | const OctreeKey & | key_arg | ) |

inline protected

Remove leaf node from octree.

Parameters

  key_arg | octree key addressing a leaf node.

Definition at line 519 of file octree_base.h.

References pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::deleteLeafRecursive(), pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::depth_mask_, pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::max_key_, and pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::root_node_.

## removeLeaf() [2/2]

template<typename LeafContainerT , typename BranchContainerT >

void pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::removeLeaf | ( | uindex_t | idx_x_arg,
|  | uindex_t | idx_y_arg,
|  | uindex_t | idx_z_arg
| ) |  |

Remove leaf node at (idx_x_arg, idx_y_arg, idx_z_arg).

Parameters

  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 157 of file octree_base.hpp.

## serializeLeafs()

template<typename LeafContainerT , typename BranchContainerT >

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.

Parameters

  leaf_container_vector_arg | pointers to LeafContainerT vector that receives a copy of all LeafContainerT objects in the octree.

Definition at line 222 of file octree_base.hpp.

## serializeTree() [1/2]

template<typename LeafContainerT , typename BranchContainerT >

void pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::serializeTree | ( | std::vector< char > & | binary_tree_out_arg | ) | const

Serialize octree into a binary output vector describing its branch node structure.

Parameters

  binary_tree_out_arg | reference to output vector for writing binary tree structure.

Definition at line 185 of file octree_base.hpp.

## serializeTree() [2/2]

template<typename LeafContainerT , typename BranchContainerT >

void pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::serializeTree | ( | std::vector< char > & | binary_tree_out_arg,
|  | std::vector< LeafContainerT * > & | leaf_container_vector_arg
| ) |  | const

Serialize octree into a binary output vector describing its branch node structure and push all LeafContainerT elements stored in the octree to a vector.

Parameters

  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 201 of file octree_base.hpp.

## serializeTreeCallback()

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

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 756 of file octree_base.h.

## serializeTreeRecursive()

template<typename LeafContainerT , typename BranchContainerT >

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.

Parameters

  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_base.hpp.

## setBranchChildPtr()

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

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.

Parameters

  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 565 of file octree_base.h.

## setMaxVoxelIndex()

template<typename LeafContainerT , typename BranchContainerT >

void pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::setMaxVoxelIndex | ( | uindex_t | max_voxel_index_arg | ) |

Set the maximum amount of voxels per dimension.

Parameters

  [in] | max_voxel_index_arg | maximum amount of voxels per dimension

Definition at line 64 of file octree_base.hpp.

References pcl::octree::OctreeKey::maxDepth.

## setTreeDepth()

template<typename LeafContainerT , typename BranchContainerT >

void pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::setTreeDepth | ( | uindex_t | max_depth_arg | ) |

Set the maximum depth of the octree.

Parameters

  max_depth_arg | maximum depth of octree

Definition at line 87 of file octree_base.hpp.

References pcl::octree::OctreeKey::maxDepth.

## Friends And Related Symbol Documentation

## OctreeBreadthFirstIterator< const OctreeT >

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

friend class OctreeBreadthFirstIterator< const OctreeT >

friend

Definition at line 96 of file octree_base.h.

## OctreeBreadthFirstIterator< OctreeT >

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

friend class OctreeBreadthFirstIterator< OctreeT >

friend

Definition at line 96 of file octree_base.h.

## OctreeDepthFirstIterator< const OctreeT >

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

friend class OctreeDepthFirstIterator< const OctreeT >

friend

Definition at line 96 of file octree_base.h.

## OctreeDepthFirstIterator< OctreeT >

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

friend class OctreeDepthFirstIterator< OctreeT >

friend

Definition at line 96 of file octree_base.h.

## OctreeFixedDepthIterator< const OctreeT >

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

friend class OctreeFixedDepthIterator< const OctreeT >

friend

Definition at line 96 of file octree_base.h.

## OctreeFixedDepthIterator< OctreeT >

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

friend class OctreeFixedDepthIterator< OctreeT >

friend

Definition at line 96 of file octree_base.h.

## OctreeIteratorBase< const OctreeT >

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

friend class OctreeIteratorBase< const OctreeT >

friend

Definition at line 96 of file octree_base.h.

## OctreeIteratorBase< OctreeT >

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

friend class OctreeIteratorBase< OctreeT >

friend

Definition at line 96 of file octree_base.h.

## OctreeLeafNodeBreadthFirstIterator< const OctreeT >

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

friend class OctreeLeafNodeBreadthFirstIterator< const OctreeT >

friend

Definition at line 96 of file octree_base.h.

## OctreeLeafNodeBreadthFirstIterator< OctreeT >

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

friend class OctreeLeafNodeBreadthFirstIterator< OctreeT >

friend

Definition at line 96 of file octree_base.h.

## OctreeLeafNodeDepthFirstIterator< const OctreeT >

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

friend class OctreeLeafNodeDepthFirstIterator< const OctreeT >

friend

Definition at line 96 of file octree_base.h.

## OctreeLeafNodeDepthFirstIterator< OctreeT >

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

friend class OctreeLeafNodeDepthFirstIterator< OctreeT >

friend

Definition at line 96 of file octree_base.h.

## Member Data Documentation

## branch_count_

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

std::size_t pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::branch_count_ {1}

protected

Amount of branch nodes

Definition at line 81 of file octree_base.h.

Referenced by pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::getBranchCount(), and pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::operator=().

## depth_mask_

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

uindex_t pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::depth_mask_ {0}

protected

Depth mask based on octree depth

Definition at line 87 of file octree_base.h.

Referenced by pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::createLeaf(), pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::findLeaf(), pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::operator=(), and pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::removeLeaf().

## dynamic_depth_enabled_

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

bool pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::dynamic_depth_enabled_ {false}

protected

Enable dynamic_depth.

Definition at line 93 of file octree_base.h.

Referenced by pcl::octree::OctreePointCloud< PointT, LeafContainerT, BranchContainerT, OctreeT >::enableDynamicDepth(), and pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::operator=().

## leaf_count_

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

std::size_t pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::leaf_count_ {0}

protected

Amount of leaf nodes

Definition at line 78 of file octree_base.h.

Referenced by pcl::octree::OctreePointCloud< PointT, LeafContainerT, BranchContainerT, OctreeT >::enableDynamicDepth(), pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::getLeafCount(), pcl::octree::OctreePointCloudVoxelCentroid< PointT, LeafContainerT, BranchContainerT >::getVoxelCentroids(), pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::operator=(), and pcl::octree::OctreePointCloud< PointT, LeafContainerT, BranchContainerT, OctreeT >::setResolution().

## max_key_

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

OctreeKey pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::max_key_

protected

key range

Definition at line 96 of file octree_base.h.

Referenced by pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::operator=(), and pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::removeLeaf().

## octree_depth_

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

uindex_t pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::octree_depth_ {0}

protected

Octree depth.

Definition at line 90 of file octree_base.h.

Referenced by pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::begin(), pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::begin(), pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::breadth_begin(), pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::breadth_begin(), pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::cbegin(), pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::depth_begin(), pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::depth_begin(), pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::getTreeDepth(), pcl::octree::OctreePointCloud< PointT, LeafContainerT, BranchContainerT, OctreeT >::getTreeDepth(), pcl::octree::OctreePointCloud< PointT, LeafContainerT, BranchContainerT, OctreeT >::getVoxelSquaredDiameter(), pcl::octree::OctreePointCloud< PointT, LeafContainerT, BranchContainerT, OctreeT >::getVoxelSquaredSideLen(), pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::leaf_breadth_begin(), pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::leaf_breadth_begin(), pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::leaf_depth_begin(), pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::leaf_depth_begin(), and pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::operator=().

## root_node_

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

BranchNode* pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::root_node_

protected

Pointer to root branch node of octree

Definition at line 84 of file octree_base.h.

Referenced by pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::createLeaf(), pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::findLeaf(), pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::getRootNode(), pcl::octree::OctreePointCloudVoxelCentroid< PointT, LeafContainerT, BranchContainerT >::getVoxelCentroids(), pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::operator=(), and pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::removeLeaf().

The documentation for this class was generated from the following files:

- pcl/octree/octree_base.h
- pcl/octree/impl/octree_base.hpp