Point Cloud Library (PCL)  1.9.1-dev
List of all members | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends
pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT > Class Template Reference

Octree double buffer class More...

#include <pcl/octree/octree2buf_base.h>

+ Inheritance diagram for pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >:

Public Types

typedef Octree2BufBase< LeafContainerT, BranchContainerT > OctreeT
 
typedef BufferedBranchNode< BranchContainerT > BranchNode
 
typedef OctreeLeafNode< LeafContainerT > LeafNode
 
typedef BranchContainerT BranchContainer
 
typedef LeafContainerT LeafContainer
 
typedef OctreeDepthFirstIterator< OctreeTIterator
 
typedef const OctreeDepthFirstIterator< OctreeTConstIterator
 
typedef OctreeLeafNodeDepthFirstIterator< OctreeTLeafNodeIterator
 
typedef const OctreeLeafNodeDepthFirstIterator< OctreeTConstLeafNodeIterator
 
typedef OctreeLeafNodeDepthFirstIterator< OctreeTLeafNodeDepthFirstIterator
 
typedef const OctreeLeafNodeDepthFirstIterator< OctreeTConstLeafNodeDepthFirstIterator
 
typedef OctreeDepthFirstIterator< OctreeTDepthFirstIterator
 
typedef const OctreeDepthFirstIterator< OctreeTConstDepthFirstIterator
 
typedef OctreeBreadthFirstIterator< OctreeTBreadthFirstIterator
 
typedef const OctreeBreadthFirstIterator< OctreeTConstBreadthFirstIterator
 
typedef OctreeLeafNodeBreadthFirstIterator< OctreeTLeafNodeBreadthIterator
 
typedef const OctreeLeafNodeBreadthFirstIterator< OctreeTConstLeafNodeBreadthIterator
 

Public Member Functions

Iterator begin (unsigned int max_depth_arg=0)
 
const Iterator end ()
 
LeafNodeIterator leaf_begin (unsigned int max_depth_arg=0)
 
const LeafNodeIterator leaf_end ()
 
LeafNodeDepthFirstIterator leaf_depth_begin (unsigned int max_depth_arg=0)
 
const LeafNodeDepthFirstIterator leaf_depth_end ()
 
DepthFirstIterator depth_begin (unsigned int maxDepth_arg=0)
 
const DepthFirstIterator depth_end ()
 
BreadthFirstIterator breadth_begin (unsigned int max_depth_arg=0)
 
const BreadthFirstIterator breadth_end ()
 
LeafNodeBreadthIterator leaf_breadth_begin (unsigned int max_depth_arg=0u)
 
const LeafNodeBreadthIterator leaf_breadth_end ()
 
 Octree2BufBase ()
 Empty constructor. More...
 
virtual ~Octree2BufBase ()
 Empty deconstructor. More...
 
 Octree2BufBase (const Octree2BufBase &source)
 Copy constructor. More...
 
Octree2BufBaseoperator= (const Octree2BufBase &source)
 Copy constructor. More...
 
void setMaxVoxelIndex (unsigned int max_voxel_index_arg)
 Set the maximum amount of voxels per dimension. More...
 
void setTreeDepth (unsigned int depth_arg)
 Set the maximum depth of the octree. More...
 
unsigned int getTreeDepth () const
 Get the maximum depth of the octree. More...
 
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). More...
 
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). More...
 
bool existLeaf (unsigned int idx_x_arg, unsigned int idx_y_arg, unsigned int idx_z_arg) const
 Check for the existence of leaf node at (idx_x_arg, idx_y_arg, idx_z_arg). More...
 
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). More...
 
std::size_t getLeafCount () const
 Return the amount of existing leafs in the octree. More...
 
std::size_t getBranchCount () const
 Return the amount of existing branches in the octree. More...
 
void deleteTree ()
 Delete the octree structure and its leaf nodes. More...
 
void deletePreviousBuffer ()
 Delete octree structure of previous buffer. More...
 
void deleteCurrentBuffer ()
 Delete the octree structure in the current buffer. More...
 
void switchBuffers ()
 Switch buffers and reset current octree structure. More...
 
void serializeTree (std::vector< char > &binary_tree_out_arg, bool do_XOR_encoding_arg=false)
 Serialize octree into a binary output vector describing its branch node structure. More...
 
void serializeTree (std::vector< char > &binary_tree_out_arg, std::vector< LeafContainerT * > &leaf_container_vector_arg, bool do_XOR_encoding_arg=false)
 Serialize octree into a binary output vector describing its branch node structure and and push all DataT elements stored in the octree to a vector. More...
 
void serializeLeafs (std::vector< LeafContainerT * > &leaf_container_vector_arg)
 Outputs a vector of all DataT elements that are stored within the octree leaf nodes. More...
 
