All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
te::rp::RasterAttributes Class Reference

Extraction of attributes from Raster, Bands, and Polygons. More...

#include <RasterAttributes.h>

Inheritance diagram for te::rp::RasterAttributes:
te::rp::Algorithm

Public Member Functions

bool execute (AlgorithmOutputParameters &outputParams) throw (te::rp::Exception)
 Executes the algorithm using the supplied parameters. More...
 
boost::numeric::ublas::matrix
< double > 
getCovarianceMatrix (const te::rst::Raster &raster, const te::gm::Polygon &polygon, std::vector< unsigned int > bands)
 Returns the covariance matrix between raster bands, inside the polygon. More...
 
std::complex< double > getMean (const te::rst::Band &band, const te::gm::Polygon &polygon)
 Returns the mean value for the pixels of a band, inside the polygon. More...
 
std::vector< std::complex
< double > > 
getMeans (const te::rst::Raster &raster, const te::gm::Polygon &polygon, std::vector< unsigned int > bands)
 Returns the mean value for the pixels of a band, inside the polygon. More...
 
std::vector< std::complex
< double > > 
getValuesFromBand (const te::rst::Raster &raster, unsigned int band, const te::gm::Polygon &polygon)
 Returns the pixel values for the band, inside the polygon. More...
 
std::vector< std::vector
< std::complex< double > > > 
getValuesFromRaster (const te::rst::Raster &raster, const te::gm::Polygon &polygon, std::vector< unsigned int > bands)
 Returns the pixel values for all the bands in raster, inside the polygon. More...
 
bool initialize (const AlgorithmInputParameters &inputParams) throw (te::rp::Exception)
 Initialize the algorithm instance making it ready for execution. More...
 
bool isInitialized () const
 Returns true if the algorithm instance is initialized and ready for execution. More...
 
 RasterAttributes ()
 Public constructor. More...
 
void reset () throw (te::rp::Exception)
 Clear all internal allocated objects and reset the algorithm to its initial state. More...
 
 ~RasterAttributes ()
 

Detailed Description

Extraction of attributes from Raster, Bands, and Polygons.

Definition at line 61 of file RasterAttributes.h.

Constructor & Destructor Documentation

te::rp::RasterAttributes::RasterAttributes ( )

Public constructor.

Definition at line 35 of file RasterAttributes.cpp.

te::rp::RasterAttributes::~RasterAttributes ( )

Definition at line 39 of file RasterAttributes.cpp.

Member Function Documentation

bool te::rp::RasterAttributes::execute ( AlgorithmOutputParameters outputParams)
throw (te::rp::Exception
)
virtual

Executes the algorithm using the supplied parameters.

Parameters
outputParamsOutput parameters.
Returns
true if OK, false on errors.

Implements te::rp::Algorithm.

Definition at line 53 of file RasterAttributes.cpp.

boost::numeric::ublas::matrix< double > te::rp::RasterAttributes::getCovarianceMatrix ( const te::rst::Raster raster,
const te::gm::Polygon polygon,
std::vector< unsigned int >  bands 
)

Returns the covariance matrix between raster bands, inside the polygon.

Parameters
rasterThe input raster.
polygonThe input polygon.
bandsBands to be processed from the input raster.
Returns
The covariance matrix between raster bands, inside the polygon.
Warning
Raster bands and polygon must fit.

Definition at line 161 of file RasterAttributes.cpp.

References te::rst::Raster::getNumberOfBands().

std::complex< double > te::rp::RasterAttributes::getMean ( const te::rst::Band band,
const te::gm::Polygon polygon 
)

Returns the mean value for the pixels of a band, inside the polygon.

Parameters
bandThe input band.
polygonThe input polygon.
Returns
The mean value for the band, inside the polygon.
Warning
Bands and polygon must fit.

Definition at line 115 of file RasterAttributes.cpp.

References te::rst::Band::getProperty(), te::rst::Band::getRaster(), and te::rst::BandProperty::m_idx.

std::vector< std::complex< double > > te::rp::RasterAttributes::getMeans ( const te::rst::Raster raster,
const te::gm::Polygon polygon,
std::vector< unsigned int >  bands 
)

Returns the mean value for the pixels of a band, inside the polygon.

Parameters
rasterThe input raster.
polygonThe input polygon.
bandsBands to be processed from the input raster.
Returns
A vector of means from the raster, inside the polygon.
Warning
Bands and polygon must fit, the bands to be processed must be available in the input raster.

Definition at line 124 of file RasterAttributes.cpp.

References te::rst::PolygonIterator< T >::begin(), te::rst::PolygonIterator< T >::end(), te::rst::PolygonIterator< T >::getColumn(), te::rst::Raster::getNumberOfBands(), te::rst::PolygonIterator< T >::getRow(), and te::rst::Raster::getValue().

std::vector< std::complex< double > > te::rp::RasterAttributes::getValuesFromBand ( const te::rst::Raster raster,
unsigned int  band,
const te::gm::Polygon polygon 
)

Returns the pixel values for the band, inside the polygon.

Parameters
rasterThe input raster.
bandThe position of the input band.
polygonThe input polygon.
Returns
The pixel values for the band, inside the polygon.
Warning
Band and polygon must fit.

Definition at line 62 of file RasterAttributes.cpp.

References te::rst::PolygonIterator< T >::begin(), te::rst::PolygonIterator< T >::end(), and te::rst::Raster::getNumberOfBands().

std::vector< std::vector< std::complex< double > > > te::rp::RasterAttributes::getValuesFromRaster ( const te::rst::Raster raster,
const te::gm::Polygon polygon,
std::vector< unsigned int >  bands 
)

Returns the pixel values for all the bands in raster, inside the polygon.

Parameters
rasterThe input band.
polygonThe input polygon.
bandsBands to be processed from the input raster.
Returns
A vector with the pixel values for all the bands in raster, inside the polygon, with values[pixel][band].
Warning
Bands and polygon must fit.

Definition at line 83 of file RasterAttributes.cpp.

References te::rst::PolygonIterator< T >::begin(), te::rst::PolygonIterator< T >::end(), te::rst::PolygonIterator< T >::getColumn(), te::rst::Raster::getNumberOfBands(), te::rst::PolygonIterator< T >::getRow(), and te::rst::Raster::getValue().

bool te::rp::RasterAttributes::initialize ( const AlgorithmInputParameters inputParams)
throw (te::rp::Exception
)
virtual

Initialize the algorithm instance making it ready for execution.

Parameters
inputParamsInput parameters.
Returns
true if OK, false on errors.
Note
A return error string can be obtained via te::rp::Module::getLastLogStr()

Implements te::rp::Algorithm.

Definition at line 43 of file RasterAttributes.cpp.

bool te::rp::RasterAttributes::isInitialized ( ) const
virtual

Returns true if the algorithm instance is initialized and ready for execution.

Returns
true if the algorithm instance is initialized and ready for execution.

Implements te::rp::Algorithm.

Definition at line 48 of file RasterAttributes.cpp.

void te::rp::RasterAttributes::reset ( )
throw (te::rp::Exception
)
virtual

Clear all internal allocated objects and reset the algorithm to its initial state.

Implements te::rp::Algorithm.

Definition at line 58 of file RasterAttributes.cpp.


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