27 #ifndef __TERRALIB_RASTER_INTERNAL_RASTERITERATOR_H
28 #define __TERRALIB_RASTER_INTERNAL_RASTERITERATOR_H
78 unsigned int getRow()
const;
146 std::vector<unsigned int>
m_b;
148 std::vector<BandIterator<T> >
m_it;
162 for(
unsigned int i = 0; i <
m_b.size(); i++)
177 return m_it[0].getRow();
182 return m_it[0].getColumn();
192 std::vector<T> values(m_b.size());
201 for (
unsigned int b = 0; b < m_b.size(); b++)
207 for (
unsigned int b = 0; b < m_b.size(); b++)
213 for (
unsigned int b = 0; b < m_b.size(); b++)
233 return (m_it[0] != rhs.
m_it[0]);
245 for(
unsigned int i = 0; i < bands.size(); i++)
254 #endif // __TERRALIB_RASTER_INTERNAL_RASTERITERATOR_H
void operator++()
Advances to the next position.
RasterIterator()
Empty constructor.
It describes one band (or dimension) of a raster.
unsigned int getRow() const
Returns the current row in iterator.
void getValues(std::vector< T > &v) const
Gets the values from all bands in current position (column, row) 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.
This class implements and iterator to "navigate" over a raster, with a predefined number of bands...
T operator[](const unsigned int i) const
Returns the value in current position (column, row, band) from iterator.
void operator--()
Returns to the previous position.
std::vector< T > operator*() const
Returns a vector with pixel values from all bands in current position (column, row) from iterator...
An abstract class for raster data strucutures.
static RasterIterator begin(Raster *r, const std::vector< unsigned int > &bands)
Returns an iterator referring to the first value.
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.
This class implements an iterator to "navigate" over a single band.
bool operator!=(const RasterIterator &rhs) const
Difference operator.
static RasterIterator end(Raster *r, const std::vector< unsigned int > &bands)
Returns an iterator referring to after the end of the iterator.
unsigned int getColumn() const
Returns the current column in iterator.
~RasterIterator()
Destructor.
Raster * m_raster
The raster from where to get the values.