42 #include <pcl/octree/octree_key.h> 43 #include <pcl/octree/octree_nodes.h> 52 #pragma GCC system_header 70 template <
typename OctreeT>
111 unsigned int max_depth_arg,
250 ret =
octree_->getBranchBitPattern(*current_branch);
268 return leaf_node->getContainer();
283 return leaf_node->getContainer();
298 return branch_node->getContainer();
313 return branch_node->getContainer();
319 virtual unsigned long 322 unsigned long id = 0;
330 unsigned int depth =
octree_->getTreeDepth();
331 id =
static_cast<unsigned long>(key.
x) << (depth * 2) |
332 static_cast<unsigned long>(key.
y) << (depth * 1) |
333 static_cast<unsigned long>(key.
z) << (depth * 0);
357 template <
typename OctreeT>
375 unsigned int max_depth_arg = 0);
387 unsigned int max_depth_arg,
389 const std::vector<IteratorState>& stack = std::vector<IteratorState>())
462 template <
typename OctreeT>
480 unsigned int max_depth_arg = 0);
492 unsigned int max_depth_arg,
494 const std::deque<IteratorState>& fifo = std::deque<IteratorState>())
562 template <
typename OctreeT>
579 unsigned int fixed_depth_arg = 0);
592 unsigned int fixed_depth_arg,
594 const std::deque<IteratorState>& fifo = std::deque<IteratorState>())
596 octree_arg, fixed_depth_arg, current_state, fifo)
626 reset(
unsigned int fixed_depth_arg);
651 template <
typename OctreeT>
672 unsigned int max_depth_arg = 0)
688 unsigned int max_depth_arg,
690 const std::vector<IteratorState>& stack = std::vector<IteratorState>())
753 template <
typename OctreeT>
770 unsigned int max_depth_arg = 0);
783 unsigned int max_depth_arg,
785 const std::deque<IteratorState>& fifo = std::deque<IteratorState>());
811 #include <pcl/octree/impl/octree_iterator.hpp> bool isLeafNode() const
check if current node is a branch node
OctreeBreadthFirstIterator & operator=(const OctreeBreadthFirstIterator &src)
Copy operator.
void reset()
Reset iterator.
typename OctreeIteratorBase< OctreeT >::LeafNode LeafNode
void reset()
Reset the iterator to the first node at the current depth.
typename OctreeIteratorBase< OctreeT >::BranchNode BranchNode
typename OctreeIteratorBase< OctreeT >::BranchNode BranchNode
const BranchContainer & getBranchContainer() const
Method for retrieving the container from an octree branch node.
virtual node_type_t getNodeType() const =0
Pure virtual method for receiving the type of octree node (branch or leaf)
std::deque< IteratorState > FIFO_
FIFO list.
typename OctreeIteratorBase< OctreeT >::LeafNode LeafNode
OctreeLeafNodeBreadthFirstIterator(unsigned int max_depth_arg=0)
Empty constructor.
bool isBranchNode() const
check if current node is a branch node
OctreeNode * operator*() const
*operator.
const LeafContainer & getLeafContainer() const
Method for retrieving a single leaf container from the octree leaf node.
OctreeIteratorBase(OctreeT *octree_arg, unsigned int max_depth_arg, IteratorState *current_state)
Constructor.
OctreeNode * operator*() const
*operator.
std::vector< IteratorState > stack_
Stack structure.
IteratorState * current_state_
Pointer to current iterator state.
OctreeBreadthFirstIterator operator++(int)
postincrement operator.
typename OctreeT::LeafContainer LeafContainer
OctreeDepthFirstIterator(OctreeT *octree_arg, unsigned int max_depth_arg, IteratorState *current_state, const std::vector< IteratorState > &stack=std::vector< IteratorState >())
Constructor.
OctreeFixedDepthIterator & operator=(const OctreeFixedDepthIterator &src)
Copy assignment.
OctreeFixedDepthIterator(const OctreeFixedDepthIterator &other)
Copy Constructor.
LeafContainer & getLeafContainer()
Method for retrieving a single leaf container from the octree leaf node.
unsigned int max_octree_depth_
Maximum octree depth.
unsigned int fixed_depth_
Given level of the node to be iterated.
void reset()
Reset the iterator to the root node of the octree.
void reset()
Reset the iterator to the root node of the octree.
typename OctreeT::BranchNode BranchNode
virtual void reset()
Reset the iterator to the root node of the octree.
unsigned int getCurrentOctreeDepth() const
Get the current depth level of octree.
bool operator!=(const OctreeIteratorBase &other) const
Inequal comparison operator.
OctreeIteratorBase(unsigned int max_depth_arg=0)
Empty constructor.
OctreeNode * getCurrentOctreeNode() const
Get the current octree node.
OctreeLeafNodeDepthFirstIterator(OctreeT *octree_arg, unsigned int max_depth_arg, IteratorState *current_state, const std::vector< IteratorState > &stack=std::vector< IteratorState >())
Constructor.
OctreeDepthFirstIterator operator++(int)
postincrement operator.
char getNodeConfiguration() const
Get bit pattern of children configuration of current node.
OctreeDepthFirstIterator(unsigned int max_depth_arg=0)
Empty constructor.
Octree leaf node iterator class.
OctreeLeafNodeDepthFirstIterator(unsigned int max_depth_arg=0)
Empty constructor.
OctreeBreadthFirstIterator(const OctreeBreadthFirstIterator &other)
Copy Constructor.
OctreeFixedDepthIterator(OctreeT *octree_arg, unsigned int fixed_depth_arg, IteratorState *current_state, const std::deque< IteratorState > &fifo=std::deque< IteratorState >())
Constructor.
void skipChildVoxels()
Skip all child voxels of current node and return to parent node.
void reset()
Reset the iterator to the first leaf in the breadth first way.
virtual unsigned long getNodeID() const
get a integer identifier for current node (note: identifier depends on tree depth).
typename OctreeT::BranchContainer BranchContainer
OctreeFixedDepthIterator()
Empty constructor.
const OctreeKey & getCurrentOctreeKey() const
Get octree key for the current iterator octree node.
OctreeDepthFirstIterator(const OctreeDepthFirstIterator &other)
Copy Constructor.
OctreeBreadthFirstIterator & operator++()
Preincrement operator.
OctreeT * octree_
Reference to octree class.
OctreeDepthFirstIterator & operator++()
Preincrement operator.
Abstract octree iterator class
typename OctreeT::LeafNode LeafNode
OctreeDepthFirstIterator & operator=(const OctreeDepthFirstIterator &src)
Copy assignment.
virtual ~OctreeIteratorBase()
Empty deconstructor.
bool operator==(const OctreeIteratorBase &other) const
Equal comparison operator.
OctreeLeafNodeDepthFirstIterator(OctreeT *octree_arg, unsigned int max_depth_arg=0)
Constructor.
OctreeLeafNodeBreadthFirstIterator & operator++()
Preincrement operator.
OctreeBreadthFirstIterator(OctreeT *octree_arg, unsigned int max_depth_arg, IteratorState *current_state, const std::deque< IteratorState > &fifo=std::deque< IteratorState >())
Constructor.
OctreeLeafNodeDepthFirstIterator & operator++()
Preincrement operator.
Abstract octree node class
OctreeIteratorBase(OctreeT *octree_arg, unsigned int max_depth_arg=0)
Constructor.
OctreeLeafNodeDepthFirstIterator operator++(int)
postincrement operator.
Octree leaf node iterator class.
BranchContainer & getBranchContainer()
Method for retrieving the container from an octree branch node.
OctreeBreadthFirstIterator(unsigned int max_depth_arg=0)
Empty constructor.