Loading...
Searching...
No Matches
te::rst::AbstractBandIterator< T > Class Template Referenceabstract

This class implements an abstract iterator to "navigate" over a single band. More...

#include <BandIterator.h>

Inheritance diagram for te::rst::AbstractBandIterator< T >:
te::rst::BandIterator< T > te::rst::ConstBandIterator< T > te::rst::BandIteratorWithMask< T >

Public Member Functions

 AbstractBandIterator ()
 Constructor.
 
 AbstractBandIterator (const AbstractBandIterator &rhs)
 Copy constructor.
 
 AbstractBandIterator (const te::rst::Band *b)
 Constructor.
 
unsigned int getColumn () const
 Returns the current column in iterator.
 
unsigned int getRow () const
 Returns the current row in iterator.
 
bool operator!= (const AbstractBandIterator &rhs) const
 Difference operator.
 
virtual const T operator* () const =0
 Returns the value in current position (column, row) from iterator.
 
virtual void operator++ ()
 Advances to the next position.
 
void operator-- ()
 Returns to the previous position.
 
AbstractBandIteratoroperator= (const AbstractBandIterator &rhs)
 Assignment operator.
 
virtual void replaceBlock ()=0
 Replaces the current bufferized block values.
 
virtual ~AbstractBandIterator ()
 Destructor.
 

Protected Member Functions

void reset ()
 Reset this instance to a initial state.
 

Protected Attributes

T * m_blk
 Internal block.
 
int m_blkh
 The internal block height.
 
int m_blksize
 The block size of the band.
 
int m_blkw
 The internal block width.
 
int m_blkx
 The position in X of the current block.
 
int m_blky
 The position in Y of the current block.
 
te::rst::GetBufferValueFPtr m_getBuff
 A pointer to a function that helps to extract a double or complex value from a specific buffer data type (char, int16, int32, float, ...).
 
te::rst::GetBufferValueFPtr m_getBuffI
 A pointer to a function that helps to extract the imaginary part value from a specific buffer data type (cint16, cint32, cfloat, cdouble).
 
int m_i
 The actual position inside the block.
 
int m_lastblksize
 The number of pixels inside the last block.
 
int m_nblocksx
 The number of blocks in X direction.
 
int m_nblocksy
 The number of blocks in Y direction.
 
int m_npxlsblk
 The maximum number of pixels inside the block.
 
te::rst::SetBufferValueFPtr m_setBuff
 A pointer to a function that helps to insert a double or complex value into a specific buffer data type (char, int16, int32, float, ...).
 
te::rst::SetBufferValueFPtr m_setBuffI
 A pointer to a function that helps to insert the imaginary part value into a specific buffer data type (cint16, cint32, cfloat, cdouble).
 

Detailed Description

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

This class implements an abstract iterator to "navigate" over a single band.

We provide an efficient method to obtain all values in a raster, without regard to their locations. The implementation navigates through the blocks of the image.

See also
te::rst::Band

Definition at line 58 of file BandIterator.h.

Constructor & Destructor Documentation

◆ AbstractBandIterator() [1/3]

◆ AbstractBandIterator() [2/3]

◆ AbstractBandIterator() [3/3]

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

Copy constructor.

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

Definition at line 363 of file BandIterator.h.

References AbstractBandIterator(), operator=(), and reset().

◆ ~AbstractBandIterator()

template<class T>
te::rst::AbstractBandIterator< T >::~AbstractBandIterator ( )
virtual

Destructor.

Definition at line 370 of file BandIterator.h.

References m_blk.

Member Function Documentation

◆ getColumn()

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

Returns the current column in iterator.

Definition at line 383 of file BandIterator.h.

References m_blkw, m_blkx, and m_i.

◆ getRow()

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

Returns the current row in iterator.

Definition at line 378 of file BandIterator.h.

References m_blkh, m_blkw, m_blky, and m_i.

◆ operator!=()

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

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 483 of file BandIterator.h.

References AbstractBandIterator(), and m_blky.

◆ operator*()

template<class T>
virtual const T te::rst::AbstractBandIterator< T >::operator* ( ) const
pure virtual

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

Implemented in te::rst::BandIterator< T >, and te::rst::ConstBandIterator< T >.

References AbstractBandIterator().

◆ operator++()

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

Advances to the next position.

Reimplemented in te::rst::BandIteratorWithMask< T >.

Definition at line 388 of file BandIterator.h.

References m_blkx, m_blky, m_i, m_lastblksize, m_nblocksx, m_nblocksy, m_npxlsblk, and replaceBlock().

Referenced by te::rst::BandIteratorWithMask< T >::operator++().

◆ operator--()

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

Returns to the previous position.

Definition at line 417 of file BandIterator.h.

References m_blkx, m_blky, m_i, m_nblocksx, m_nblocksy, m_npxlsblk, and replaceBlock().