void serializeNewLeafs (std::vector< LeafContainerT * > &leaf_container_vector_arg)
 Outputs a vector of all DataT elements from leaf nodes, that do not exist in the previous octree buffer. More...
 
void deserializeTree (std::vector< char > &binary_tree_in_arg, bool do_XOR_decoding_arg=false)
 Deserialize a binary octree description vector and create a corresponding octree structure. More...
 
void deserializeTree (std::vector< char > &binary_tree_in_arg, std::vector< LeafContainerT * > &leaf_container_vector_arg, bool do_XOR_decoding_arg=false)
 Deserialize a binary octree description and create a corresponding octree structure. More...
 

Protected Member Functions

OctreeNodegetRootNode () const
 Retrieve root node. More...
 
LeafContainerT * findLeaf (const OctreeKey &key_arg) const
 Find leaf node. More...
 
LeafContainerT * createLeaf (const OctreeKey &key_arg)
 Create a leaf node. More...
 
bool existLeaf (const OctreeKey &key_arg) const
 Check if leaf doesn't exist in the octree. More...
 
void removeLeaf (const OctreeKey &key_arg)
 Remove leaf node from octree. More...
 
bool branchHasChild (const BranchNode &branch_arg, unsigned char child_idx_arg) const
 Check if branch is pointing to a particular child node. More...
 
OctreeNodegetBranchChildPtr (const BranchNode &branch_arg, unsigned char child_idx_arg) const
 Retrieve a child node pointer for child node at child_idx. More...
 
void setBranchChildPtr (BranchNode &branch_arg, unsigned char child_idx_arg, OctreeNode *new_child_arg)
 Assign new child node to branch. More...
 
char getBranchBitPattern (const BranchNode &branch_arg) const
 Generate bit pattern reflecting the existence of child node pointers for current buffer. More...
 
char getBranchBitPattern (const BranchNode &branch_arg, unsigned char bufferSelector_arg) const
 Generate bit pattern reflecting the existence of child node pointers in specific buffer. More...
 
char getBranchXORBitPattern (const BranchNode &branch_arg) const
 Generate XOR bit pattern reflecting differences between the two octree buffers. More...
 
bool hasBranchChanges (const BranchNode &branch_arg) const
 Test if branch changed between previous and current buffer. More...
 
void deleteBranchChild (BranchNode &branch_arg, unsigned char buffer_selector_arg, unsigned char child_idx_arg)
 Delete child node and all its subchilds from octree in specific buffer. More...
 
void deleteBranchChild (BranchNode &branch_arg, unsigned char child_idx_arg)
 Delete child node and all its subchilds from octree in current buffer. More...
 
void deleteBranch (BranchNode &branch_arg)
 Delete branch and all its subchilds from octree (both buffers) More...
 
BranchNodecreateBranchChild (BranchNode &branch_arg, unsigned char child_idx_arg)
 Fetch and add a new branch child to a branch class in current buffer. More...
 
LeafNodecreateLeafChild (BranchNode &branch_arg, unsigned char child_idx_arg)
 Fetch and add a new leaf child to a branch class. More...
 
unsigned int createLeafRecursive (const OctreeKey &key_arg, unsigned int depth_mask_arg, BranchNode *branch_arg, LeafNode *&return_leaf_arg, BranchNode *&parent_of_leaf_arg, bool branch_reset_arg=false)
 Create a leaf node at octree key. More...
 
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. More...
 
bool deleteLeafRecursive (const OctreeKey &key_arg, unsigned int depth_mask_arg, BranchNode *branch_arg)
 Recursively search and delete leaf node. More...
 
void serializeTreeRecursive (BranchNode *branch_arg, OctreeKey &key_arg, std::vector< char > *binary_tree_out_arg, typename std::vector< LeafContainerT * > *leaf_container_vector_arg, bool do_XOR_encoding_arg=false, bool new_leafs_filter_arg=false)
 Recursively explore the octree and output binary octree description together with a vector of leaf node DataT content. More...
 
void deserializeTreeRecursive (BranchNode *branch_arg, unsigned int depth_mask_arg, OctreeKey &key_arg, typename std::vector< char >::const_iterator &binary_tree_in_it_arg, typename std::vector< char >::const_iterator &binary_tree_in_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, bool branch_reset_arg=false, bool do_XOR_decoding_arg=false)
 Rebuild an octree based on binary XOR octree description and DataT objects for leaf node initialization. More...
 
virtual void serializeTreeCallback (LeafContainerT &, const OctreeKey &)
 Callback executed for every leaf node data during serialization. More...
 
virtual void deserializeTreeCallback (LeafContainerT &, const OctreeKey &)
 Callback executed for every leaf node data during deserialization. More...
 
