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)
   332 #endif  // __TERRALIB_RASTER_INTERNAL_RASTERITERATOR_H bool operator!=(const RasterIterator &rhs) const
Difference operator. 
 
void operator++()
Advances to the next position. 
 
RasterIterator()
Empty constructor. 
 
It describes one band (or dimension) of a raster. 
 
T operator[](const unsigned int i) const
Returns the value in current position (column, row, band) from iterator. 
 
virtual const Band * getBand(std::size_t i) const =0
Returns the raster i-th band. 
 
std::vector< BandIterator< T > > m_it
The vector of band iterators. 
 
bool isNoDataValue()
Check if current position from iterartor represents a pixel with no data value. 
 
This class implements and iterator to "navigate" over a raster, with a predefined number of bands...
 
unsigned int getRow() const
Returns the current row in iterator. 
 
std::vector< T > operator*() const
Returns a vector with pixel values from all bands in current position (column, row) from iterator...
 
static RasterIterator begin(Raster *r, const std::vector< unsigned int > &bands, bool ignoreNoDataValue=false)
Returns an iterator referring to the first value. 
 
void operator--()
Returns to the previous position. 
 
An abstract class for raster data strucutures. 
 
It implements an iterator to "navigate" over a single band (const or not const). 
 
std::vector< unsigned int > m_b
The vector of bands to iterate. 
 
It gives access to values in one band (dimension) of a raster. 
 
RasterIterator & operator=(const RasterIterator &rhs)
Assignment operator. 
 
bool m_ignoreNoDataValue
Flag used to not iterate over pixels with no data value. 
 
unsigned int getColumn() const
Returns the current column in iterator. 
 
This class implements an iterator to "navigate" over a single band. 
 
static RasterIterator end(Raster *r, const std::vector< unsigned int > &bands)
Returns an iterator referring to after the end of the iterator. 
 
~RasterIterator()
Destructor. 
 
void getValues(std::vector< T > &v) const
Gets the values from all bands in current position (column, row) from iterator. 
 
Raster * m_raster
The raster from where to get the values.