27#ifndef __TERRALIB_RASTER_INTERNAL_RASTERITERATOR_H 
   28#define __TERRALIB_RASTER_INTERNAL_RASTERITERATOR_H 
   65        RasterIterator(
Raster* r, 
const std::vector<unsigned int>& bands, 
bool ignoreNoDataValue = 
false);
 
   78        unsigned int getRow() 
const;
 
  155        std::vector<unsigned int> 
m_b;           
 
  157        std::vector<BandIterator<T> > 
m_it;      
 
  171        m_ignoreNoDataValue(ignoreNoDataValue)
 
  173      for(
unsigned int i = 0; i < 
m_b.size(); i++)
 
  180        if(isDummyValue == 
true)
 
  196      return m_it[0].getRow();
 
  201      return m_it[0].getColumn();
 
  211      std::vector<T> values(m_b.size());
 
  220      for (
unsigned int b = 0; b < m_b.size(); b++)
 
  226      if (m_ignoreNoDataValue == 
false)
 
  228        for (
unsigned int b = 0; b < m_b.size(); b++)
 
  233        bool isDummyValue = 
true;
 
  237          for (
unsigned int b = 0; b < m_b.size(); b++)
 
  240          isDummyValue = isNoDataValue();
 
  252      if (m_ignoreNoDataValue == 
false)
 
  254        for (
unsigned int b = 0; b < m_b.size(); b++)
 
  259        bool isDummyValue = 
true;
 
  263          for (
unsigned int b = 0; b < m_b.size(); b++)
 
  266          isDummyValue = isNoDataValue();
 
  294      return (m_it[0] != rhs.
m_it[0]);
 
  306      for(
unsigned int i = 0; i < bands.size(); i++)
 
  314      std::vector<T> values(m_b.size());
 
  318      for (std::size_t i = 0; i < m_b.size(); ++i)
 
  320        if (values[i] != m_raster->getBand(i)->getProperty()->m_noDataValue)
 
It implements an iterator to "navigate" over a single band (const or not const).
It describes one band (or dimension) of a raster.
This class implements an iterator to "navigate" over a single band.
This class implements and iterator to "navigate" over a raster, with a predefined number of bands.
Raster * m_raster
The raster from where to get the values.
bool operator!=(const RasterIterator &rhs) const
Difference operator.
std::vector< T > operator*() const
Returns a vector with pixel values from all bands in current position (column, row) from iterator.
std::vector< BandIterator< T > > m_it
The vector of band iterators.
void operator--()
Returns to the previous position.
RasterIterator()
Empty constructor.
bool isNoDataValue()
Check if current position from iterartor represents a pixel with no data value.
unsigned int getRow() const
Returns the current row in iterator.
std::vector< unsigned int > m_b
The vector of bands to iterate.
unsigned int getColumn() const
Returns the current column in iterator.
RasterIterator & operator=(const RasterIterator &rhs)
Assignment operator.
~RasterIterator()
Destructor.
static RasterIterator begin(Raster *r, const std::vector< unsigned int > &bands, bool ignoreNoDataValue=false)
Returns an iterator referring to the first value.
static RasterIterator end(Raster *r, const std::vector< unsigned int > &bands)
Returns an iterator referring to after the end of the iterator.
T operator[](const unsigned int i) const
Returns the value in current position (column, row, band) from iterator.
void operator++()
Advances to the next position.
bool m_ignoreNoDataValue
Flag used to not iterate over pixels with no data value.
void getValues(std::vector< T > &v) const
Gets the values from all bands in current position (column, row) from iterator.
An abstract class for raster data strucutures.
virtual const Band * getBand(std::size_t i) const =0
Returns the raster i-th band.
Band implementation for TerraLib 4.x.