void treeCleanUpRecursive (BranchNode *branch_arg)
 Recursively explore the octree and remove unused branch and leaf nodes. More...
 
double Log2 (double n_arg)
 Helper function to calculate the binary logarithm. More...
 
bool octreeCanResize ()
 Test if octree is able to dynamically change its depth. More...
 
void printBinary (char data_arg)
 Prints binary representation of a byte - used for debugging. More...
 

Protected Attributes

std::size_t leaf_count_
 Amount of leaf nodes. More...
 
std::size_t branch_count_
 Amount of branch nodes. More...
 
BranchNoderoot_node_
 Pointer to root branch node of octree. More...
 
unsigned int depth_mask_
 Depth mask based on octree depth. More...
 
OctreeKey max_key_
 key range More...
 
unsigned char buffer_selector_
 Currently active octree buffer. More...
 
bool tree_dirty_flag_
 
unsigned int octree_depth_
 Octree depth. More...
 
bool dynamic_depth_enabled_
 Enable dynamic_depth. More...
 

Friends

class OctreeIteratorBase< OctreeT >
 
class OctreeDepthFirstIterator< OctreeT >
 
class OctreeBreadthFirstIterator< OctreeT >
 
class OctreeLeafNodeDepthFirstIterator< OctreeT >
 
class OctreeLeafNodeBreadthFirstIterator< OctreeT >
 

Detailed Description

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
class pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >

Octree double buffer class

Note
This octree implementation keeps two separate octree structures in memory.
This allows for differentially compare the octree structures (change detection, differential encoding).
The tree depth defines the maximum amount of octree voxels / leaf nodes (should be initially defined).
All leaf nodes are addressed by integer indices.
Note: 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 224 of file octree2buf_base.h.

Member Typedef Documentation

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
typedef BranchContainerT pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::BranchContainer

Definition at line 241 of file octree2buf_base.h.

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
typedef BufferedBranchNode<BranchContainerT> pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::BranchNode

Definition at line 238 of file octree2buf_base.h.

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
typedef OctreeBreadthFirstIterator<OctreeT> pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::BreadthFirstIterator

Definition at line 286 of file octree2buf_base.h.

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
typedef const OctreeBreadthFirstIterator<OctreeT> pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::ConstBreadthFirstIterator

Definition at line 290 of file octree2buf_base.h.

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
typedef const OctreeDepthFirstIterator<OctreeT> pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::ConstDepthFirstIterator

Definition at line 284 of file octree2buf_base.h.

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
typedef const OctreeDepthFirstIterator<OctreeT> pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::ConstIterator

Definition at line 246 of file octree2buf_base.h.

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
typedef const OctreeLeafNodeBreadthFirstIterator<OctreeT> pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::ConstLeafNodeBreadthIterator

Definition at line 296 of file octree2buf_base.h.

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
typedef const OctreeLeafNodeDepthFirstIterator<OctreeT> pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::ConstLeafNodeDepthFirstIterator

Definition at line 271 of file octree2buf_base.h.

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
typedef const OctreeLeafNodeDepthFirstIterator<OctreeT> pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::ConstLeafNodeIterator

Definition at line 255 of file octree2buf_base.h.

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
typedef OctreeDepthFirstIterator<OctreeT> pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::DepthFirstIterator

Definition at line 280 of file octree2buf_base.h.

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
typedef OctreeDepthFirstIterator<OctreeT> pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::Iterator

Definition at line 245 of file octree2buf_base.h.

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
typedef LeafContainerT pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::LeafContainer

Definition at line 242 of file octree2buf_base.h.

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
typedef OctreeLeafNode<LeafContainerT> pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::LeafNode

Definition at line 239 of file octree2buf_base.h.

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
typedef OctreeLeafNodeBreadthFirstIterator<OctreeT> pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::LeafNodeBreadthIterator

Definition at line 292 of file octree2buf_base.h.

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
typedef OctreeLeafNodeDepthFirstIterator<OctreeT> pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::LeafNodeDepthFirstIterator

Definition at line 267 of file octree2buf_base.h.

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
typedef OctreeLeafNodeDepthFirstIterator<OctreeT> pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::LeafNodeIterator

Definition at line 248 of file octree2buf_base.h.

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
typedef Octree2BufBase<LeafContainerT, BranchContainerT> pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::OctreeT

Definition at line 229 of file octree2buf_base.h.

Constructor & Destructor Documentation

template<typename LeafContainerT , typename BranchContainerT >
pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::Octree2BufBase ( )

Empty constructor.

Definition at line 48 of file octree2buf_base.hpp.

template<typename LeafContainerT , typename BranchContainerT >
pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::~Octree2BufBase ( )
virtual
template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::Octree2BufBase ( const Octree2BufBase< LeafContainerT, BranchContainerT > &  source)
inline

