te::rst::PointSetIterator< T > Class Template Reference

This class implements the strategy to iterate with spatial restriction, the iteration occurs inside a vector of points. More...

#include <PositionIterator.h>

Inheritance diagram for te::rst::PointSetIterator< T >:
te::rst::AbstractPositionIterator< T >

Public Member Functions

unsigned int getColumn () const
 Returns the current column in iterator. More...
 
unsigned int getRow () const
 Returns the current row in iterator. More...
 
bool operator!= (const PointSetIterator< T > &rhs) const
 
bool operator!= (const AbstractPositionIterator< T > &rhs) const
 Difference operator. More...
 
std::complex< T > operator() (const unsigned int i) const
 Returns the complex value in current position (column, row, band) from iterator. More...
 
const std::vector< T > operator* () const
 Returns a vector of the values in current position (column, row) from iterator. More...
 
void operator++ ()
 Advances to the next position. More...
 
void operator-- ()
 Returns to the previous position. More...
 
PointSetIteratoroperator= (const PointSetIterator &rhs)
 
AbstractPositionIterator< T > & operator= (const AbstractPositionIterator< T > &rhs)
 Assignment operator. More...
 
operator[] (const unsigned int i) const
 Returns the real value in current position (column, row, band) from iterator. More...
 
 PointSetIterator ()
 
 PointSetIterator (const te::rst::Raster *r, const std::vector< te::gm::Point *> p)
 Constructor. More...
 
 PointSetIterator (const PointSetIterator &rhs)
 Copy constructor. More...
 
void setEnd ()
 Sets the iterator position to the end of the current band. More...
 
 ~PointSetIterator ()
 

Static Public Member Functions

static PointSetIterator begin (const te::rst::Raster *r, const std::vector< te::gm::Point *> p)
 Returns an iterator referring to the first value of the band. More...
 
static PointSetIterator end (const te::rst::Raster *r, const std::vector< te::gm::Point *> p)
 Returns an iterator referring to after the end of the iterator. More...
 

Protected Attributes

int m_currentpixelindex
 The index of the current pixel location. More...
 
double m_operatorBrackets_value
 Used by the operator[] method. More...
 
std::complex< double > m_operatorParenthesis_value
 Used by the operator() method. More...
 
std::vector< te::gm::Point * > m_pixelsinpointset
 The spatial restriction to be applied in the iterator. More...
 
const te::rst::Rasterm_raster
 The band from where to get the values. More...
 

Detailed Description

template<typename T>
class te::rst::PointSetIterator< T >

This class implements the strategy to iterate with spatial restriction, the iteration occurs inside a vector of points.

Definition at line 388 of file PositionIterator.h.

Constructor & Destructor Documentation

◆ PointSetIterator() [1/3]

template<typename T >
te::rst::PointSetIterator< T >::PointSetIterator ( )

Definition at line 1436 of file PositionIterator.h.

◆ PointSetIterator() [2/3]

◆ PointSetIterator() [3/3]

template<typename T >
te::rst::PointSetIterator< T >::PointSetIterator ( const PointSetIterator< T > &  rhs)

Copy constructor.

Parameters
rhsThe right-hand-side copy used to copy from.

Definition at line 1479 of file PositionIterator.h.

◆ ~PointSetIterator()

template<typename T >
te::rst::PointSetIterator< T >::~PointSetIterator ( )

Definition at line 1486 of file PositionIterator.h.

Member Function Documentation

◆ begin()

template<typename T >
te::rst::PointSetIterator< T > te::rst::PointSetIterator< T >::begin ( const te::rst::Raster r,
const std::vector< te::gm::Point *>  p 
)
static

Returns an iterator referring to the first value of the band.

Definition at line 1570 of file PositionIterator.h.

◆ end()

template<typename T >
te::rst::PointSetIterator< T > te::rst::PointSetIterator< T >::end ( const te::rst::Raster r,
const std::vector< te::gm::Point *>  p 
)
static

Returns an iterator referring to after the end of the iterator.

Definition at line 1575 of file PositionIterator.h.

References te::rst::PointSetIterator< T >::setEnd().

◆ getColumn()

template<typename T >
unsigned int te::rst::PointSetIterator< T >::getColumn ( ) const
virtual

Returns the current column in iterator.

Implements te::rst::AbstractPositionIterator< T >.

Definition at line 1524 of file PositionIterator.h.

◆ getRow()

template<typename T >
unsigned int te::rst::PointSetIterator< T >::getRow ( ) const
virtual

Returns the current row in iterator.

Implements te::rst::AbstractPositionIterator< T >.

Definition at line 1519 of file PositionIterator.h.

