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

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

#include <PositionIterator.h>

Inheritance diagram for te::rst::LineIterator< 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...
 
 LineIterator ()
 
 LineIterator (const te::rst::Raster *r, const te::gm::Line *l)
 Constructor. More...
 
 LineIterator (const LineIterator &rhs)
 Copy constructor. More...
 
virtual bool operator!= (const AbstractPositionIterator &rhs) const
 Difference operator. More...
 
bool operator!= (const LineIterator< T > &rhs) const
 
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...
 
LineIteratoroperator= (const LineIterator &rhs)
 
operator[] (const unsigned int i) const
 Returns the real value in current position (column, row, band) from iterator. More...
 
void setEnd ()
 Sets the iterator position to the end of the current band. More...
 
 ~LineIterator ()
 

Static Public Member Functions

static LineIterator begin (const te::rst::Raster *r, const te::gm::Line *l)
 Returns an iterator referring to the first value of the band. More...
 
static LineIterator end (const te::rst::Raster *r, const te::gm::Line *l)
 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...
 
const te::gm::Linem_line
 The spatial restriction to be applied in the iterator. 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_pixelsinline
 A vector of pixel locations that intersects the line. More...
 
const te::rst::Rasterm_raster
 The band from where to get the values. More...
 

Detailed Description

template<class T>
class te::rst::LineIterator< T >

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

Definition at line 252 of file PositionIterator.h.

Constructor & Destructor Documentation

template<class T >
te::rst::LineIterator< T >::LineIterator ( )

Definition at line 862 of file PositionIterator.h.

template<class T >
te::rst::LineIterator< T >::LineIterator ( const LineIterator< T > &  rhs)

Copy constructor.

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

Definition at line 933 of file PositionIterator.h.

template<class T >
te::rst::LineIterator< T >::~LineIterator ( )

Definition at line 940 of file PositionIterator.h.

Member Function Documentation

template<class T >
te::rst::LineIterator< T > te::rst::LineIterator< T >::begin ( const te::rst::Raster r,
const te::gm::Line l 
)
static

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

Definition at line 1018 of file PositionIterator.h.

template<class T >
te::rst::LineIterator< T > te::rst::LineIterator< T >::end ( const te::rst::Raster r,
const te::gm::Line l 
)
static

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

Definition at line 1023 of file PositionIterator.h.

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

template<class T >
unsigned int te::rst::LineIterator< T >::getColumn ( ) const
virtual

Returns the current column in iterator.

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

Definition at line 978 of file PositionIterator.h.

template<class T >
unsigned int te::rst::LineIterator< T >::getRow ( ) const
virtual

Returns the current row in iterator.

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

Definition at line 973 of file PositionIterator.h.

template<class T >
bool te::rst::AbstractPositionIterator< T >::operator!= ( const AbstractPositionIterator< T > &  rhs) const
virtualinherited

Difference operator.

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

Definition at line 406 of file PositionIterator.h.

References te::rst::AbstractPositionIterator< T >::m_raster.

template<class T >
bool te::rst::LineIterator< T >::operator!= ( const LineIterator< T > &  rhs) const
template<class T >
std::complex< T > te::rst::LineIterator< 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 966 of file PositionIterator.h.

template<class T >
const std::vector< T > te::rst::LineIterator< 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 945 of file PositionIterator.h.

template<class T >
void te::rst::LineIterator< T >::operator++ ( )
virtual

Advances to the next position.

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

Definition at line 983 of file PositionIterator.h.

template<class T >
void te::rst::LineIterator< T >::operator-- ( )
virtual

Returns to the previous position.

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

Definition at line 991 of file PositionIterator.h.

template<class T >
T te::rst::LineIterator< 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 959 of file PositionIterator.h.

template<class T >
void te::rst::LineIterator< 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 1013 of file PositionIterator.h.

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

Member Data Documentation

template<class T>
int te::rst::LineIterator< T >::m_currentpixelindex
protected

The index of the current pixel location.

Definition at line 304 of file PositionIterator.h.

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

template<class T>
const te::gm::Line* te::rst::LineIterator< T >::m_line
protected

The spatial restriction to be applied in the iterator.

Definition at line 303 of file PositionIterator.h.

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

template<class T>
double te::rst::LineIterator< T >::m_operatorBrackets_value
mutableprotected

Used by the operator[] method.

Definition at line 306 of file PositionIterator.h.

template<class T>
std::complex< double > te::rst::LineIterator< T >::m_operatorParenthesis_value
mutableprotected

Used by the operator() method.

Definition at line 307 of file PositionIterator.h.

template<class T>
std::vector<te::gm::Point*> te::rst::LineIterator< T >::m_pixelsinline
protected

A vector of pixel locations that intersects the line.

Definition at line 305 of file PositionIterator.h.

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


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