Point Cloud Library (PCL)
1.14.1-dev
|
#include <pcl/recognition/ransac_based/simple_octree.h>
Classes | |
class | Node |
Public Member Functions | |
SimpleOctree () | |
virtual | ~SimpleOctree () |
void | clear () |
void | build (const Scalar *bounds, Scalar voxel_size, NodeDataCreator *node_data_creator) |
Creates an empty octree with bounds at least as large as the ones provided as input and with leaf size equal to 'voxel_size'. More... | |
Node * | createLeaf (Scalar x, Scalar y, Scalar z) |
Creates the leaf containing p = (x, y, z) and returns a pointer to it, however, only if p lies within the octree bounds! A more general version which allows p to be out of bounds is not implemented yet. More... | |
Node * | getFullLeaf (int i, int j, int k) |
Since the leaves are aligned in a rectilinear grid, each leaf has a unique id. More... | |
Node * | getFullLeaf (Scalar x, Scalar y, Scalar z) |
Returns a pointer to the full leaf, i.e., one having a data pbject, containing p = (x, y, z) or NULL if no such leaf exists. More... | |
std::vector< Node * > & | getFullLeaves () |
const std::vector< Node * > & | getFullLeaves () const |
Node * | getRoot () |
const Scalar * | getBounds () const |
void | getBounds (Scalar b[6]) const |
Scalar | getVoxelSize () const |
Protected Member Functions | |
void | insertNeighbors (Node *node) |
Protected Attributes | |
Scalar | voxel_size_ {0.0f} |
Scalar | bounds_ [6] {} |
int | tree_levels_ {0} |
Node * | root_ {nullptr} |
std::vector< Node * > | full_leaves_ |
NodeDataCreator * | node_data_creator_ {nullptr} |
Definition at line 58 of file simple_octree.h.
|
inlinedefault |
|
inlinevirtual |
Definition at line 187 of file simple_octree.hpp.
References pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::clear().
|
inline |
Creates an empty octree with bounds at least as large as the ones provided as input and with leaf size equal to 'voxel_size'.
Definition at line 204 of file simple_octree.hpp.
References pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::bounds_, pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::clear(), pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::Node::computeRadius(), pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::node_data_creator_, pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::root_, pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::Node::setBounds(), pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::Node::setCenter(), pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::Node::setParent(), pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::tree_levels_, and pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::voxel_size_.
|
inline |
Definition at line 194 of file simple_octree.hpp.
References pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::root_.
Referenced by pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::build(), and pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::~SimpleOctree().
|
inline |
Creates the leaf containing p = (x, y, z) and returns a pointer to it, however, only if p lies within the octree bounds! A more general version which allows p to be out of bounds is not implemented yet.
The method returns NULL if p is not within the root bounds. If the leaf containing p already exists nothing happens and method just returns a pointer to the leaf. Note that for a new created leaf, the method also creates its data object.
Definition at line 250 of file simple_octree.hpp.
References pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::bounds_, pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::Node::createChildren(), pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::full_leaves_, pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::Node::getCenter(), pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::Node::getChild(), pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::Node::hasData(), pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::insertNeighbors(), pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::node_data_creator_, pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::root_, pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::Node::setData(), and pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::tree_levels_.
|
inline |
Definition at line 188 of file simple_octree.h.
|
inline |
Definition at line 191 of file simple_octree.h.
|
inline |
Since the leaves are aligned in a rectilinear grid, each leaf has a unique id.
The method returns the full leaf, i.e., the one having a data object, with id [i, j, k] or NULL is no such leaf exists.
Definition at line 289 of file simple_octree.hpp.
References pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::bounds_, and pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::voxel_size_.
Referenced by pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::insertNeighbors().
|
inline |
Returns a pointer to the full leaf, i.e., one having a data pbject, containing p = (x, y, z) or NULL if no such leaf exists.
Definition at line 302 of file simple_octree.hpp.
References pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::bounds_, pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::Node::getCenter(), pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::Node::getChild(), pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::Node::hasChildren(), pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::Node::hasData(), pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::root_, and pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::tree_levels_.
|
inline |
Definition at line 179 of file simple_octree.h.
|
inline |
Definition at line 182 of file simple_octree.h.
|
inline |
Definition at line 185 of file simple_octree.h.
|
inline |
Definition at line 194 of file simple_octree.h.
|
inlineprotected |
Definition at line 338 of file simple_octree.hpp.
References pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::Node::getCenter(), pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::getFullLeaf(), pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::Node::makeNeighbors(), and pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::voxel_size_.
Referenced by pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::createLeaf().
|
protected |
Definition at line 201 of file simple_octree.h.
Referenced by pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::build(), pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::Node::computeRadius(), pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::createLeaf(), pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::getFullLeaf(), and pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::Node::setBounds().
|
protected |
Definition at line 204 of file simple_octree.h.
Referenced by pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::createLeaf().
|
protected |
Definition at line 205 of file simple_octree.h.
Referenced by pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::build(), and pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::createLeaf().
|
protected |
Definition at line 203 of file simple_octree.h.
Referenced by pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::build(), pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::clear(), pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::createLeaf(), and pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::getFullLeaf().
|
protected |
Definition at line 202 of file simple_octree.h.
Referenced by pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::build(), pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::createLeaf(), and pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::getFullLeaf().
|
protected |
Definition at line 201 of file simple_octree.h.
Referenced by pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::build(), pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::getFullLeaf(), and pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::insertNeighbors().