Point Cloud Library (PCL)
1.3.1
|
Octree class More...
#include <pcl/octree/octree_lowmemory_base.h>
Classes | |
class | OctreeBranch |
Octree branch class. More... | |
class | OctreeKey |
Octree key class More... | |
Public Types | |
typedef OctreeNodeIterator < DataT, LeafT, OctreeLowMemBase > | Iterator |
typedef const OctreeNodeIterator< DataT, LeafT, OctreeLowMemBase > | ConstIterator |
typedef OctreeLeafNodeIterator < DataT, LeafT, OctreeLowMemBase > | LeafNodeIterator |
typedef const OctreeLeafNodeIterator< DataT, LeafT, OctreeLowMemBase > | ConstLeafNodeIterator |
Public Member Functions | |
OctreeLowMemBase () | |
Empty constructor. | |
virtual | ~OctreeLowMemBase () |
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 () |
Delete the octree structure and its leaf nodes. | |
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 | 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) |
Deserialize a binary octree description vector and create a corresponding octree structure. | |
void | switchBuffers () |
Switch buffers interface for compression. | |
Friends | |
class | OctreeNodeIterator< DataT, LeafT, OctreeLowMemBase > |
class | OctreeLeafNodeIterator< DataT, LeafT, OctreeLowMemBase > |
Octree class
typedef const OctreeNodeIterator<DataT, LeafT, OctreeLowMemBase> pcl::octree::OctreeLowMemBase::ConstIterator |
Definition at line 74 of file octree_lowmemory_base.h.
typedef const OctreeLeafNodeIterator<DataT, LeafT, OctreeLowMemBase> pcl::octree::OctreeLowMemBase::ConstLeafNodeIterator |
Definition at line 78 of file octree_lowmemory_base.h.
typedef OctreeNodeIterator<DataT, LeafT, OctreeLowMemBase> pcl::octree::OctreeLowMemBase::Iterator |
Definition at line 73 of file octree_lowmemory_base.h.
typedef OctreeLeafNodeIterator<DataT, LeafT, OctreeLowMemBase> pcl::octree::OctreeLowMemBase::LeafNodeIterator |
Definition at line 77 of file octree_lowmemory_base.h.
pcl::octree::OctreeLowMemBase::OctreeLowMemBase | ( | ) |
Empty constructor.
Definition at line 57 of file octree_lowmemory_base.hpp.
pcl::octree::OctreeLowMemBase::~OctreeLowMemBase | ( | ) | [virtual] |
Empty deconstructor.
Definition at line 72 of file octree_lowmemory_base.hpp.
void pcl::octree::OctreeLowMemBase::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 created and 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 to be added. |
Definition at line 117 of file octree_lowmemory_base.hpp.
void pcl::octree::OctreeLowMemBase::deleteTree | ( | ) |
Delete the octree structure and its leaf nodes.
Definition at line 194 of file octree_lowmemory_base.hpp.
void pcl::octree::OctreeLowMemBase::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,: | dummy argument to be consistent with the octree compression interface. As only a single octree is managed in memory, no XOR encoding is performed. |
Definition at line 264 of file octree_lowmemory_base.hpp.
void pcl::octree::OctreeLowMemBase::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,: | dummy argument to be consistent with the octree compression interface. As only a single octree is managed in memory, no XOR encoding is performed. |
Definition at line 285 of file octree_lowmemory_base.hpp.
void pcl::octree::OctreeLowMemBase::deserializeTreeAndOutputLeafData | ( | std::vector< char > & | binaryTreeIn_arg, |
std::vector< DataT > & | dataVector_arg | ||
) |
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. |
Definition at line 313 of file octree_lowmemory_base.hpp.
bool pcl::octree::OctreeLowMemBase::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 164 of file octree_lowmemory_base.hpp.
bool pcl::octree::OctreeLowMemBase::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 138 of file octree_lowmemory_base.hpp.
unsigned int pcl::octree::OctreeLowMemBase::getBranchCount | ( | ) | const [inline] |
Return the amount of existing branches in the octree.
Definition at line 158 of file octree_lowmemory_base.h.
unsigned int pcl::octree::OctreeLowMemBase::getLeafCount | ( | ) | const [inline] |
Return the amount of existing leafs in the octree.
Definition at line 149 of file octree_lowmemory_base.h.
unsigned int pcl::octree::OctreeLowMemBase::getTreeDepth | ( | ) | [inline] |
Get the maximum depth of the octree.
Definition at line 103 of file octree_lowmemory_base.h.
void pcl::octree::OctreeLowMemBase::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 179 of file octree_lowmemory_base.hpp.
void pcl::octree::OctreeLowMemBase::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 247 of file octree_lowmemory_base.hpp.
void pcl::octree::OctreeLowMemBase::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,: | dummy argument to be consistent with the octree compression interface. As only a single octree is managed in memory, no XOR encoding is performed. |
Definition at line 212 of file octree_lowmemory_base.hpp.
void pcl::octree::OctreeLowMemBase::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,: | dummy argument to be consistent with the octree compression interface. As only a single octree is managed in memory, no XOR encoding is performed. |
Definition at line 228 of file octree_lowmemory_base.hpp.
void pcl::octree::OctreeLowMemBase::setMaxVoxelIndex | ( | unsigned int | maxVoxelIndex_arg | ) |
Set the maximum amount of voxels per dimension.
maxVoxelIndex_arg,: | maximum amount of voxels per dimension |
Definition at line 83 of file octree_lowmemory_base.hpp.
void pcl::octree::OctreeLowMemBase::setTreeDepth | ( | unsigned int | depth_arg | ) |
Set the maximum depth of the octree.
depth_arg,: | maximum depth of octree |
Definition at line 101 of file octree_lowmemory_base.hpp.
void pcl::octree::OctreeLowMemBase::switchBuffers | ( | ) | [inline] |
Switch buffers interface for compression.
As this octree implementation manages only a single buffer, it just deletes the current octree.
Definition at line 215 of file octree_lowmemory_base.h.
friend class OctreeLeafNodeIterator< DataT, LeafT, OctreeLowMemBase > [friend] |
Definition at line 68 of file octree_lowmemory_base.h.
friend class OctreeNodeIterator< DataT, LeafT, OctreeLowMemBase > [friend] |
Definition at line 67 of file octree_lowmemory_base.h.