Copy constructor.

Definition at line 316 of file octree2buf_base.h.

Member Function Documentation

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
Iterator pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::begin ( unsigned int  max_depth_arg = 0)
inline

Definition at line 247 of file octree2buf_base.h.

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
bool pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::branchHasChild ( const BranchNode branch_arg,
unsigned char  child_idx_arg 
) const
inlineprotected

Check if branch is pointing to a particular child node.

Parameters
branch_argreference to octree branch class
child_idx_argindex to child node
Returns
"true" if pointer to child node exists; "false" otherwise

Definition at line 565 of file octree2buf_base.h.

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

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
BreadthFirstIterator pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::breadth_begin ( unsigned int  max_depth_arg = 0)
inline

Definition at line 291 of file octree2buf_base.h.

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
const BreadthFirstIterator pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::breadth_end ( )
inline

Definition at line 292 of file octree2buf_base.h.

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
BranchNode* pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::createBranchChild ( BranchNode branch_arg,
unsigned char  child_idx_arg 
)
inlineprotected

Fetch and add a new branch child to a branch class in current buffer.

Parameters
branch_argreference to octree branch class
child_idx_argindex to child node
Returns
pointer of new branch child to this reference

Definition at line 752 of file octree2buf_base.h.

References pcl::octree::BufferedBranchNode< ContainerT >::setChildPtr().

Referenced by pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::createLeafRecursive(), and pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::deserializeTreeRecursive().

template<typename LeafContainerT , typename BranchContainerT >
LeafContainerT * pcl::octree::Octree2BufBase< 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).

Note
If leaf node already exist, this method returns the existing node
Parameters
idx_x_argindex of leaf node in the X axis.
idx_y_argindex of leaf node in the Y axis.
idx_z_argindex of leaf node in the Z axis.
Returns
pointer to new leaf node container.

Definition at line 116 of file octree2buf_base.hpp.

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
LeafContainerT* pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::createLeaf ( const OctreeKey key_arg)
inlineprotected

Create a leaf node.

Note
If the leaf node at the given octree node does not exist, it will be created and added to the tree.
Parameters
key_argoctree key addressing a leaf node.
Returns
pointer to an existing or created leaf container.

Definition at line 520 of file octree2buf_base.h.

References pcl::octree::OctreeLeafNode< ContainerT >::getContainerPtr().

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
LeafNode* pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::createLeafChild ( BranchNode branch_arg,
unsigned char  child_idx_arg 
)
inlineprotected

Fetch and add a new leaf child to a branch class.

Parameters
branch_argreference to octree branch class
child_idx_argindex to child node
Returns
pointer of new leaf child to this reference

Definition at line 769 of file octree2buf_base.h.

References pcl::octree::BufferedBranchNode< ContainerT >::setChildPtr().

Referenced by pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::createLeafRecursive(), and pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::deserializeTreeRecursive().

template<typename LeafContainerT , typename BranchContainerT >
unsigned int pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::createLeafRecursive ( const OctreeKey key_arg,
unsigned int  depth_mask_arg,
BranchNode branch_arg,
LeafNode *&  return_leaf_arg,
BranchNode *&  parent_of_leaf_arg,
bool  branch_reset_arg = false 
)
protected
template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
void pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::deleteBranch ( BranchNode branch_arg)
inlineprotected

Delete branch and all its subchilds from octree (both buffers)

Parameters
branch_argreference to octree branch class

Definition at line 722 of file octree2buf_base.h.

References pcl::octree::BufferedBranchNode< ContainerT >::getChildPtr(), and pcl::octree::BufferedBranchNode< ContainerT >::setChildPtr().

Referenced by pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::deleteTree().

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
void pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::deleteBranchChild ( BranchNode branch_arg,
unsigned char  buffer_selector_arg,
unsigned char  child_idx_arg 
)
inlineprotected
template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
void pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::deleteBranchChild ( BranchNode branch_arg,
unsigned char  child_idx_arg 
)
inlineprotected

Delete child node and all its subchilds from octree in current buffer.

Parameters
branch_argreference to octree branch class
child_idx_argindex to child node

Definition at line 714 of file octree2buf_base.h.

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
void pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::deleteCurrentBuffer ( )
inline

Delete the octree structure in the current buffer.

Definition at line 430 of file octree2buf_base.h.

template<typename LeafContainerT , typename BranchContainerT >
bool pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::deleteLeafRecursive ( const OctreeKey key_arg,
unsigned int  depth_mask_arg,
BranchNode branch_arg 
)
protected

Recursively search and delete leaf node.

Parameters
key_argreference to an octree key
depth_mask_argdepth mask used for octree key analysis and branch depth indicator
branch_argcurrent branch node
Returns
"true" if branch does not contain any childs; "false" otherwise. This indicates if current branch can be deleted.

