Point Cloud Library (PCL)  1.14.1-dev
List of all members | Public Member Functions | Protected Attributes
pcl::OrganizedIndexIterator Class Referenceabstract

base class for iterators on 2-dimensional maps like images/organized clouds etc. More...

#include <pcl/geometry/organized_index_iterator.h>

+ Inheritance diagram for pcl::OrganizedIndexIterator:

Public Member Functions

 OrganizedIndexIterator (unsigned width)
 constructor More...
 
virtual ~OrganizedIndexIterator ()
 virtual destructor More...
 
virtual void operator++ ()=0
 go to next pixel/point in image/cloud More...
 
virtual void operator++ (int)
 go to next pixel/point in image/cloud More...
 
unsigned operator* () const
 returns the pixel/point index in the linearized memory of the image/cloud More...
 
virtual unsigned getIndex () const
 returns the pixel/point index in the linearized memory of the image/cloud More...
 
virtual unsigned getRowIndex () const
 returns the row index (y-coordinate) of the current pixel/point More...
 
virtual unsigned getColumnIndex () const
 returns the col index (x-coordinate) of the current pixel/point More...
 
virtual bool isValid () const =0
 return whether the current visited pixel/point is valid or not. More...
 
virtual void reset ()=0
 resets the iterator to the beginning of the line More...
 

Protected Attributes

unsigned width_
 the width of the image/cloud More...
 
unsigned index_ {0}
 the index of the current pixel/point More...
 

Detailed Description

base class for iterators on 2-dimensional maps like images/organized clouds etc.

Author
Suat Gedikli gedik.nosp@m.li@w.nosp@m.illow.nosp@m.gara.nosp@m.ge.co.nosp@m.m

Definition at line 44 of file organized_index_iterator.h.

Constructor & Destructor Documentation

◆ OrganizedIndexIterator()

pcl::OrganizedIndexIterator::OrganizedIndexIterator ( unsigned  width)
inline

constructor

Parameters
[in]widththe width of the image/organized cloud

Definition at line 112 of file organized_index_iterator.h.

◆ ~OrganizedIndexIterator()

pcl::OrganizedIndexIterator::~OrganizedIndexIterator ( )
inlinevirtualdefault

virtual destructor

Member Function Documentation

◆ getColumnIndex()

unsigned pcl::OrganizedIndexIterator::getColumnIndex ( ) const
inlinevirtual

returns the col index (x-coordinate) of the current pixel/point

Returns
the col index (x-coordinate) of the current pixel/point

Reimplemented in pcl::LineIterator.

Definition at line 149 of file organized_index_iterator.h.

◆ getIndex()

unsigned pcl::OrganizedIndexIterator::getIndex ( ) const
inlinevirtual

returns the pixel/point index in the linearized memory of the image/cloud

Returns
the pixel/point index in the linearized memory of the image/cloud

Definition at line 133 of file organized_index_iterator.h.

◆ getRowIndex()

unsigned pcl::OrganizedIndexIterator::getRowIndex ( ) const
inlinevirtual

returns the row index (y-coordinate) of the current pixel/point

default implementation.

Returns
the row index (y-coordinate) of the current pixel/point

Should be overloaded

Reimplemented in pcl::LineIterator.

Definition at line 142 of file organized_index_iterator.h.

◆ isValid()

virtual bool pcl::OrganizedIndexIterator::isValid ( ) const
pure virtual

return whether the current visited pixel/point is valid or not.

Returns
true if the current pixel/point is within the points to be iterated over, false otherwise

Implemented in pcl::LineIterator.

◆ operator*()

unsigned pcl::OrganizedIndexIterator::operator* ( ) const
inline

returns the pixel/point index in the linearized memory of the image/cloud

Returns
the pixel/point index in the linearized memory of the image/cloud

Definition at line 126 of file organized_index_iterator.h.

◆ operator++() [1/2]

virtual void pcl::OrganizedIndexIterator::operator++ ( )
pure virtual

go to next pixel/point in image/cloud

Implemented in pcl::LineIterator.

Referenced by operator++().

◆ operator++() [2/2]

void pcl::OrganizedIndexIterator::operator++ ( int  )
inlinevirtual

go to next pixel/point in image/cloud

Definition at line 119 of file organized_index_iterator.h.

References operator++().

◆ reset()

virtual void pcl::OrganizedIndexIterator::reset ( )
pure virtual

resets the iterator to the beginning of the line

Implemented in pcl::LineIterator.

Member Data Documentation

◆ index_

unsigned pcl::OrganizedIndexIterator::index_ {0}
protected

the index of the current pixel/point

Definition at line 104 of file organized_index_iterator.h.

Referenced by pcl::LineIterator::init(), pcl::LineIterator::operator++(), and pcl::LineIterator::reset().

◆ width_

unsigned pcl::OrganizedIndexIterator::width_
protected

the width of the image/cloud

Definition at line 101 of file organized_index_iterator.h.

Referenced by pcl::LineIterator::init(), and pcl::LineIterator::reset().


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