Referenced by te::rst::BandIteratorWithMask< T >::operator--().

◆ operator=()

template<class T>
te::rst::AbstractBandIterator< T > & te::rst::AbstractBandIterator< T >::operator= ( const AbstractBandIterator< T > & rhs)

Assignment operator.

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

Definition at line 445 of file BandIterator.h.

References m_blk, m_blkh, m_blksize, m_blkw, m_blkx, m_blky, m_getBuff, m_getBuffI, m_i, m_lastblksize, m_nblocksx, m_nblocksy, m_npxlsblk, m_setBuff, m_setBuffI, and reset().

Referenced by AbstractBandIterator(), te::rst::BandIterator< T >::operator=(), and te::rst::ConstBandIterator< T >::operator=().

◆ replaceBlock()

template<class T>
virtual void te::rst::AbstractBandIterator< T >::replaceBlock ( )
pure virtual

Replaces the current bufferized block values.

Implemented in te::rst::BandIterator< T >, and te::rst::ConstBandIterator< T >.

Referenced by operator++(), and operator--().

◆ reset()

template<class T>
void te::rst::AbstractBandIterator< T >::reset ( )
protected

Member Data Documentation

◆ m_blk

◆ m_blkh

template<class T>
int te::rst::AbstractBandIterator< T >::m_blkh
protected

The internal block height.

Definition at line 121 of file BandIterator.h.

Referenced by AbstractBandIterator(), getRow(), operator=(), and reset().

◆ m_blksize

template<class T>
int te::rst::AbstractBandIterator< T >::m_blksize
protected

◆ m_blkw

template<class T>
int te::rst::AbstractBandIterator< T >::m_blkw
protected

The internal block width.

Definition at line 120 of file BandIterator.h.

Referenced by AbstractBandIterator(), getColumn(), getRow(), operator=(), and reset().

◆ m_blkx

◆ m_blky

◆ m_getBuff

template<class T>
te::rst::GetBufferValueFPtr te::rst::AbstractBandIterator< T >::m_getBuff
protected

A pointer to a function that helps to extract a double or complex value from a specific buffer data type (char, int16, int32, float, ...).

Definition at line 131 of file BandIterator.h.

Referenced by AbstractBandIterator(), te::rst::BandIterator< T >::operator*(), te::rst::BandIterator< T >::operator*(), te::rst::ConstBandIterator< T >::operator*(), operator=(), and reset().

◆ m_getBuffI

template<class T>
te::rst::GetBufferValueFPtr te::rst::AbstractBandIterator< T >::m_getBuffI
protected

A pointer to a function that helps to extract the imaginary part value from a specific buffer data type (cint16, cint32, cfloat, cdouble).

Definition at line 132 of file BandIterator.h.

Referenced by AbstractBandIterator(), operator=(), and reset().

◆ m_i

◆ m_lastblksize

template<class T>
int te::rst::AbstractBandIterator< T >::m_lastblksize
protected

The number of pixels inside the last block.

Definition at line 128 of file BandIterator.h.

Referenced by AbstractBandIterator(), operator++(), operator=(), and reset().

◆ m_nblocksx

template<class T>
int te::rst::AbstractBandIterator< T >::m_nblocksx
protected

The number of blocks in X direction.

Definition at line 123 of file BandIterator.h.

Referenced by AbstractBandIterator(), operator++(), operator--(), operator=(), and reset().

◆ m_nblocksy

template<class T>
int te::rst::AbstractBandIterator< T >::m_nblocksy
protected

The number of blocks in Y direction.

Definition at line 124 of file BandIterator.h.

Referenced by AbstractBandIterator(), operator++(), operator--(), operator=(), and reset().

◆ m_npxlsblk

template<class T>
int te::rst::AbstractBandIterator< T >::m_npxlsblk
protected

The maximum number of pixels inside the block.

Definition at line 122 of file BandIterator.h.

Referenced by AbstractBandIterator(), operator++(), operator--(), operator=(), and reset().

◆ m_setBuff

template<class T>
te::rst::SetBufferValueFPtr te::rst::AbstractBandIterator< T >::m_setBuff
protected

A pointer to a function that helps to insert a double or complex value into a specific buffer data type (char, int16, int32, float, ...).

Definition at line 133 of file BandIterator.h.

Referenced by AbstractBandIterator(), operator=(), and reset().

◆ m_setBuffI

template<class T>
te::rst::SetBufferValueFPtr te::rst::AbstractBandIterator< T >::m_setBuffI
protected

A pointer to a function that helps to insert the imaginary part value into a specific buffer data type (cint16, cint32, cfloat, cdouble).

Definition at line 134 of file BandIterator.h.

Referenced by AbstractBandIterator(), operator=(), and reset().


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