Definition at line 474 of file octree2buf_base.hpp.

References pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::branch_count_, pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::buffer_selector_, pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::deleteBranchChild(), pcl::octree::OctreeKey::getChildIdxWithDepthMask(), pcl::octree::BufferedBranchNode< ContainerT >::getChildPtr(), pcl::octree::BufferedBranchNode< ContainerT >::hasChild(), and pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::leaf_count_.

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
void pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::deletePreviousBuffer ( )
inline

Delete octree structure of previous buffer.

Definition at line 424 of file octree2buf_base.h.

template<typename LeafContainerT , typename BranchContainerT >
void pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::deleteTree ( )
template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
DepthFirstIterator pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::depth_begin ( unsigned int  maxDepth_arg = 0)
inline

Definition at line 285 of file octree2buf_base.h.

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
const DepthFirstIterator pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::depth_end ( )
inline

Definition at line 286 of file octree2buf_base.h.

template<typename LeafContainerT , typename BranchContainerT >
void pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::deserializeTree ( std::vector< char > &  binary_tree_in_arg,
bool  do_XOR_decoding_arg = false 
)

Deserialize a binary octree description vector and create a corresponding octree structure.

Leaf nodes are initialized with getDataTByKey(..).

Parameters
binary_tree_in_argreference to input vector for reading binary tree structure.
do_XOR_decoding_argselect if binary tree structure is based on current octree (false) of based on a XOR comparison between current and previous octree

Definition at line 247 of file octree2buf_base.hpp.

References pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::depth_mask_, pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::deserializeTreeRecursive(), pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::leaf_count_, pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::root_node_, and pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::tree_dirty_flag_.

template<typename LeafContainerT , typename BranchContainerT >
void pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::deserializeTree ( std::vector< char > &  binary_tree_in_arg,
std::vector< LeafContainerT * > &  leaf_container_vector_arg,
bool  do_XOR_decoding_arg = false 
)

Deserialize a binary octree description and create a corresponding octree structure.

Leaf nodes are initialized with DataT elements from the dataVector.

Parameters
binary_tree_in_argreference to inpvectoream for reading binary tree structure.
leaf_container_vector_argvector of pointers to all LeafContainerT objects in the octree
do_XOR_decoding_argselect if binary tree structure is based on current octree (false) of based on a XOR comparison between current and previous octree

Definition at line 269 of file octree2buf_base.hpp.

References pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::depth_mask_, pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::deserializeTreeRecursive(), pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::leaf_count_, pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::root_node_, and pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::tree_dirty_flag_.

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
virtual void pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::deserializeTreeCallback ( LeafContainerT &  ,
const OctreeKey  
)
inlineprotectedvirtual

Callback executed for every leaf node data during deserialization.

Definition at line 877 of file octree2buf_base.h.

Referenced by pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::deserializeTreeRecursive().

template<typename LeafContainerT , typename BranchContainerT >
void pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::deserializeTreeRecursive ( BranchNode branch_arg,
unsigned int  depth_mask_arg,
OctreeKey key_arg,
typename std::vector< char >::const_iterator &  binary_tree_in_it_arg,
typename std::vector< char >::const_iterator &  binary_tree_in_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,
bool  branch_reset_arg = false,
bool  do_XOR_decoding_arg = false 
)
protected

Rebuild an octree based on binary XOR octree description and DataT objects for leaf node initialization.

Parameters
branch_argcurrent branch node
depth_mask_argdepth mask used for octree key analysis and branch depth indicator
key_argreference to an octree key
binary_tree_in_it_argiterator of binary input data
binary_tree_in_it_end_arg
leaf_container_vector_it_argiterator pointing to leaf container pointers to be added to a leaf node
leaf_container_vector_it_end_argiterator pointing to leaf container pointers pointing to last object in input container.
branch_reset_argReset pointer array of current branch
do_XOR_decoding_argselect if binary tree structure is based on current octree (false) of based on a XOR comparison between current and previous octree

Definition at line 629 of file octree2buf_base.hpp.

References pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::branch_count_, pcl::octree::BRANCH_NODE, pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::buffer_selector_, pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::createBranchChild(), pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::createLeafChild(), pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::deleteBranchChild(), pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::deserializeTreeCallback(), pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::getBranchBitPattern(), pcl::octree::BufferedBranchNode< ContainerT >::getChildPtr(), pcl::octree::OctreeNode::getNodeType(), pcl::octree::BufferedBranchNode< ContainerT >::hasChild(), pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::leaf_count_, pcl::octree::LEAF_NODE, pcl::octree::OctreeKey::popBranch(), pcl::octree::OctreeKey::pushBranch(), and pcl::octree::BufferedBranchNode< ContainerT >::setChildPtr().

