| TerraLib 4.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Examples

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Attributes
TeRaster::iterator Class Reference

A raster iterator. More...

`#include <TeRaster.h>`

Inheritance diagram for TeRaster::iterator:

List of all members.

## Public Member Functions

| iterator (int c0=0, int l0=0, int nc=0, int nl=0, int nb=0, TeRaster *pt=0)
| Constructor.
virtual | ~iterator ()
| Destructor.
virtual void | moveForward ()
| Move iterator forward.
iterator & | operator++ ()
| Prefix move forward operator.
iterator | operator++ (int)
| Posfix move forward operator.
int | currentLine ()
| Returns iterator current line.
int | currentColumn ()
| Returns iterator current column.
int | nBands (void)
| Returns the number of bands.
vector< double > | operator* ()
| Iterator de-referencing operator.
double | operator* (int band)
| Returns the value in a given band of a element pointed by the iterator.
bool | operator== (const iterator &rhs) const
| Returns whether two iterators point to the same element.
bool | operator!= (const iterator &rhs) const
| Returns whether two iterators point to the different elements.

## Protected Attributes

int | linCurrent_
int | colCurrent_
int | nLines_
int | nCols_
int | nBands_
TeRaster * | raster_

## Detailed Description

A raster iterator.

An strucuture that allows the traversal over the raster elements (pixels) in a similar way as the STL iterators.

## Constructor & Destructor Documentation

TeRaster::iterator::iterator | ( | int | c0 = `0`,
|  | int | l0 = `0`,
|  | int | nc = `0`,
|  | int | nl = `0`,
|  | int | nb = `0`,
|  | TeRaster * | pt = `0`
| ) |  | `[inline]`

Constructor.

Parameters:

  c0 | initial column
  l0 | initial line
  nc | number of columns
  nl | number of lines
  nb | number of bands
  pt | pointer to the raster to iterate

virtual TeRaster::iterator::~iterator | ( |  | ) | `[inline, virtual]`

Destructor.

## Member Function Documentation

int TeRaster::iterator::currentColumn | ( |  | ) | `[inline]`

Returns iterator current column.

int TeRaster::iterator::currentLine | ( |  | ) | `[inline]`

Returns iterator current line.

void TeRaster::iterator::moveForward | ( |  | ) | `[virtual]`

Move iterator forward.

Reimplemented in TeRaster::iteratorPoly.

int TeRaster::iterator::nBands | ( | void |  | ) | `[inline]`

Returns the number of bands.

bool TeRaster::iterator::operator!= | ( | const iterator & | rhs | ) | const

Returns whether two iterators point to the different elements.

double TeRaster::iterator::operator* | ( | int | band | ) |

Returns the value in a given band of a element pointed by the iterator.

Reimplemented in TeRaster::iteratorPoly.

vector< double > TeRaster::iterator::operator* | ( |  | ) |

Iterator de-referencing operator.

Returns:
  a vector (with nbands_ size) with the values in each band, of the element pointed by the iterator

Reimplemented in TeRaster::iteratorPoly.

TeRaster::iterator & TeRaster::iterator::operator++ | ( |  | ) |

Prefix move forward operator.

Reimplemented in TeRaster::iteratorPoly.

TeRaster::iterator TeRaster::iterator::operator++ | ( | int |  | ) |

Posfix move forward operator.

Reimplemented in TeRaster::iteratorPoly.

bool TeRaster::iterator::operator== | ( | const iterator & | rhs | ) | const

Returns whether two iterators point to the same element.

## Member Data Documentation

int TeRaster::iterator::colCurrent_`[protected]`

int TeRaster::iterator::linCurrent_`[protected]`

int TeRaster::iterator::nBands_`[protected]`

int TeRaster::iterator::nCols_`[protected]`

int TeRaster::iterator::nLines_`[protected]`

TeRaster* TeRaster::iterator::raster_`[protected]`

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

- E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/kernel/TeRaster.h
- E:/Projetos_Primeiro_Semestre_2012/TerraView/terralib/src/terralib/kernel/TeRaster.cpp

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines