Loading...
Searching...
No Matches
pcl::octree::OctreeIteratorBase< OctreeT > Class Template Referenceabstract
Module octree

Abstract octree iterator class More...

`#include <pcl/octree/octree_iterator.h>`

Inheritance diagram for pcl::octree::OctreeIteratorBase< OctreeT >:

## Public Types

using | iterator_category = std::forward_iterator_tag
using | value_type = const OctreeNode
using | difference_type = void
using | pointer = const OctreeNode *
using | reference = const OctreeNode &
using | LeafNode = typename OctreeT::LeafNode
using | BranchNode = typename OctreeT::BranchNode
using | LeafContainer = typename OctreeT::LeafContainer
using | BranchContainer = typename OctreeT::BranchContainer

## Public Member Functions

| OctreeIteratorBase ()
| Empty constructor.
| OctreeIteratorBase (uindex_t max_depth_arg)
| Constructor.
| OctreeIteratorBase (OctreeT *octree_arg)
| Constructor.
| OctreeIteratorBase (OctreeT *octree_arg, uindex_t max_depth_arg)
| Constructor.
| OctreeIteratorBase (OctreeT *octree_arg, uindex_t max_depth_arg, IteratorState *current_state)
| Constructor.
virtual | ~OctreeIteratorBase ()=default
| Empty deconstructor.
bool | operator== (const OctreeIteratorBase &other) const
| Equal comparison operator.
bool | operator!= (const OctreeIteratorBase &other) const
| Inequal comparison operator.
void | reset ()
| Reset iterator.
virtual OctreeIteratorBase & | operator++ ()=0
| Preincrement operator.
const OctreeKey & | getCurrentOctreeKey () const
| Get octree key for the current iterator octree node.
uindex_t | getCurrentOctreeDepth () const
| Get the current depth level of octree.
OctreeNode * | getCurrentOctreeNode () const
| Get the current octree node.
bool | isBranchNode () const
| check if current node is a branch node
bool | isLeafNode () const
| check if current node is a branch node
virtual OctreeNode * | operator* () const
| *operator.
char | getNodeConfiguration () const
| Get bit pattern of children configuration of current node.
const LeafContainer & | getLeafContainer () const
| Method for retrieving a single leaf container from the octree leaf node.
LeafContainer & | getLeafContainer ()
| Method for retrieving a single leaf container from the octree leaf node.
const BranchContainer & | getBranchContainer () const
| Method for retrieving the container from an octree branch node.
BranchContainer & | getBranchContainer ()
| Method for retrieving the container from an octree branch node.
virtual unsigned long | getNodeID () const
| get a integer identifier for current node (note: identifier depends on tree depth).

## Protected Attributes

OctreeT * | octree_
| Reference to octree class.
IteratorState * | current_state_
| Pointer to current iterator state.
uindex_t | max_octree_depth_
| Maximum octree depth.

## Detailed Description

template<typename OctreeT>
class pcl::octree::OctreeIteratorBase< OctreeT >

Abstract octree iterator class

Note
  Octree iterator base class

Author
  Julius Kammerl (juliu.nosp@m.s@ka.nosp@m.mmerl.nosp@m..de)

Definition at line 75 of file octree_iterator.h.

## Member Typedef Documentation

## BranchContainer

template<typename OctreeT >

using pcl::octree::OctreeIteratorBase< OctreeT >::BranchContainer = typename OctreeT::BranchContainer

Definition at line 87 of file octree_iterator.h.

## BranchNode

template<typename OctreeT >

using pcl::octree::OctreeIteratorBase< OctreeT >::BranchNode = typename OctreeT::BranchNode

Definition at line 84 of file octree_iterator.h.

## difference_type

template<typename OctreeT >

using pcl::octree::OctreeIteratorBase< OctreeT >::difference_type = void

Definition at line 79 of file octree_iterator.h.

## iterator_category

template<typename OctreeT >

using pcl::octree::OctreeIteratorBase< OctreeT >::iterator_category = std::forward_iterator_tag

Definition at line 77 of file octree_iterator.h.

## LeafContainer

template<typename OctreeT >

using pcl::octree::OctreeIteratorBase< OctreeT >::LeafContainer = typename OctreeT::LeafContainer

Definition at line 86 of file octree_iterator.h.

## LeafNode

template<typename OctreeT >

using pcl::octree::OctreeIteratorBase< OctreeT >::LeafNode = typename OctreeT::LeafNode

Definition at line 83 of file octree_iterator.h.

## pointer

template<typename OctreeT >

using pcl::octree::OctreeIteratorBase< OctreeT >::pointer = const OctreeNode*

Definition at line 80 of file octree_iterator.h.

## reference

template<typename OctreeT >

using pcl::octree::OctreeIteratorBase< OctreeT >::reference = const OctreeNode&

Definition at line 81 of file octree_iterator.h.

## value_type

template<typename OctreeT >

using pcl::octree::OctreeIteratorBase< OctreeT >::value_type = const OctreeNode

Definition at line 78 of file octree_iterator.h.

## Constructor & Destructor Documentation

## OctreeIteratorBase() [1/5]

template<typename OctreeT >

pcl::octree::OctreeIteratorBase< OctreeT >::OctreeIteratorBase | ( |  | ) |

inline

Empty constructor.

Definition at line 91 of file octree_iterator.h.

## OctreeIteratorBase() [2/5]

template<typename OctreeT >

pcl::octree::OctreeIteratorBase< OctreeT >::OctreeIteratorBase | ( | uindex_t | max_depth_arg | ) |

inline explicit

Constructor.

Parameters

  [in] | max_depth_arg | Depth limitation during traversal

Definition at line 96 of file octree_iterator.h.

References pcl::octree::OctreeIteratorBase< OctreeT >::reset().

## OctreeIteratorBase() [3/5]

template<typename OctreeT >

pcl::octree::OctreeIteratorBase< OctreeT >::OctreeIteratorBase | ( | OctreeT * | octree_arg | ) |

inline

Constructor.

Parameters

  [in] | octree_arg | Octree to be iterated. Initially the iterator is set to its root node.

Definition at line 106 of file octree_iterator.h.

## OctreeIteratorBase() [4/5]

template<typename OctreeT >

pcl::octree::OctreeIteratorBase< OctreeT >::OctreeIteratorBase | ( | OctreeT * | octree_arg,
|  | uindex_t | max_depth_arg
| ) |  |

inline explicit

Constructor.

Parameters

  [in] | octree_arg | Octree to be iterated. Initially the iterator is set to its root node.
  [in] | max_depth_arg | Depth limitation during traversal

Definition at line 113 of file octree_iterator.h.

References pcl::octree::OctreeIteratorBase< OctreeT >::reset().

## OctreeIteratorBase() [5/5]

template<typename OctreeT >

pcl::octree::OctreeIteratorBase< OctreeT >::OctreeIteratorBase | ( | OctreeT * | octree_arg,
|  | uindex_t | max_depth_arg,
|  | IteratorState * | current_state
| ) |  |

inline explicit

Constructor.

Parameters

  [in] | octree_arg | Octree to be iterated. Initially the iterator is set to its root node.
  [in] | max_depth_arg | Depth limitation during traversal
  [in] | current_state | A pointer to the current iterator state

Warning
  For advanced users only.

Definition at line 127 of file octree_iterator.h.

## ~OctreeIteratorBase()

template<typename OctreeT >

virtual pcl::octree::OctreeIteratorBase< OctreeT >::~OctreeIteratorBase | ( |  | ) |

virtual default

Empty deconstructor.

## Member Function Documentation

## getBranchContainer() [1/2]

template<typename OctreeT >

BranchContainer & pcl::octree::OctreeIteratorBase< OctreeT >::getBranchContainer | ( |  | ) |

inline

Method for retrieving the container from an octree branch node.

Returns
  BranchContainer.

Definition at line 328 of file octree_iterator.h.

References pcl::octree::OctreeIteratorBase< OctreeT >::current_state_, pcl::octree::OctreeIteratorBase< OctreeT >::isBranchNode(), pcl::octree::IteratorState::node_, and pcl::octree::OctreeIteratorBase< OctreeT >::octree_.

## getBranchContainer() [2/2]

template<typename OctreeT >

const BranchContainer & pcl::octree::OctreeIteratorBase< OctreeT >::getBranchContainer | ( |  | ) | const

inline

Method for retrieving the container from an octree branch node.

Returns
  BranchContainer.

Definition at line 313 of file octree_iterator.h.

References pcl::octree::OctreeIteratorBase< OctreeT >::current_state_, pcl::octree::OctreeIteratorBase< OctreeT >::isBranchNode(), pcl::octree::IteratorState::node_, and pcl::octree::OctreeIteratorBase< OctreeT >::octree_.

## getCurrentOctreeDepth()

template<typename OctreeT >

uindex_t pcl::octree::OctreeIteratorBase< OctreeT >::getCurrentOctreeDepth | ( |  | ) | const

inline

Get the current depth level of octree.

Returns
  depth level

Definition at line 196 of file octree_iterator.h.

References pcl::octree::OctreeIteratorBase< OctreeT >::current_state_, pcl::octree::IteratorState::depth_, and pcl::octree::OctreeIteratorBase< OctreeT >::octree_.

Referenced by pcl::octree::OctreePointCloud< PointT, LeafContainerT, BranchContainerT, OctreeT >::getVoxelBounds().

## getCurrentOctreeKey()

template<typename OctreeT >

const OctreeKey & pcl::octree::OctreeIteratorBase< OctreeT >::getCurrentOctreeKey | ( |  | ) | const

inline

Get octree key for the current iterator octree node.

Returns
  octree key of current node

Definition at line 184 of file octree_iterator.h.

References pcl::octree::OctreeIteratorBase< OctreeT >::current_state_, pcl::octree::IteratorState::key_, and pcl::octree::OctreeIteratorBase< OctreeT >::octree_.

Referenced by pcl::octree::OctreeIteratorBase< OctreeT >::getNodeID(), and pcl::octree::OctreePointCloud< PointT, LeafContainerT, BranchContainerT, OctreeT >::getVoxelBounds().

## getCurrentOctreeNode()

template<typename OctreeT >

OctreeNode * pcl::octree::OctreeIteratorBase< OctreeT >::getCurrentOctreeNode | ( |  | ) | const

inline

Get the current octree node.

Returns
  pointer to current octree node

Definition at line 208 of file octree_iterator.h.

References pcl::octree::OctreeIteratorBase< OctreeT >::current_state_, pcl::octree::IteratorState::node_, and pcl::octree::OctreeIteratorBase< OctreeT >::octree_.

## getLeafContainer() [1/2]

template<typename OctreeT >

LeafContainer & pcl::octree::OctreeIteratorBase< OctreeT >::getLeafContainer | ( |  | ) |

inline

Method for retrieving a single leaf container from the octree leaf node.

Returns
  Reference to container class of leaf node.

Definition at line 298 of file octree_iterator.h.

References pcl::octree::OctreeIteratorBase< OctreeT >::current_state_, pcl::octree::OctreeIteratorBase< OctreeT >::isLeafNode(), pcl::octree::IteratorState::node_, and pcl::octree::OctreeIteratorBase< OctreeT >::octree_.

## getLeafContainer() [2/2]

template<typename OctreeT >

const LeafContainer & pcl::octree::OctreeIteratorBase< OctreeT >::getLeafContainer | ( |  | ) | const

inline

Method for retrieving a single leaf container from the octree leaf node.

Returns
  Reference to container class of leaf node.

Definition at line 283 of file octree_iterator.h.

References pcl::octree::OctreeIteratorBase< OctreeT >::current_state_, pcl::octree::OctreeIteratorBase< OctreeT >::isLeafNode(), pcl::octree::IteratorState::node_, and pcl::octree::OctreeIteratorBase< OctreeT >::octree_.

## getNodeConfiguration()

template<typename OctreeT >

char pcl::octree::OctreeIteratorBase< OctreeT >::getNodeConfiguration | ( |  | ) | const

inline

Get bit pattern of children configuration of current node.

Returns
  bit pattern (byte) describing the existence of 8 children of the current node

Definition at line 259 of file octree_iterator.h.

References pcl::octree::OctreeIteratorBase< OctreeT >::current_state_, pcl::octree::OctreeIteratorBase< OctreeT >::isBranchNode(), pcl::octree::IteratorState::node_, and pcl::octree::OctreeIteratorBase< OctreeT >::octree_.

## getNodeID()

template<typename OctreeT >

virtual unsigned long pcl::octree::OctreeIteratorBase< OctreeT >::getNodeID | ( |  | ) | const

inline virtual

get a integer identifier for current node (note: identifier depends on tree depth).

Returns
  node id.

Definition at line 343 of file octree_iterator.h.

References pcl::octree::OctreeIteratorBase< OctreeT >::current_state_, pcl::octree::OctreeIteratorBase< OctreeT >::getCurrentOctreeKey(), pcl::octree::OctreeIteratorBase< OctreeT >::octree_, pcl::octree::OctreeKey::x, pcl::octree::OctreeKey::y, and pcl::octree::OctreeKey::z.

## isBranchNode()

template<typename OctreeT >

bool pcl::octree::OctreeIteratorBase< OctreeT >::isBranchNode | ( |  | ) | const

inline

check if current node is a branch node

Returns
  true if current node is a branch node, false otherwise

Definition at line 220 of file octree_iterator.h.

References pcl::octree::BRANCH_NODE, pcl::octree::OctreeIteratorBase< OctreeT >::current_state_, pcl::octree::OctreeNode::getNodeType(), pcl::octree::IteratorState::node_, and pcl::octree::OctreeIteratorBase< OctreeT >::octree_.

Referenced by pcl::octree::OctreeIteratorBase< OctreeT >::getBranchContainer(), pcl::octree::OctreeIteratorBase< OctreeT >::getBranchContainer(), and pcl::octree::OctreeIteratorBase< OctreeT >::getNodeConfiguration().

## isLeafNode()

template<typename OctreeT >

bool pcl::octree::OctreeIteratorBase< OctreeT >::isLeafNode | ( |  | ) | const

inline

check if current node is a branch node

Returns
  true if current node is a branch node, false otherwise

Definition at line 232 of file octree_iterator.h.

References pcl::octree::OctreeIteratorBase< OctreeT >::current_state_, pcl::octree::OctreeNode::getNodeType(), pcl::octree::LEAF_NODE, pcl::octree::IteratorState::node_, and pcl::octree::OctreeIteratorBase< OctreeT >::octree_.

Referenced by pcl::octree::OctreeIteratorBase< OctreeT >::getLeafContainer(), and pcl::octree::OctreeIteratorBase< OctreeT >::getLeafContainer().

## operator!=()

template<typename OctreeT >

bool pcl::octree::OctreeIteratorBase< OctreeT >::operator!= | ( | const OctreeIteratorBase< OctreeT > & | other | ) | const

inline

Inequal comparison operator.

Parameters

  [in] | other | OctreeIteratorBase to compare with

Definition at line 159 of file octree_iterator.h.

References pcl::octree::OctreeIteratorBase< OctreeT >::operator==().

## operator*()

template<typename OctreeT >

virtual OctreeNode * pcl::octree::OctreeIteratorBase< OctreeT >::operator* | ( |  | ) | const

inline virtual

*operator.

Returns
  pointer to the current octree node

Reimplemented in pcl::octree::OctreeLeafNodeDepthFirstIterator< OctreeT >, and pcl::octree::OctreeLeafNodeBreadthFirstIterator< OctreeT >.

Definition at line 244 of file octree_iterator.h.

References pcl::octree::OctreeIteratorBase< OctreeT >::current_state_, pcl::octree::IteratorState::node_, and pcl::octree::OctreeIteratorBase< OctreeT >::octree_.

## operator++()

template<typename OctreeT >

virtual OctreeIteratorBase & pcl::octree::OctreeIteratorBase< OctreeT >::operator++ | ( |  | ) |

pure virtual

Preincrement operator.

Note
  step to next octree node

Implemented in pcl::octree::OctreeDepthFirstIterator< OctreeT >, pcl::octree::OctreeBreadthFirstIterator< OctreeT >, pcl::octree::OctreeLeafNodeDepthFirstIterator< OctreeT >, and pcl::octree::OctreeLeafNodeBreadthFirstIterator< OctreeT >.

## operator==()

template<typename OctreeT >

bool pcl::octree::OctreeIteratorBase< OctreeT >::operator== | ( | const OctreeIteratorBase< OctreeT > & | other | ) | const

inline

Equal comparison operator.

Parameters

  [in] | other | OctreeIteratorBase to compare with

Definition at line 140 of file octree_iterator.h.

References pcl::octree::OctreeIteratorBase< OctreeT >::current_state_, pcl::octree::IteratorState::key_, pcl::octree::OctreeIteratorBase< OctreeT >::max_octree_depth_, and pcl::octree::OctreeIteratorBase< OctreeT >::octree_.

Referenced by pcl::octree::OctreeIteratorBase< OctreeT >::operator!=().

## reset()

template<typename OctreeT >

void pcl::octree::OctreeIteratorBase< OctreeT >::reset | ( |  | ) |

inline

Reset iterator.

Definition at line 166 of file octree_iterator.h.

References pcl::octree::OctreeIteratorBase< OctreeT >::current_state_, pcl::octree::OctreeIteratorBase< OctreeT >::max_octree_depth_, and pcl::octree::OctreeIteratorBase< OctreeT >::octree_.

Referenced by pcl::octree::OctreeBreadthFirstIterator< OctreeT >::OctreeBreadthFirstIterator(), pcl::octree::OctreeBreadthFirstIterator< OctreeT >::OctreeBreadthFirstIterator(), pcl::octree::OctreeIteratorBase< OctreeT >::OctreeIteratorBase(), pcl::octree::OctreeIteratorBase< OctreeT >::OctreeIteratorBase(), pcl::octree::OctreeDepthFirstIterator< OctreeT >::reset(), and pcl::octree::OctreeBreadthFirstIterator< OctreeT >::reset().

## Member Data Documentation

## current_state_

template<typename OctreeT >

IteratorState* pcl::octree::OctreeIteratorBase< OctreeT >::current_state_

protected

Pointer to current iterator state.

Definition at line 367 of file octree_iterator.h.

Referenced by pcl::octree::OctreeIteratorBase< OctreeT >::getBranchContainer(), pcl::octree::OctreeIteratorBase< OctreeT >::getBranchContainer(), pcl::octree::OctreeIteratorBase< OctreeT >::getCurrentOctreeDepth(), pcl::octree::OctreeIteratorBase< OctreeT >::getCurrentOctreeKey(), pcl::octree::OctreeIteratorBase< OctreeT >::getCurrentOctreeNode(), pcl::octree::OctreeIteratorBase< OctreeT >::getLeafContainer(), pcl::octree::OctreeIteratorBase< OctreeT >::getLeafContainer(), pcl::octree::OctreeIteratorBase< OctreeT >::getNodeConfiguration(), pcl::octree::OctreeIteratorBase< OctreeT >::getNodeID(), pcl::octree::OctreeIteratorBase< OctreeT >::isBranchNode(), pcl::octree::OctreeIteratorBase< OctreeT >::isLeafNode(), pcl::octree::OctreeBreadthFirstIterator< OctreeT >::OctreeBreadthFirstIterator(), pcl::octree::OctreeDepthFirstIterator< OctreeT >::OctreeDepthFirstIterator(), pcl::octree::OctreeIteratorBase< OctreeT >::operator*(), pcl::octree::OctreeLeafNodeDepthFirstIterator< OctreeT >::operator*(), pcl::octree::OctreeLeafNodeBreadthFirstIterator< OctreeT >::operator*(), pcl::octree::OctreeLeafNodeDepthFirstIterator< OctreeT >::operator++(), pcl::octree::OctreeBreadthFirstIterator< OctreeT >::operator=(), pcl::octree::OctreeDepthFirstIterator< OctreeT >::operator=(), pcl::octree::OctreeIteratorBase< OctreeT >::operator==(), and pcl::octree::OctreeIteratorBase< OctreeT >::reset().

## max_octree_depth_

template<typename OctreeT >

uindex_t pcl::octree::OctreeIteratorBase< OctreeT >::max_octree_depth_

protected

Maximum octree depth.

Definition at line 370 of file octree_iterator.h.

Referenced by pcl::octree::OctreeIteratorBase< OctreeT >::operator==(), and pcl::octree::OctreeIteratorBase< OctreeT >::reset().

## octree_

template<typename OctreeT >

OctreeT* pcl::octree::OctreeIteratorBase< OctreeT >::octree_

protected

Reference to octree class.

Definition at line 364 of file octree_iterator.h.

Referenced by pcl::octree::OctreeIteratorBase< OctreeT >::getBranchContainer(), pcl::octree::OctreeIteratorBase< OctreeT >::getBranchContainer(), pcl::octree::OctreeIteratorBase< OctreeT >::getCurrentOctreeDepth(), pcl::octree::OctreeIteratorBase< OctreeT >::getCurrentOctreeKey(), pcl::octree::OctreeIteratorBase< OctreeT >::getCurrentOctreeNode(), pcl::octree::OctreeIteratorBase< OctreeT >::getLeafContainer(), pcl::octree::OctreeIteratorBase< OctreeT >::getLeafContainer(), pcl::octree::OctreeIteratorBase< OctreeT >::getNodeConfiguration(), pcl::octree::OctreeIteratorBase< OctreeT >::getNodeID(), pcl::octree::OctreeIteratorBase< OctreeT >::isBranchNode(), pcl::octree::OctreeIteratorBase< OctreeT >::isLeafNode(), pcl::octree::OctreeIteratorBase< OctreeT >::operator*(), pcl::octree::OctreeIteratorBase< OctreeT >::operator==(), and pcl::octree::OctreeIteratorBase< OctreeT >::reset().

The documentation for this class was generated from the following file:

- pcl/octree/octree_iterator.h