Referenced by pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::deserializeTree().

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
const Iterator pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::end ( )
inline

Definition at line 248 of file octree2buf_base.h.

template<typename LeafContainerT , typename BranchContainerT >
bool pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::existLeaf ( unsigned int  idx_x_arg,
unsigned int  idx_y_arg,
unsigned int  idx_z_arg 
) const

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

Parameters
idx_x_argindex of leaf node in the X axis.
idx_y_argindex of leaf node in the Y axis.
idx_z_argindex of leaf node in the Z axis.
Returns
"true" if leaf node search is successful, otherwise it returns "false".

Definition at line 127 of file octree2buf_base.hpp.

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
bool pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::existLeaf ( const OctreeKey key_arg) const
inlineprotected

Check if leaf doesn't exist in the octree.

Parameters
key_argoctree key addressing a leaf node.
Returns
"true" if leaf node is found; "false" otherwise

Definition at line 536 of file octree2buf_base.h.

template<typename LeafContainerT , typename BranchContainerT >
LeafContainerT * pcl::octree::Octree2BufBase< 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).

Note
If leaf node already exist, this method returns the existing node
Parameters
idx_x_argindex of leaf node in the X axis.
idx_y_argindex of leaf node in the Y axis.
idx_z_argindex of leaf node in the Z axis.
Returns
pointer to leaf node container if found, null pointer otherwise.

Definition at line 105 of file octree2buf_base.hpp.

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
LeafContainerT* pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::findLeaf ( const OctreeKey key_arg) const
inlineprotected

Find leaf node.

Parameters
key_argoctree key addressing a leaf node.
Returns
pointer to leaf container. If leaf node is not found, this pointer returns 0.

Definition at line 507 of file octree2buf_base.h.

template<typename LeafContainerT , typename BranchContainerT >
void pcl::octree::Octree2BufBase< 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.

Note
If leaf node does not exist, a 0 pointer is returned.
Parameters
key_argreference to an octree key
depth_mask_argdepth mask used for octree key analysis and for branch depth indicator
branch_argcurrent branch node
result_argpointer to leaf container class

Definition at line 439 of file octree2buf_base.hpp.

References pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::buffer_selector_, pcl::octree::OctreeKey::getChildIdxWithDepthMask(), pcl::octree::BufferedBranchNode< ContainerT >::getChildPtr(), pcl::octree::OctreeLeafNode< ContainerT >::getContainerPtr(), and pcl::octree::BufferedBranchNode< ContainerT >::hasChild().

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
char pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::getBranchBitPattern ( const BranchNode branch_arg) const
inlineprotected

Generate bit pattern reflecting the existence of child node pointers for current buffer.

Parameters
branch_argreference to octree branch class
Returns
a single byte with 8 bits of child node information

Definition at line 598 of file octree2buf_base.h.

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

Referenced by pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::deserializeTreeRecursive(), pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::serializeTreeRecursive(), and pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::treeCleanUpRecursive().

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
char pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::getBranchBitPattern ( const BranchNode branch_arg,
unsigned char  bufferSelector_arg 
) const
inlineprotected

Generate bit pattern reflecting the existence of child node pointers in specific buffer.

Parameters
branch_argreference to octree branch class
bufferSelector_argbuffer selector
Returns
a single byte with 8 bits of child node information

Definition at line 619 of file octree2buf_base.h.

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

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
OctreeNode* pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::getBranchChildPtr ( const BranchNode branch_arg,
unsigned char  child_idx_arg 
) const
inlineprotected

Retrieve a child node pointer for child node at child_idx.

Parameters
branch_argreference to octree branch class
child_idx_argindex to child node
Returns
pointer to octree child node class

Definition at line 577 of file octree2buf_base.h.

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

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
std::size_t pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::getBranchCount ( ) const
inline

Return the amount of existing branches in the octree.

Returns
amount of branch nodes.

Definition at line 413 of file octree2buf_base.h.

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
char pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::getBranchXORBitPattern ( const BranchNode branch_arg) const
inlineprotected

Generate XOR bit pattern reflecting differences between the two octree buffers.

Parameters
branch_argreference to octree branch class
Returns
a single byte with 8 bits of child node XOR difference information

Definition at line 640 of file octree2buf_base.h.

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

Referenced by pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::treeCleanUpRecursive().

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
std::size_t pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::getLeafCount ( ) const
inline

Return the amount of existing leafs in the octree.

Returns
amount of registered leaf nodes.

Definition at line 405 of file octree2buf_base.h.

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
OctreeNode* pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::getRootNode ( ) const
inlineprotected

Retrieve root node.

Definition at line 497 of file octree2buf_base.h.

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
unsigned int pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::getTreeDepth ( ) const
inline