◆ operator!=() [1/2]

template<typename T >
bool te::rst::PointSetIterator< T >::operator!= ( const PointSetIterator< T > &  rhs) const

◆ operator!=() [2/2]

template<typename T >
bool te::rst::PointSetIterator< T >::operator!= ( const AbstractPositionIterator< T > &  rhs) const
virtual

Difference operator.

Parameters
rhsThe right-hand side to compare.
Returns
Returns true if the iterators are at different positions, or false otherwise.

Implements te::rst::AbstractPositionIterator< T >.

Definition at line 1590 of file PositionIterator.h.

References operator!=().

◆ operator()()

template<typename T >
std::complex< T > te::rst::PointSetIterator< T >::operator() ( const unsigned int  i) const
virtual

Returns the complex value in current position (column, row, band) from iterator.

Parameters
iThe band index.
Returns
The pixel comples value in current position.
Note
For real values use operator[]

Implements te::rst::AbstractPositionIterator< T >.

Definition at line 1512 of file PositionIterator.h.

◆ operator*()

template<typename T >
const std::vector< T > te::rst::PointSetIterator< T >::operator* ( ) const
virtual

Returns a vector of the values in current position (column, row) from iterator.

Implements te::rst::AbstractPositionIterator< T >.

Definition at line 1491 of file PositionIterator.h.

◆ operator++()

template<typename T >
void te::rst::PointSetIterator< T >::operator++ ( )
virtual

Advances to the next position.

Implements te::rst::AbstractPositionIterator< T >.

Definition at line 1529 of file PositionIterator.h.

◆ operator--()

template<typename T >
void te::rst::PointSetIterator< T >::operator-- ( )
virtual

Returns to the previous position.

Implements te::rst::AbstractPositionIterator< T >.

Definition at line 1537 of file PositionIterator.h.

◆ operator=() [1/2]

◆ operator=() [2/2]

template<typename T >
AbstractPositionIterator< T > & te::rst::PointSetIterator< T >::operator= ( const AbstractPositionIterator< T > &  rhs)
virtual

Assignment operator.

Parameters
rhsThe right-hand-side copy used to copy from.
Returns
A reference to this object.

Reimplemented from te::rst::AbstractPositionIterator< T >.

Definition at line 1559 of file PositionIterator.h.

◆ operator[]()

template<typename T >
T te::rst::PointSetIterator< T >::operator[] ( const unsigned int  i) const
virtual

Returns the real value in current position (column, row, band) from iterator.

Parameters
iThe band index.
Returns
The pixel real value in current position.
Note
For complex values use operator()

Implements te::rst::AbstractPositionIterator< T >.

Definition at line 1505 of file PositionIterator.h.

◆ setEnd()

template<typename T >
void te::rst::PointSetIterator< T >::setEnd ( )
virtual

Sets the iterator position to the end of the current band.

Parameters
bThe band to retrieve the end information.

Implements te::rst::AbstractPositionIterator< T >.

Definition at line 1565 of file PositionIterator.h.

Referenced by te::rst::PointSetIterator< T >::end(), and te::rst::PointSetIterator< T >::PointSetIterator().

Member Data Documentation

◆ m_currentpixelindex

template<typename T>
int te::rst::PointSetIterator< T >::m_currentpixelindex
protected

The index of the current pixel location.

Definition at line 445 of file PositionIterator.h.

Referenced by te::rst::PointSetIterator< T >::operator!=(), and te::rst::PointSetIterator< T >::operator=().

◆ m_operatorBrackets_value

template<typename T>
double te::rst::PointSetIterator< T >::m_operatorBrackets_value
mutableprotected

Used by the operator[] method.

Definition at line 446 of file PositionIterator.h.

◆ m_operatorParenthesis_value

template<typename T>
std::complex< double > te::rst::PointSetIterator< T >::m_operatorParenthesis_value
mutableprotected

Used by the operator() method.

Definition at line 447 of file PositionIterator.h.

◆ m_pixelsinpointset

template<typename T>
std::vector<te::gm::Point*> te::rst::PointSetIterator< T >::m_pixelsinpointset
protected

The spatial restriction to be applied in the iterator.

Definition at line 444 of file PositionIterator.h.

Referenced by te::rst::PointSetIterator< T >::operator=(), and te::rst::PointSetIterator< T >::PointSetIterator().

◆ m_raster

template<typename T>
const te::rst::Raster* te::rst::PointSetIterator< T >::m_raster
protected

The band from where to get the values.

Definition at line 443 of file PositionIterator.h.

Referenced by te::rst::PointSetIterator< T >::PointSetIterator().


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