Octree double buffer class More...
#include <pcl/octree/octree2buf_base.h>
Classes | |
class | OctreeBranch |
Octree branch class. More... | |
class | OctreeKey |
Octree key class More... | |
Public Member Functions | |
Octree2BufBase () | |
Empty constructor. | |
virtual | ~Octree2BufBase () |
Empty deconstructor. | |
void | setMaxVoxelIndex (unsigned int maxVoxelIndex_arg) |
Set the maximum amount of voxels per dimension. | |
void | setTreeDepth (unsigned int depth_arg) |
Set the maximum depth of the octree. | |
unsigned int | getTreeDepth () |
Get the maximum depth of the octree. | |
void | add (const unsigned int idxX_arg, const unsigned int idxY_arg, const unsigned int idxZ_arg, const DataT &data_arg) |
Add a const DataT element to leaf node at (idxX, idxY, idxZ). | |
bool | get (const unsigned int idxX_arg, const unsigned int idxY_arg, const unsigned int idxZ_arg, DataT &data_arg) const |
Retrieve a DataT element from leaf node at (idxX, idxY, idxZ). | |
bool | existLeaf (const unsigned int idxX_arg, const unsigned int idxY_arg, const unsigned int idxZ_arg) const |
Check for the existence of leaf node at (idxX, idxY, idxZ). | |
void | removeLeaf (const unsigned int idxX_arg, const unsigned int idxY_arg, const unsigned int idxZ_arg) |
Remove leaf node at (idxX_arg, idxY_arg, idxZ_arg). | |
unsigned int | getLeafCount () const |
Return the amount of existing leafs in the octree. | |
unsigned int | getBranchCount () const |
Return the amount of existing branches in the octree. | |
void | deleteTree (bool freeMemory_arg=false) |
Delete the octree structure and its leaf nodes. | |
void | deletePreviousBuffer () |
Delete octree structure of previous buffer. | |
void | switchBuffers () |
Switch buffers and reset current octree structure. | |
void | serializeTree (std::vector< char > &binaryTreeOut_arg, bool doXOREncoding_arg=false) |
Serialize octree into a binary output vector describing its branch node structure. | |
void | serializeTree (std::vector< char > &binaryTreeOut_arg, std::vector< DataT > &dataVector_arg, bool doXOREncoding_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. | |
void | serializeLeafs (std::vector< DataT > &dataVector_arg) |
Outputs a vector of all DataT elements that are stored within the octree leaf nodes. | |
void | serializeNewLeafs (std::vector< DataT > &dataVector_arg, const int minPointsPerLeaf_arg=0) |
Outputs a vector of all DataT elements from leaf nodes, that do not exist in the previous octree buffer. | |
void | deserializeTree (std::vector< char > &binaryTreeIn_arg, bool doXORDecoding_arg=false) |
Deserialize a binary octree description vector and create a corresponding octree structure. | |
void | deserializeTree (std::vector< char > &binaryTreeIn_arg, std::vector< DataT > &dataVector_arg, bool doXORDecoding_arg=false) |
Deserialize a binary octree description and create a corresponding octree structure. | |
void | deserializeTreeAndOutputLeafData (std::vector< char > &binaryTreeIn_arg, std::vector< DataT > &dataVector_arg, bool doXORDecoding_arg=false) |
Deserialize a binary octree description vector and create a corresponding octree structure. | |
Protected Types | |
typedef LeafT | OctreeLeaf |
Protected Member Functions | |
virtual bool | genOctreeKeyForDataT (const DataT &data_arg, OctreeKey &key_arg) const |
Virtual method for generating an octree key for a given DataT object. | |
virtual bool | genDataTByOctreeKey (const OctreeKey &key_arg, DataT &data_arg) const |
Virtual method for initializing new leaf node during deserialization (in case no DataT information is provided). | |
void | genOctreeKeyByIntIdx (const unsigned int idxX_arg, const unsigned int idxY_arg, const unsigned int idxZ_arg, OctreeKey &key_arg) const |
Generate an octree key. | |
void | add (const OctreeKey &key_arg, const DataT &data_arg) |
Add DataT object to leaf node at octree key. | |
LeafT * | findLeaf (const OctreeKey &key_arg) const |
Find leaf node. | |
LeafT * | getLeaf (const OctreeKey &key_arg) |
Get a leaf node from octree. | |
bool | existLeaf (const OctreeKey &key_arg) const |
Check for leaf not existance in the octree. | |
void | removeLeaf (const OctreeKey &key_arg) |
Remove leaf node from octree. | |
const OctreeNode * | getBranchChild (const OctreeBranch &branch_arg, const unsigned char childIdx_arg) const |
Retrieve a child node pointer for child node at childIdx for current octree buffer. | |
const OctreeNode * | getBranchChild (const OctreeBranch &branch_arg, const unsigned char bufferSelector_arg, const unsigned char childIdx_arg) const |
Retrieve a child node pointer for child node at childIdx in specific octree buffer. | |
bool | branchHasChild (const OctreeBranch &branch_arg, const unsigned char childIdx_arg) const |
Check if branch is pointing to a particular child node for current octree buffer. | |
bool | branchHasChild (const OctreeBranch &branch_arg, const unsigned char bufferSelector_arg, const unsigned char childIdx_arg) const |
Check if branch is pointing to a particular child node in specific octree buffer. | |
char | getBranchBitPattern (const OctreeBranch &branch_arg) const |
Generate bit pattern reflecting the existence of child node pointers for current buffer. | |
char | getBranchBitPattern (const OctreeBranch &branch_arg, const unsigned char bufferSelector_arg) const |
Generate bit pattern reflecting the existence of child node pointers in specific buffer. | |
char | getBranchXORBitPattern (const OctreeBranch &branch_arg) const |
Generate XOR bit pattern reflecting differences between the two octree buffers. | |
bool | hasBranchChanges (const OctreeBranch &branch_arg) const |
Test if branch changed between previous and current buffer. | |
void | setBranchChild (OctreeBranch &branch_arg, const unsigned char childIdx_arg, const OctreeNode *newChild_arg) |
Assign new child node to branch for current buffer. | |
void | setBranchChild (OctreeBranch &branch_arg, const unsigned char bufferSelector_arg, const unsigned char childIdx_arg, const OctreeNode *newChild_arg) |
Assign new child node to branch in specific buffer. | |
void | deleteBranchChild (OctreeBranch &branch_arg, const unsigned char childIdx_arg) |
Delete child node and all its subchilds from octree in current buffer. | |
void | deleteBranchChild (OctreeBranch &branch_arg, const unsigned char bufferSelector_arg, const unsigned char childIdx_arg) |
Delete child node and all its subchilds from octree in specific buffer. | |
void | deleteBranch (OctreeBranch &branch_arg) |
Delete branch and all its subchilds from octree (both buffers). | |
void | createBranchChild (OctreeBranch &branch_arg, const unsigned char childIdx_arg, OctreeBranch *&newBranchChild_arg) |
Fetch and add a new branch child to a branch class in current buffer. | |
void | createBranch (OctreeBranch *&newBranchChild_arg) |
Return a new branch class and receive a pointer to it. | |
void | createLeafChild (OctreeBranch &branch_arg, const unsigned char childIdx_arg, OctreeLeaf *&newLeafChild_arg) |
Fetch and add a new leaf child to a branch class. | |
void | branchReset (OctreeBranch &branch_arg) |
Reset branch class. | |
void | poolCleanUp () |
Delete all branch nodes and leaf nodes from octree node pools. | |
LeafT * | getLeafRecursive (const OctreeKey &key_arg, const unsigned int depthMask_arg, OctreeBranch *branch_arg, bool branchReset_arg) |
Recursively search for a leaf node at octree key. | |
LeafT * | findLeafRecursive (const OctreeKey &key_arg, const unsigned int depthMask_arg, OctreeBranch *branch_arg) const |
Recursively search for a given leaf node and return a pointer. | |
bool | deleteLeafRecursive (const OctreeKey &key_arg, const unsigned int depthMask_arg, OctreeBranch *branch_arg) |
Recursively search and delete leaf node. | |
void | serializeTreeRecursive (std::vector< char > &binaryTreeOut_arg, OctreeBranch *branch_arg, const OctreeKey &key_arg, bool doXOREncoding_arg) |
Recursively explore the octree and output binary octree description. | |
void | serializeTreeRecursive (std::vector< char > &binaryTreeOut_arg, OctreeBranch *branch_arg, const OctreeKey &key_arg, typename std::vector< DataT > &dataVector_arg, bool doXOREncoding_arg) |
Recursively explore the octree and output binary octree description together with a vector of leaf node DataT content. | |
void | serializeLeafsRecursive (OctreeBranch *branch_arg, const OctreeKey &key_arg, typename std::vector< DataT > &dataVector_arg) |
Recursively explore the octree and output DataT objects to DataT vector. | |
void | serializeNewLeafsRecursive (OctreeBranch *branch_arg, const OctreeKey &key_arg, std::vector< DataT > &dataVector_arg, const int minPointsPerLeaf_arg=0) |
Recursively explore the octree and output DataT objects of leafs that do not exist in previous buffer. | |
void | deserializeTreeRecursive (typename std::vector< char >::const_iterator &binaryTreeIn_arg, OctreeBranch *branch_arg, const unsigned int depthMask_arg, const OctreeKey &key_arg, bool branchReset_arg, bool doXORDecoding_arg) |
Rebuild an octree based on binary XOR octree description. | |
void | deserializeTreeRecursive (typename std::vector< char >::const_iterator &binaryTreeIn_arg, OctreeBranch *branch_arg, const unsigned int depthMask_arg, const OctreeKey &key_arg, typename std::vector< DataT >::const_iterator &dataVectorIterator_arg, typename std::vector< DataT >::const_iterator &dataVectorEndIterator_arg, bool branchReset_arg, bool doXORDecoding_arg) |
Rebuild an octree based on binary XOR octree description and DataT objects for leaf node initialization. | |
void | deserializeTreeAndOutputLeafDataRecursive (typename std::vector< char >::const_iterator &binaryTreeIn_arg, OctreeBranch *branch_arg, const unsigned int depthMask_arg, const OctreeKey &key_arg, typename std::vector< DataT > &dataVector_arg, bool branchReset_arg, bool doXORDecoding_arg) |
Rebuild an octree based on binary octree description and output generated DataT objects. | |
virtual void | serializeLeafCallback (OctreeLeaf &leaf_arg, const OctreeKey &key_arg) |
Decode leaf node data during serialization. | |
virtual void | serializeLeafCallback (OctreeLeaf &leaf_arg, const OctreeKey &key_arg, std::vector< DataT > &dataVector_arg) |
Decode leaf node data during serialization. | |
virtual void | serializeNewLeafCallback (OctreeLeaf &leaf_arg, const OctreeKey &key_arg, const int minPointsPerLeaf_arg, std::vector< DataT > &dataVector_arg) |
Decode new leaf node data of during serialization. | |
virtual void | deserializeLeafCallback (OctreeLeaf &leaf_arg, const OctreeKey &key_arg) |
Initialize leaf nodes during deserialization. | |
virtual void | deserializeLeafCallback (OctreeLeaf &leaf_arg, const OctreeKey &key_arg, typename std::vector< DataT >::const_iterator &dataVectorIterator_arg, typename std::vector< DataT >::const_iterator &dataVectorEndIterator_arg) |
Initialize leaf nodes during deserialization. | |
virtual void | deserializeTreeAndSerializeLeafCallback (OctreeLeaf &leaf_arg, const OctreeKey &key_arg, std::vector< DataT > &dataVector_arg) |
Initialize leaf nodes during deserialization. | |
void | treeCleanUpRecursive (OctreeBranch *branch_arg) |
Recursively explore the octree and remove unused branch and leaf nodes. | |
double | Log2 (double n_arg) |
Helper function to calculate the binary logarithm. | |
bool | octreeCanResize () |
Test if octree is able to dynamically change its depth. | |
Protected Attributes | |
unsigned int | leafCount_ |
Amount of leaf nodes. | |
unsigned int | branchCount_ |
Amount of branch nodes. | |
unsigned int | objectCount_ |
Amount of objects assigned to leaf nodes. | |
OctreeBranch * | rootNode_ |
Pointer to root branch node of octree. | |
unsigned int | depthMask_ |
Depth mask based on octree depth. | |
std::vector< OctreeBranch * > | unusedBranchesPool_ |
Vector pools of unused branch nodes. | |
std::vector< LeafT * > | unusedLeafsPool_ |
Vector pools of unused leaf nodes. | |
unsigned char | bufferSelector_ |
Currently active octree buffer. | |
bool | resetTree_ |
bool | treeDirtyFlag_ |
unsigned int | octreeDepth_ |
Octree depth. |
Octree double buffer class
Definition at line 57 of file octree2buf_base.h.
typedef LeafT pcl::octree::Octree2BufBase< DataT, LeafT >::OctreeLeaf [protected] |
Reimplemented in pcl::octree::OctreePointCloud< PointT, LeafT, Octree2BufBase< int, LeafT > >.
Definition at line 269 of file octree2buf_base.h.
pcl::octree::Octree2BufBase< DataT, LeafT >::Octree2BufBase | ( | ) |
Empty constructor.
Definition at line 49 of file octree2buf_base.hpp.
pcl::octree::Octree2BufBase< DataT, LeafT >::~Octree2BufBase | ( | ) | [virtual] |
Empty deconstructor.
Definition at line 66 of file octree2buf_base.hpp.
void pcl::octree::Octree2BufBase< DataT, LeafT >::add | ( | const unsigned int | idxX_arg, | |
const unsigned int | idxY_arg, | |||
const unsigned int | idxZ_arg, | |||
const DataT & | data_arg | |||
) |
Add a const DataT element to leaf node at (idxX, idxY, idxZ).
If leaf node does not exist, it is added to the octree.
idxX_arg,: | index of leaf node in the X axis. | |
idxY_arg,: | index of leaf node in the Y axis. | |
idxZ_arg,: | index of leaf node in the Z axis. | |
data_arg,: | const reference to DataT object that is fed to the lead node. |
Definition at line 111 of file octree2buf_base.hpp.
void pcl::octree::Octree2BufBase< DataT, LeafT >::add | ( | const OctreeKey & | key_arg, | |
const DataT & | data_arg | |||
) | [inline, protected] |
Add DataT object to leaf node at octree key.
key_arg,: | octree key addressing a leaf node. | |
data_arg,: | DataT object to be added. |
Definition at line 321 of file octree2buf_base.h.
bool pcl::octree::Octree2BufBase< DataT, LeafT >::branchHasChild | ( | const OctreeBranch & | branch_arg, | |
const unsigned char | childIdx_arg | |||
) | const [inline, protected] |
Check if branch is pointing to a particular child node for current octree buffer.
branch_arg,: | reference to octree branch class | |
childIdx_arg,: | index to child node |
Definition at line 420 of file octree2buf_base.h.
bool pcl::octree::Octree2BufBase< DataT, LeafT >::branchHasChild | ( | const OctreeBranch & | branch_arg, | |
const unsigned char | bufferSelector_arg, | |||
const unsigned char | childIdx_arg | |||
) | const [inline, protected] |
Check if branch is pointing to a particular child node in specific octree buffer.
branch_arg,: | reference to octree branch class | |
bufferSelector_arg,: | buffer selector | |
childIdx_arg,: | index to child node |
Definition at line 432 of file octree2buf_base.h.
void pcl::octree::Octree2BufBase< DataT, LeafT >::branchReset | ( | OctreeBranch & | branch_arg | ) | [inline, protected] |
Reset branch class.
branch_arg,: | reference to octree branch class |
Definition at line 712 of file octree2buf_base.h.
void pcl::octree::Octree2BufBase< DataT, LeafT >::createBranch | ( | OctreeBranch *& | newBranchChild_arg | ) | [inline, protected] |
Return a new branch class and receive a pointer to it.
newBranchChild_arg,: | writes a pointer of new branch child to this reference |
Definition at line 664 of file octree2buf_base.h.
void pcl::octree::Octree2BufBase< DataT, LeafT >::createBranchChild | ( | OctreeBranch & | branch_arg, | |
const unsigned char | childIdx_arg, | |||
OctreeBranch *& | newBranchChild_arg | |||
) | [inline, protected] |
Fetch and add a new branch child to a branch class in current buffer.
branch_arg,: | reference to octree branch class | |
childIdx_arg,: | index to child node | |
newBranchChild_arg,: | write a pointer of new branch child to this reference |
Definition at line 643 of file octree2buf_base.h.
void pcl::octree::Octree2BufBase< DataT, LeafT >::createLeafChild | ( | OctreeBranch & | branch_arg, | |
const unsigned char | childIdx_arg, | |||
OctreeLeaf *& | newLeafChild_arg | |||
) | [inline, protected] |
Fetch and add a new leaf child to a branch class.
branch_arg,: | reference to octree branch class | |
childIdx_arg,: | index to child node | |
newLeafChild_arg,: | writes a pointer of new leaf child to this reference |
Definition at line 688 of file octree2buf_base.h.
void pcl::octree::Octree2BufBase< DataT, LeafT >::deleteBranch | ( | OctreeBranch & | branch_arg | ) | [inline, protected] |
Delete branch and all its subchilds from octree (both buffers).
branch_arg,: | reference to octree branch class |
Definition at line 611 of file octree2buf_base.h.
void pcl::octree::Octree2BufBase< DataT, LeafT >::deleteBranchChild | ( | OctreeBranch & | branch_arg, | |
const unsigned char | childIdx_arg | |||
) | [inline, protected] |
Delete child node and all its subchilds from octree in current buffer.
branch_arg,: | reference to octree branch class | |
childIdx_arg,: | index to child node |
Definition at line 541 of file octree2buf_base.h.
void pcl::octree::Octree2BufBase< DataT, LeafT >::deleteBranchChild | ( | OctreeBranch & | branch_arg, | |
const unsigned char | bufferSelector_arg, | |||
const unsigned char | childIdx_arg | |||
) | [inline, protected] |
Delete child node and all its subchilds from octree in specific buffer.
branch_arg,: | reference to octree branch class | |
bufferSelector_arg,: | buffer selector | |
childIdx_arg,: | index to child node |
Definition at line 576 of file octree2buf_base.h.
bool pcl::octree::Octree2BufBase< DataT, LeafT >::deleteLeafRecursive | ( | const OctreeKey & | key_arg, | |
const unsigned int | depthMask_arg, | |||
OctreeBranch * | branch_arg | |||
) | [protected] |
Recursively search and delete leaf node.
key_arg,: | reference to an octree key | |
depthMask_arg,: | depth mask used for octree key analysis and branch depth indicator | |
branch_arg,: | current branch node |
Definition at line 558 of file octree2buf_base.hpp.
void pcl::octree::Octree2BufBase< DataT, LeafT >::deletePreviousBuffer | ( | ) | [inline] |
Delete octree structure of previous buffer.
Definition at line 139 of file octree2buf_base.h.
void pcl::octree::Octree2BufBase< DataT, LeafT >::deleteTree | ( | bool | freeMemory_arg = false |
) |
Delete the octree structure and its leaf nodes.
freeMemory_arg,: | if "true", allocated octree nodes are deleted, otherwise they are pushed to the octree node pool |
Definition at line 184 of file octree2buf_base.hpp.
void pcl::octree::Octree2BufBase< DataT, LeafT >::deserializeLeafCallback | ( | OctreeLeaf & | leaf_arg, | |
const OctreeKey & | key_arg | |||
) | [protected, virtual] |
Initialize leaf nodes during deserialization.
leaf_arg,: | reference to new leaf node | |
key_arg,: | octree key of new leaf node |
Definition at line 1409 of file octree2buf_base.hpp.
void pcl::octree::Octree2BufBase< DataT, LeafT >::deserializeLeafCallback | ( | OctreeLeaf & | leaf_arg, | |
const OctreeKey & | key_arg, | |||
typename std::vector< DataT >::const_iterator & | dataVectorIterator_arg, | |||
typename std::vector< DataT >::const_iterator & | dataVectorEndIterator_arg | |||
) | [protected, virtual] |
Initialize leaf nodes during deserialization.
leaf_arg,: | reference to new leaf node | |
key_arg,: | octree key of new leaf node | |
dataVectorIterator_arg,: | iterator pointing to current DataT object to be added to the new leaf node | |
dataVectorEndIterator_arg,: | iterator pointing to last object in DataT input vector. |
Definition at line 1380 of file octree2buf_base.hpp.
void pcl::octree::Octree2BufBase< DataT, LeafT >::deserializeTree | ( | std::vector< char > & | binaryTreeIn_arg, | |
bool | doXORDecoding_arg = false | |||
) |
Deserialize a binary octree description vector and create a corresponding octree structure.
Leaf nodes are initialized with getDataTByKey(..).
binaryTreeIn_arg,: | reference to input vector for reading binary tree structure. | |
doXORDecoding_arg,: | select if binary tree structure is based on current octree (false) of based on a XOR comparison between current and previous octree |
Definition at line 294 of file octree2buf_base.hpp.
void pcl::octree::Octree2BufBase< DataT, LeafT >::deserializeTree | ( | std::vector< char > & | binaryTreeIn_arg, | |
std::vector< DataT > & | dataVector_arg, | |||
bool | doXORDecoding_arg = false | |||
) |
Deserialize a binary octree description and create a corresponding octree structure.
Leaf nodes are initialized with DataT elements from the dataVector.
binaryTreeIn_arg,: | reference to inpvectoream for reading binary tree structure. | |
dataVector_arg,: | reference to DataT vector that provides DataT objects for initializing leaf nodes. | |
doXORDecoding_arg,: | select if binary tree structure is based on current octree (false) of based on a XOR comparison between current and previous octree |
Definition at line 318 of file octree2buf_base.hpp.
void pcl::octree::Octree2BufBase< DataT, LeafT >::deserializeTreeAndOutputLeafData | ( | std::vector< char > & | binaryTreeIn_arg, | |
std::vector< DataT > & | dataVector_arg, | |||
bool | doXORDecoding_arg = false | |||
) |
Deserialize a binary octree description vector and create a corresponding octree structure.
Leaf nodes are initialized with getDataTByKey(..). Generated DataT objects are copied to output vector.
binaryTreeIn_arg,: | reference to input vector for reading binary tree structure. | |
dataVector_arg,: | reference to DataT vector that receives a copy of generated DataT objects. | |
doXORDecoding_arg,: | select if binary tree structure is based on current octree (false) of based on a XOR comparison between current and previous octree |
Definition at line 349 of file octree2buf_base.hpp.
void pcl::octree::Octree2BufBase< DataT, LeafT >::deserializeTreeAndOutputLeafDataRecursive | ( | typename std::vector< char >::const_iterator & | binaryTreeIn_arg, | |
OctreeBranch * | branch_arg, | |||
const unsigned int | depthMask_arg, | |||
const OctreeKey & | key_arg, | |||
typename std::vector< DataT > & | dataVector_arg, | |||
bool | branchReset_arg, | |||
bool | doXORDecoding_arg | |||
) | [protected] |
Rebuild an octree based on binary octree description and output generated DataT objects.
binaryTreeIn_arg,: | iterator to input vector | |
branch_arg,: | current branch node | |
depthMask_arg,: | depth mask used for octree key analysis and branch depth indicator | |
key_arg,: | reference to an octree key | |
dataVector_arg,: | reference to DataT vector that receives a copy of generated DataT objects. | |
branchReset_arg,: | Reset pointer array of current branch | |
doXORDecoding_arg,: | select if binary tree structure is based on current octree (false) of based on a XOR comparison between current and previous octree |
Definition at line 1196 of file octree2buf_base.hpp.
void pcl::octree::Octree2BufBase< DataT, LeafT >::deserializeTreeAndSerializeLeafCallback | ( | OctreeLeaf & | leaf_arg, | |
const OctreeKey & | key_arg, | |||
std::vector< DataT > & | dataVector_arg | |||
) | [protected, virtual] |
Initialize leaf nodes during deserialization.
leaf_arg,: | reference to new leaf node | |
key_arg,: | octree key of new leaf node | |
dataVector_arg,: | generated DataT objects are pushed to this DataT vector |
Definition at line 1425 of file octree2buf_base.hpp.
void pcl::octree::Octree2BufBase< DataT, LeafT >::deserializeTreeRecursive | ( | typename std::vector< char >::const_iterator & | binaryTreeIn_arg, | |
OctreeBranch * | branch_arg, | |||
const unsigned int | depthMask_arg, | |||
const OctreeKey & | key_arg, | |||
bool | branchReset_arg, | |||
bool | doXORDecoding_arg | |||
) | [protected] |
Rebuild an octree based on binary XOR octree description.
binaryTreeIn_arg,: | iterator to input vector | |
branch_arg,: | current branch node | |
depthMask_arg,: | depth mask used for octree key analysis and branch depth indicator | |
key_arg,: | reference to an octree key | |
branchReset_arg,: | Reset pointer array of current branch | |
doXORDecoding_arg,: | select if binary tree structure is based on current octree (false) of based on a XOR comparison between current and previous octree |
Definition at line 919 of file octree2buf_base.hpp.
void pcl::octree::Octree2BufBase< DataT, LeafT >::deserializeTreeRecursive | ( | typename std::vector< char >::const_iterator & | binaryTreeIn_arg, | |
OctreeBranch * | branch_arg, | |||
const unsigned int | depthMask_arg, | |||
const OctreeKey & | key_arg, | |||
typename std::vector< DataT >::const_iterator & | dataVectorIterator_arg, | |||
typename std::vector< DataT >::const_iterator & | dataVectorEndIterator_arg, | |||
bool | branchReset_arg, | |||
bool | doXORDecoding_arg | |||
) | [protected] |
Rebuild an octree based on binary XOR octree description and DataT objects for leaf node initialization.
binaryTreeIn_arg,: | iterator to input vector | |
branch_arg,: | current branch node | |
depthMask_arg,: | depth mask used for octree key analysis and branch depth indicator | |
key_arg,: | reference to an octree key | |
dataVectorIterator_arg,: | iterator pointing to current DataT object to be added to a leaf node | |
dataVectorEndIterator_arg,: | iterator pointing to last object in DataT input vector. | |
branchReset_arg,: | Reset pointer array of current branch | |
doXORDecoding_arg,: | select if binary tree structure is based on current octree (false) of based on a XOR comparison between current and previous octree |
Definition at line 1057 of file octree2buf_base.hpp.
bool pcl::octree::Octree2BufBase< DataT, LeafT >::existLeaf | ( | const unsigned int | idxX_arg, | |
const unsigned int | idxY_arg, | |||
const unsigned int | idxZ_arg | |||
) | const |
Check for the existence of leaf node at (idxX, idxY, idxZ).
idxX_arg,: | index of leaf node in the X axis. | |
idxY_arg,: | index of leaf node in the Y axis. | |
idxZ_arg,: | index of leaf node in the Z axis. |
Definition at line 154 of file octree2buf_base.hpp.
bool pcl::octree::Octree2BufBase< DataT, LeafT >::existLeaf | ( | const OctreeKey & | key_arg | ) | const [inline, protected] |
Check for leaf not existance in the octree.
key_arg,: | octree key addressing a leaf node. |
Definition at line 368 of file octree2buf_base.h.
LeafT* pcl::octree::Octree2BufBase< DataT, LeafT >::findLeaf | ( | const OctreeKey & | key_arg | ) | const [inline, protected] |
Find leaf node.
key_arg,: | octree key addressing a leaf node. |
Definition at line 339 of file octree2buf_base.h.
LeafT * pcl::octree::Octree2BufBase< DataT, LeafT >::findLeafRecursive | ( | const OctreeKey & | key_arg, | |
const unsigned int | depthMask_arg, | |||
OctreeBranch * | branch_arg | |||
) | const [protected] |
Recursively search for a given leaf node and return a pointer.
key_arg,: | reference to an octree key | |
depthMask_arg,: | depth mask used for octree key analysis and for branch depth indicator | |
branch_arg,: | current branch node |
Definition at line 516 of file octree2buf_base.hpp.
virtual bool pcl::octree::Octree2BufBase< DataT, LeafT >::genDataTByOctreeKey | ( | const OctreeKey & | key_arg, | |
DataT & | data_arg | |||
) | const [inline, protected, virtual] |
Virtual method for initializing new leaf node during deserialization (in case no DataT information is provided).
key_arg,: | write generated octree key to this octree key reference | |
data_arg,: | generated DataT object |
Definition at line 294 of file octree2buf_base.h.
void pcl::octree::Octree2BufBase< DataT, LeafT >::genOctreeKeyByIntIdx | ( | const unsigned int | idxX_arg, | |
const unsigned int | idxY_arg, | |||
const unsigned int | idxZ_arg, | |||
OctreeKey & | key_arg | |||
) | const [inline, protected] |
Generate an octree key.
idxX_arg,: | index of leaf node in the X axis. | |
idxY_arg,: | index of leaf node in the Y axis. | |
idxZ_arg,: | index of leaf node in the Z axis. | |
key_arg,: | write new octree key to this reference. |
Definition at line 307 of file octree2buf_base.h.
virtual bool pcl::octree::Octree2BufBase< DataT, LeafT >::genOctreeKeyForDataT | ( | const DataT & | data_arg, | |
OctreeKey & | key_arg | |||
) | const [inline, protected, virtual] |
Virtual method for generating an octree key for a given DataT object.
data_arg,: | reference to DataT object | |
key_arg,: | write generated octree key to this octree key reference |
Definition at line 282 of file octree2buf_base.h.
bool pcl::octree::Octree2BufBase< DataT, LeafT >::get | ( | const unsigned int | idxX_arg, | |
const unsigned int | idxY_arg, | |||
const unsigned int | idxZ_arg, | |||
DataT & | data_arg | |||
) | const |
Retrieve a DataT element from leaf node at (idxX, idxY, idxZ).
It returns false if leaf node does not exist.
idxX_arg,: | index of leaf node in the X axis. | |
idxY_arg,: | index of leaf node in the Y axis. | |
idxZ_arg,: | index of leaf node in the Z axis. | |
data_arg,: | reference to DataT object that contains content of leaf node if search was successful. |
Definition at line 129 of file octree2buf_base.hpp.
char pcl::octree::Octree2BufBase< DataT, LeafT >::getBranchBitPattern | ( | const OctreeBranch & | branch_arg | ) | const [inline, protected] |
Generate bit pattern reflecting the existence of child node pointers for current buffer.
branch_arg,: | reference to octree branch class |
Definition at line 444 of file octree2buf_base.h.
char pcl::octree::Octree2BufBase< DataT, LeafT >::getBranchBitPattern | ( | const OctreeBranch & | branch_arg, | |
const unsigned char | bufferSelector_arg | |||
) | const [inline, protected] |
Generate bit pattern reflecting the existence of child node pointers in specific buffer.
branch_arg,: | reference to octree branch class | |
bufferSelector_arg,: | buffer selector |
Definition at line 465 of file octree2buf_base.h.
const OctreeNode* pcl::octree::Octree2BufBase< DataT, LeafT >::getBranchChild | ( | const OctreeBranch & | branch_arg, | |
const unsigned char | bufferSelector_arg, | |||
const unsigned char | childIdx_arg | |||
) | const [inline, protected] |
Retrieve a child node pointer for child node at childIdx in specific octree buffer.
branch_arg,: | reference to octree branch class | |
bufferSelector_arg,: | buffer selector | |
childIdx_arg,: | index to child node |
Definition at line 408 of file octree2buf_base.h.
const OctreeNode* pcl::octree::Octree2BufBase< DataT, LeafT >::getBranchChild | ( | const OctreeBranch & | branch_arg, | |
const unsigned char | childIdx_arg | |||
) | const [inline, protected] |
Retrieve a child node pointer for child node at childIdx for current octree buffer.
branch_arg,: | reference to octree branch class | |
childIdx_arg,: | index to child node |
Definition at line 396 of file octree2buf_base.h.
unsigned int pcl::octree::Octree2BufBase< DataT, LeafT >::getBranchCount | ( | ) | const [inline] |
Return the amount of existing branches in the octree.
Definition at line 126 of file octree2buf_base.h.
char pcl::octree::Octree2BufBase< DataT, LeafT >::getBranchXORBitPattern | ( | const OctreeBranch & | branch_arg | ) | const [inline, protected] |
Generate XOR bit pattern reflecting differences between the two octree buffers.
branch_arg,: | reference to octree branch class |
Definition at line 485 of file octree2buf_base.h.
LeafT* pcl::octree::Octree2BufBase< DataT, LeafT >::getLeaf | ( | const OctreeKey & | key_arg | ) | [inline, protected] |
Get a leaf node from octree.
key_arg,: | octree key addressing a leaf node. |
Definition at line 350 of file octree2buf_base.h.
unsigned int pcl::octree::Octree2BufBase< DataT, LeafT >::getLeafCount | ( | ) | const [inline] |
Return the amount of existing leafs in the octree.
Definition at line 117 of file octree2buf_base.h.
LeafT * pcl::octree::Octree2BufBase< DataT, LeafT >::getLeafRecursive | ( | const OctreeKey & | key_arg, | |
const unsigned int | depthMask_arg, | |||
OctreeBranch * | branch_arg, | |||
bool | branchReset_arg | |||
) | [protected] |
Recursively search for a leaf node at octree key.
If leaf node does not exist, it will be created.
key_arg,: | reference to an octree key | |
depthMask_arg,: | depth mask used for octree key analysis and for branch depth indicator | |
branch_arg,: | current branch node | |
branchReset_arg,: | Reset pointer array of current branch |
Definition at line 396 of file octree2buf_base.hpp.
unsigned int pcl::octree::Octree2BufBase< DataT, LeafT >::getTreeDepth | ( | ) | [inline] |
Get the maximum depth of the octree.
Definition at line 71 of file octree2buf_base.h.
bool pcl::octree::Octree2BufBase< DataT, LeafT >::hasBranchChanges | ( | const OctreeBranch & | branch_arg | ) | const [inline, protected] |
Test if branch changed between previous and current buffer.
branch_arg,: | reference to octree branch class |
Definition at line 507 of file octree2buf_base.h.
double pcl::octree::Octree2BufBase< DataT, LeafT >::Log2 | ( | double | n_arg | ) | [inline, protected] |
Helper function to calculate the binary logarithm.
n_arg,: | some value |
Definition at line 929 of file octree2buf_base.h.
bool pcl::octree::Octree2BufBase< DataT, LeafT >::octreeCanResize | ( | ) | [inline, protected] |
Test if octree is able to dynamically change its depth.
This is required for adaptive bounding box adjustment.
Definition at line 938 of file octree2buf_base.h.
void pcl::octree::Octree2BufBase< DataT, LeafT >::poolCleanUp | ( | ) | [inline, protected] |
Delete all branch nodes and leaf nodes from octree node pools.
Definition at line 720 of file octree2buf_base.h.
void pcl::octree::Octree2BufBase< DataT, LeafT >::removeLeaf | ( | const unsigned int | idxX_arg, | |
const unsigned int | idxY_arg, | |||
const unsigned int | idxZ_arg | |||
) |
Remove leaf node at (idxX_arg, idxY_arg, idxZ_arg).
idxX_arg,: | index of leaf node in the X axis. | |
idxY_arg,: | index of leaf node in the Y axis. | |
idxZ_arg,: | index of leaf node in the Z axis. |
Definition at line 169 of file octree2buf_base.hpp.
void pcl::octree::Octree2BufBase< DataT, LeafT >::removeLeaf | ( | const OctreeKey & | key_arg | ) | [inline, protected] |
Remove leaf node from octree.
key_arg,: | octree key addressing a leaf node. |
Definition at line 377 of file octree2buf_base.h.
void pcl::octree::Octree2BufBase< DataT, LeafT >::serializeLeafCallback | ( | OctreeLeaf & | leaf_arg, | |
const OctreeKey & | key_arg, | |||
std::vector< DataT > & | dataVector_arg | |||
) | [protected, virtual] |
Decode leaf node data during serialization.
leaf_arg,: | reference to new leaf node | |
key_arg,: | octree key of new leaf node | |
dataVector_arg,: | DataT objects from leaf are pushed to this DataT vector |
Definition at line 1343 of file octree2buf_base.hpp.
void pcl::octree::Octree2BufBase< DataT, LeafT >::serializeLeafCallback | ( | OctreeLeaf & | leaf_arg, | |
const OctreeKey & | key_arg | |||
) | [protected, virtual] |
Decode leaf node data during serialization.
leaf_arg,: | reference to new leaf node | |
key_arg,: | octree key of new leaf node |
Definition at line 1335 of file octree2buf_base.hpp.
void pcl::octree::Octree2BufBase< DataT, LeafT >::serializeLeafs | ( | std::vector< DataT > & | dataVector_arg | ) |
Outputs a vector of all DataT elements that are stored within the octree leaf nodes.
dataVector_arg,: | reference to DataT vector that receives a copy of all DataT objects in the octree. |
Definition at line 275 of file octree2buf_base.hpp.
void pcl::octree::Octree2BufBase< DataT, LeafT >::serializeLeafsRecursive | ( | OctreeBranch * | branch_arg, | |
const OctreeKey & | key_arg, | |||
typename std::vector< DataT > & | dataVector_arg | |||
) | [protected] |
Recursively explore the octree and output DataT objects to DataT vector.
branch_arg,: | current branch node | |
key_arg,: | reference to an octree key | |
dataVector_arg,: | DataT objects from leaf nodes are written to this DataT vector. |
Definition at line 785 of file octree2buf_base.hpp.
void pcl::octree::Octree2BufBase< DataT, LeafT >::serializeNewLeafCallback | ( | OctreeLeaf & | leaf_arg, | |
const OctreeKey & | key_arg, | |||
const int | minPointsPerLeaf_arg, | |||
std::vector< DataT > & | dataVector_arg | |||
) | [protected, virtual] |
Decode new leaf node data of during serialization.
leaf_arg,: | reference to new leaf node | |
key_arg,: | octree key of new leaf node | |
minPointsPerLeaf_arg,: | minimum amount of points required within leaf node to become serialized. | |
dataVector_arg,: | DataT objects from leaf are pushed to this DataT vector |
Definition at line 1352 of file octree2buf_base.hpp.
void pcl::octree::Octree2BufBase< DataT, LeafT >::serializeNewLeafs | ( | std::vector< DataT > & | dataVector_arg, | |
const int | minPointsPerLeaf_arg = 0 | |||
) |
Outputs a vector of all DataT elements from leaf nodes, that do not exist in the previous octree buffer.
dataVector_arg,: | reference to DataT vector that receives a copy of all DataT objects in the octree. | |
minPointsPerLeaf_arg,: | minimum amount of points required within leaf node to become serialized. |
Definition at line 376 of file octree2buf_base.hpp.
void pcl::octree::Octree2BufBase< DataT, LeafT >::serializeNewLeafsRecursive | ( | OctreeBranch * | branch_arg, | |
const OctreeKey & | key_arg, | |||
std::vector< DataT > & | dataVector_arg, | |||
const int | minPointsPerLeaf_arg = 0 | |||
) | [protected] |
Recursively explore the octree and output DataT objects of leafs that do not exist in previous buffer.
branch_arg,: | current branch node | |
key_arg,: | reference to an octree key | |
dataVector_arg,: | DataT objects from leaf nodes are written to this DataT vector reference. | |
minPointsPerLeaf_arg,: | minimum amount of points required within leaf node to become serialized. |
Definition at line 849 of file octree2buf_base.hpp.
void pcl::octree::Octree2BufBase< DataT, LeafT >::serializeTree | ( | std::vector< char > & | binaryTreeOut_arg, | |
bool | doXOREncoding_arg = false | |||
) |
Serialize octree into a binary output vector describing its branch node structure.
binaryTreeOut_arg,: | reference to output vector for writing binary tree structure. | |
doXOREncoding_arg,: | select 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 232 of file octree2buf_base.hpp.
void pcl::octree::Octree2BufBase< DataT, LeafT >::serializeTree | ( | std::vector< char > & | binaryTreeOut_arg, | |
std::vector< DataT > & | dataVector_arg, | |||
bool | doXOREncoding_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.
binaryTreeOut_arg,: | reference to output vector for writing binary tree structure. | |
dataVector_arg,: | reference of DataT vector that receives a copy of all DataT objects in the octree | |
doXOREncoding_arg,: | select 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 251 of file octree2buf_base.hpp.
void pcl::octree::Octree2BufBase< DataT, LeafT >::serializeTreeRecursive | ( | std::vector< char > & | binaryTreeOut_arg, | |
OctreeBranch * | branch_arg, | |||
const OctreeKey & | key_arg, | |||
bool | doXOREncoding_arg | |||
) | [protected] |
Recursively explore the octree and output binary octree description.
binaryTreeOut_arg,: | binary output vector | |
branch_arg,: | current branch node | |
key_arg,: | reference to an octree key | |
doXOREncoding_arg,: | select 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 619 of file octree2buf_base.hpp.
void pcl::octree::Octree2BufBase< DataT, LeafT >::serializeTreeRecursive | ( | std::vector< char > & | binaryTreeOut_arg, | |
OctreeBranch * | branch_arg, | |||
const OctreeKey & | key_arg, | |||
typename std::vector< DataT > & | dataVector_arg, | |||
bool | doXOREncoding_arg | |||
) | [protected] |
Recursively explore the octree and output binary octree description together with a vector of leaf node DataT content.
binaryTreeOut_arg,: | binary output vector | |
branch_arg,: | current branch node | |
key_arg,: | reference to an octree key | |
dataVector_arg,: | writes DataT content to this DataT vector. | |
doXOREncoding_arg,: | select 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 701 of file octree2buf_base.hpp.
void pcl::octree::Octree2BufBase< DataT, LeafT >::setBranchChild | ( | OctreeBranch & | branch_arg, | |
const unsigned char | childIdx_arg, | |||
const OctreeNode * | newChild_arg | |||
) | [inline, protected] |
Assign new child node to branch for current buffer.
branch_arg,: | reference to octree branch class | |
childIdx_arg,: | index to child node | |
newChild_arg,: | pointer to new child node |
Definition at line 518 of file octree2buf_base.h.
void pcl::octree::Octree2BufBase< DataT, LeafT >::setBranchChild | ( | OctreeBranch & | branch_arg, | |
const unsigned char | bufferSelector_arg, | |||
const unsigned char | childIdx_arg, | |||
const OctreeNode * | newChild_arg | |||
) | [inline, protected] |
Assign new child node to branch in specific buffer.
branch_arg,: | reference to octree branch class | |
bufferSelector_arg,: | buffer selector | |
childIdx_arg,: | index to child node | |
newChild_arg,: | pointer to new child node |
Definition at line 530 of file octree2buf_base.h.
void pcl::octree::Octree2BufBase< DataT, LeafT >::setMaxVoxelIndex | ( | unsigned int | maxVoxelIndex_arg | ) |
Set the maximum amount of voxels per dimension.
maxVoxelIndex_arg,: | maximum amount of voxels per dimension |
Definition at line 78 of file octree2buf_base.hpp.
void pcl::octree::Octree2BufBase< DataT, LeafT >::setTreeDepth | ( | unsigned int | depth_arg | ) |
Set the maximum depth of the octree.
depth_arg,: | maximum depth of octree |
Definition at line 96 of file octree2buf_base.hpp.
void pcl::octree::Octree2BufBase< DataT, LeafT >::switchBuffers | ( | ) |
Switch buffers and reset current octree structure.
Definition at line 210 of file octree2buf_base.hpp.
void pcl::octree::Octree2BufBase< DataT, LeafT >::treeCleanUpRecursive | ( | OctreeBranch * | branch_arg | ) | [protected] |
Recursively explore the octree and remove unused branch and leaf nodes.
branch_arg,: | current branch node |
Definition at line 1443 of file octree2buf_base.hpp.
unsigned int pcl::octree::Octree2BufBase< DataT, LeafT >::branchCount_ [protected] |
Amount of branch nodes.
Definition at line 952 of file octree2buf_base.h.
unsigned char pcl::octree::Octree2BufBase< DataT, LeafT >::bufferSelector_ [protected] |
Currently active octree buffer.
Definition at line 970 of file octree2buf_base.h.
unsigned int pcl::octree::Octree2BufBase< DataT, LeafT >::depthMask_ [protected] |
Depth mask based on octree depth.
Definition at line 961 of file octree2buf_base.h.
unsigned int pcl::octree::Octree2BufBase< DataT, LeafT >::leafCount_ [protected] |
Amount of leaf nodes.
Definition at line 949 of file octree2buf_base.h.
unsigned int pcl::octree::Octree2BufBase< DataT, LeafT >::objectCount_ [protected] |
Amount of objects assigned to leaf nodes.
Definition at line 955 of file octree2buf_base.h.
unsigned int pcl::octree::Octree2BufBase< DataT, LeafT >::octreeDepth_ [protected] |
Octree depth.
Definition at line 977 of file octree2buf_base.h.
bool pcl::octree::Octree2BufBase< DataT, LeafT >::resetTree_ [protected] |
Definition at line 973 of file octree2buf_base.h.
OctreeBranch* pcl::octree::Octree2BufBase< DataT, LeafT >::rootNode_ [protected] |
Pointer to root branch node of octree.
Definition at line 958 of file octree2buf_base.h.
bool pcl::octree::Octree2BufBase< DataT, LeafT >::treeDirtyFlag_ [protected] |
Definition at line 974 of file octree2buf_base.h.
std::vector<OctreeBranch*> pcl::octree::Octree2BufBase< DataT, LeafT >::unusedBranchesPool_ [protected] |
Vector pools of unused branch nodes.
Definition at line 964 of file octree2buf_base.h.
std::vector<LeafT*> pcl::octree::Octree2BufBase< DataT, LeafT >::unusedLeafsPool_ [protected] |
Vector pools of unused leaf nodes.
Definition at line 967 of file octree2buf_base.h.