Get the maximum depth of the octree.

Returns
depth_arg: maximum depth of octree

Definition at line 360 of file octree2buf_base.h.

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
bool pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::hasBranchChanges ( const BranchNode branch_arg) const
inlineprotected

Test if branch changed between previous and current buffer.

Parameters
branch_argreference to octree branch class
Returns
"true", if child node information differs between current and previous octree buffer

Definition at line 665 of file octree2buf_base.h.

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
LeafNodeIterator pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::leaf_begin ( unsigned int  max_depth_arg = 0)
inline

Definition at line 258 of file octree2buf_base.h.

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
LeafNodeBreadthIterator pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::leaf_breadth_begin ( unsigned int  max_depth_arg = 0u)
inline

Definition at line 298 of file octree2buf_base.h.

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
const LeafNodeBreadthIterator pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::leaf_breadth_end ( )
inline

Definition at line 303 of file octree2buf_base.h.

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
LeafNodeDepthFirstIterator pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::leaf_depth_begin ( unsigned int  max_depth_arg = 0)
inline

Definition at line 272 of file octree2buf_base.h.

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
const LeafNodeDepthFirstIterator pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::leaf_depth_end ( )
inline

Definition at line 277 of file octree2buf_base.h.

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
const LeafNodeIterator pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::leaf_end ( )
inline

Definition at line 264 of file octree2buf_base.h.

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
double pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::Log2 ( double  n_arg)
inlineprotected

Helper function to calculate the binary logarithm.

Parameters
n_argsome value
Returns
binary logarithm (log2) of argument n_arg

Definition at line 896 of file octree2buf_base.h.

Referenced by pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::setMaxVoxelIndex().

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
bool pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::octreeCanResize ( )
inlineprotected

Test if octree is able to dynamically change its depth.

This is required for adaptive bounding box adjustment.

Returns
"false" - not resizeable due to XOR serialization

Definition at line 904 of file octree2buf_base.h.

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
Octree2BufBase& pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::operator= ( const Octree2BufBase< LeafContainerT, BranchContainerT > &  source)
inline
template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
void pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::printBinary ( char  data_arg)
inlineprotected

Prints binary representation of a byte - used for debugging.

Parameters
data_arg- byte to be printed to stdout

Definition at line 912 of file octree2buf_base.h.

template<typename LeafContainerT , typename BranchContainerT >
void pcl::octree::Octree2BufBase< 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).

Parameters
idx_x_argindex of leaf node in the X axis.
idx_y_argindex of leaf node in the Y axis.
idx_z_argindex of leaf node in the Z axis.

Definition at line 138 of file octree2buf_base.hpp.

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
void pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::removeLeaf ( const OctreeKey key_arg)
inlineprotected

Remove leaf node from octree.

Parameters
key_argoctree key addressing a leaf node.

Definition at line 544 of file octree2buf_base.h.

template<typename LeafContainerT , typename BranchContainerT >
void pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::serializeLeafs ( std::vector< LeafContainerT * > &  leaf_container_vector_arg)

Outputs a vector of all DataT elements that are stored within the octree leaf nodes.

Parameters
leaf_container_vector_argvector of pointers to all LeafContainerT objects in the octree

Definition at line 230 of file octree2buf_base.hpp.

References pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::leaf_count_, pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::root_node_, pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::serializeTreeRecursive(), and pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::tree_dirty_flag_.

template<typename LeafContainerT , typename BranchContainerT >
void pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::serializeNewLeafs ( std::vector< LeafContainerT * > &  leaf_container_vector_arg)
template<typename LeafContainerT , typename BranchContainerT >
void pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::serializeTree ( std::vector< char > &  binary_tree_out_arg,
bool  do_XOR_encoding_arg = false 
)

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

Parameters
binary_tree_out_argreference to output vector for writing binary tree structure.
do_XOR_encoding_argselect if binary tree structure should be generated based on current octree (false) of based on a XOR comparison between current and previous octree

Definition at line 192 of file octree2buf_base.hpp.

References pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::branch_count_, pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::root_node_, pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::serializeTreeRecursive(), and pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::tree_dirty_flag_.

template<typename LeafContainerT , typename BranchContainerT >
void pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::serializeTree ( std::vector< char > &  binary_tree_out_arg,
std::vector< LeafContainerT * > &  leaf_container_vector_arg,
bool  do_XOR_encoding_arg = false 
)

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

Parameters
binary_tree_out_argreference to output vector for writing binary tree structure.
leaf_container_vector_argpointer to all LeafContainerT objects in the octree
do_XOR_encoding_argselect if binary tree structure should be generated based on current octree (false) of based on a XOR comparison between current and previous octree

Definition at line 209 of file octree2buf_base.hpp.

References pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::branch_count_, pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::leaf_count_, pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::root_node_, pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::serializeTreeRecursive(), and pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::tree_dirty_flag_.

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
virtual void pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::serializeTreeCallback ( LeafContainerT &  ,
const OctreeKey  
)
inlineprotectedvirtual

Callback executed for every leaf node data during serialization.

Definition at line 870 of file octree2buf_base.h.

Referenced by pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::serializeTreeRecursive().

template<typename LeafContainerT , typename BranchContainerT >
void pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::serializeTreeRecursive ( BranchNode branch_arg,
OctreeKey key_arg,
std::vector< char > *  binary_tree_out_arg,
typename std::vector< LeafContainerT * > *  leaf_container_vector_arg,
bool  do_XOR_encoding_arg = false,
bool  new_leafs_filter_arg = false 
)
protected

Recursively explore the octree and output binary octree description together with a vector of leaf node DataT content.

Parameters
branch_argcurrent branch node
key_argreference to an octree key
binary_tree_out_argbinary output vector
leaf_container_vector_argvector to return pointers to all leaf container in the tree.
do_XOR_encoding_argselect if binary tree structure should be generated based on current octree (false) of based on a XOR comparison between current and previous octree
new_leafs_filter_argexecute callback only for leaf nodes that did not exist in preceding buffer

Definition at line 530 of file octree2buf_base.hpp.

References pcl::octree::BRANCH_NODE, pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::buffer_selector_, pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::deleteBranchChild(), pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::getBranchBitPattern(), pcl::octree::BufferedBranchNode< ContainerT >::getChildPtr(), pcl::octree::OctreeLeafNode< ContainerT >::getContainerPtr(), pcl::octree::OctreeNode::getNodeType(), pcl::octree::BufferedBranchNode< ContainerT >::hasChild(), pcl::octree::LEAF_NODE, pcl::octree::OctreeKey::popBranch(), pcl::octree::OctreeKey::pushBranch(), and pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::serializeTreeCallback().

Referenced by pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::serializeLeafs(), pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::serializeNewLeafs(), and pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::serializeTree().

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
void pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::setBranchChildPtr ( BranchNode branch_arg,
unsigned char  child_idx_arg,
OctreeNode new_child_arg 
)
inlineprotected

Assign new child node to branch.

Parameters
branch_argreference to octree branch class
child_idx_argindex to child node
new_child_argpointer to new child node

Definition at line 589 of file octree2buf_base.h.

References pcl::octree::BufferedBranchNode< ContainerT >::setChildPtr().

template<typename LeafContainerT , typename BranchContainerT >
void pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::setMaxVoxelIndex ( unsigned int  max_voxel_index_arg)

Set the maximum amount of voxels per dimension.

Parameters
max_voxel_index_argmaximum amount of voxels per dimension

Definition at line 72 of file octree2buf_base.hpp.

References pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::depth_mask_, pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::Log2(), and pcl::octree::OctreeKey::maxDepth.

template<typename LeafContainerT , typename BranchContainerT >
void pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::setTreeDepth ( unsigned int  depth_arg)
template<typename LeafContainerT , typename BranchContainerT >
void pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::switchBuffers ( )
template<typename LeafContainerT , typename BranchContainerT >
void pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::treeCleanUpRecursive ( BranchNode branch_arg)
protected

Friends And Related Function Documentation

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
friend class OctreeBreadthFirstIterator< OctreeT >
friend

Definition at line 234 of file octree2buf_base.h.

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
friend class OctreeDepthFirstIterator< OctreeT >
friend

Definition at line 233 of file octree2buf_base.h.

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
friend class OctreeIteratorBase< OctreeT >
friend

Definition at line 232 of file octree2buf_base.h.

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
friend class OctreeLeafNodeBreadthFirstIterator< OctreeT >
friend

Definition at line 236 of file octree2buf_base.h.

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
friend class OctreeLeafNodeDepthFirstIterator< OctreeT >
friend

Definition at line 235 of file octree2buf_base.h.

Member Data Documentation

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
std::size_t pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::branch_count_
protected
template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
unsigned char pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::buffer_selector_
protected
template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
unsigned int pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::depth_mask_
protected
template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
bool pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::dynamic_depth_enabled_
protected

Enable dynamic_depth.

Note
Note that this parameter is ignored in octree2buf!

Definition at line 955 of file octree2buf_base.h.

Referenced by pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::operator=().

template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
std::size_t pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::leaf_count_
protected
template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
OctreeKey pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::max_key_
protected
template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
unsigned int pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::octree_depth_
protected
template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
BranchNode* pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::root_node_
protected
template<typename LeafContainerT = int, typename BranchContainerT = OctreeContainerEmpty>
bool pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::tree_dirty_flag_
protected

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