Point Cloud Library (PCL)
1.3.1
|
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 Types | |
typedef OctreeNodeIterator < DataT, LeafT, Octree2BufBase > | Iterator |
typedef const OctreeNodeIterator< DataT, LeafT, Octree2BufBase > | ConstIterator |
typedef OctreeLeafNodeIterator < DataT, LeafT, Octree2BufBase > | LeafNodeIterator |
typedef const OctreeLeafNodeIterator< DataT, LeafT, Octree2BufBase > | ConstLeafNodeIterator |
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 | deleteCurrentBuffer () |
Delete the octree structure in the current 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. | |
Friends | |
class | OctreeNodeIterator< DataT, LeafT, Octree2BufBase > |
class | OctreeLeafNodeIterator< DataT, LeafT, Octree2BufBase > |
Octree double buffer class
typedef const OctreeNodeIterator<DataT, LeafT, Octree2BufBase> pcl::octree::Octree2BufBase::ConstIterator |
Definition at line 77 of file octree2buf_base.h.
typedef const OctreeLeafNodeIterator<DataT, LeafT, Octree2BufBase> pcl::octree::Octree2BufBase::ConstLeafNodeIterator |
Definition at line 81 of file octree2buf_base.h.
typedef OctreeNodeIterator<DataT, LeafT, Octree2BufBase> pcl::octree::Octree2BufBase::Iterator |
Definition at line 76 of file octree2buf_base.h.
typedef OctreeLeafNodeIterator<DataT, LeafT, Octree2BufBase> pcl::octree::Octree2BufBase::LeafNodeIterator |
Definition at line 80 of file octree2buf_base.h.
pcl::octree::Octree2BufBase::Octree2BufBase | ( | ) |
Empty constructor.
Definition at line 51 of file octree2buf_base.hpp.
pcl::octree::Octree2BufBase::~Octree2BufBase | ( | ) | [virtual] |
Empty deconstructor.
Definition at line 68 of file octree2buf_base.hpp.
void pcl::octree::Octree2BufBase::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 113 of file octree2buf_base.hpp.
void pcl::octree::Octree2BufBase::deleteCurrentBuffer | ( | ) | [inline] |
Delete the octree structure in the current buffer.
Definition at line 181 of file octree2buf_base.h.
void pcl::octree::Octree2BufBase::deletePreviousBuffer | ( | ) | [inline] |
Delete octree structure of previous buffer.
Definition at line 174 of file octree2buf_base.h.
void pcl::octree::Octree2BufBase::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 186 of file octree2buf_base.hpp.
void pcl::octree::Octree2BufBase::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 296 of file octree2buf_base.hpp.
void pcl::octree::Octree2BufBase::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 320 of file octree2buf_base.hpp.
void pcl::octree::Octree2BufBase::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 351 of file octree2buf_base.hpp.
bool pcl::octree::Octree2BufBase::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 156 of file octree2buf_base.hpp.
bool pcl::octree::Octree2BufBase::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 131 of file octree2buf_base.hpp.
unsigned int pcl::octree::Octree2BufBase::getBranchCount | ( | ) | const [inline] |
Return the amount of existing branches in the octree.
Definition at line 161 of file octree2buf_base.h.
unsigned int pcl::octree::Octree2BufBase::getLeafCount | ( | ) | const [inline] |
Return the amount of existing leafs in the octree.
Definition at line 152 of file octree2buf_base.h.
unsigned int pcl::octree::Octree2BufBase::getTreeDepth | ( | ) | [inline] |
Get the maximum depth of the octree.
Definition at line 106 of file octree2buf_base.h.
void pcl::octree::Octree2BufBase::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 171 of file octree2buf_base.hpp.
void pcl::octree::Octree2BufBase::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 277 of file octree2buf_base.hpp.
void pcl::octree::Octree2BufBase::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 378 of file octree2buf_base.hpp.
void pcl::octree::Octree2BufBase::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 234 of file octree2buf_base.hpp.
void pcl::octree::Octree2BufBase::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 253 of file octree2buf_base.hpp.
void pcl::octree::Octree2BufBase::setMaxVoxelIndex | ( | unsigned int | maxVoxelIndex_arg | ) |
Set the maximum amount of voxels per dimension.
maxVoxelIndex_arg,: | maximum amount of voxels per dimension |
Definition at line 80 of file octree2buf_base.hpp.
void pcl::octree::Octree2BufBase::setTreeDepth | ( | unsigned int | depth_arg | ) |
Set the maximum depth of the octree.
depth_arg,: | maximum depth of octree |
Definition at line 98 of file octree2buf_base.hpp.
void pcl::octree::Octree2BufBase::switchBuffers | ( | ) |
Switch buffers and reset current octree structure.
Definition at line 212 of file octree2buf_base.hpp.
friend class OctreeLeafNodeIterator< DataT, LeafT, Octree2BufBase > [friend] |
Definition at line 71 of file octree2buf_base.h.
friend class OctreeNodeIterator< DataT, LeafT, Octree2BufBase > [friend] |
Definition at line 70 of file octree2buf_base.h.