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...
 
std::vector< std::complex< double > > getComplexValuesFromBand (const te::rst::Raster &raster, unsigned int band, const te::gm::Polygon &polygon)
 Returns the pixel values (real and imag) for the band, inside the polygon. More...
 
std::vector< std::vector< std::complex< double > > > getComplexValuesFromRaster (const te::rst::Raster &raster, const te::gm::Polygon &polygon, std::vector< unsigned int > bands)
 Returns the pixel values (real and imag) for all the bands in raster, inside the polygon. More...
 
boost::numeric::ublas::matrix< double > getCovarianceMatrix (const std::vector< std::vector< double > > &vpixels, const std::vector< double > &vmeans)
 Returns the covariance matrix between vectors of pixel values. More...
 
boost::numeric::ublas::matrix< double > getGLCM (const te::rst::Raster &rin, unsigned int band, int dx, int dy)
 Computes the Gray-Level CoOccurrence Matrix (GLCM) from a raster band. More...
 
boost::numeric::ublas::matrix< double > getGLCM (const te::rst::Raster &rin, unsigned int band, int dx, int dy, const te::gm::Polygon &polygon)
 Computes the Gray-Level CoOccurrence Matrix (GLCM) from a raster band, inside the polygon. More...
 
te::rp::Texture getGLCMMetrics (boost::numeric::ublas::matrix< double > glcm)
 Compute texture metrics from GLCM matrix. More...
 
te::stat::NumericStatisticalSummary getStatistics (std::vector< double > &pixels)
 Returns several statistics from a set of pixels. More...
 
std::vector< 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< 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 63 of file RasterAttributes.h.

Constructor & Destructor Documentation

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

Public constructor.

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

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.

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

Returns the pixel values (real and imag) 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.
std::vector<std::vector<std::complex<double> > > te::rp::RasterAttributes::getComplexValuesFromRaster ( const te::rst::Raster raster,
const te::gm::Polygon polygon,
std::vector< unsigned int >  bands 
)

Returns the pixel values (real and imag) 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[band][pixel].
Warning
Bands and polygon must fit.
boost::numeric::ublas::matrix<double> te::rp::RasterAttributes::getCovarianceMatrix ( const std::vector< std::vector< double > > &  vpixels,
const std::vector< double > &  vmeans 
)

Returns the covariance matrix between vectors of pixel values.

Parameters
vpixelsThe vector of pixel vectors, with vpixels[band][pixel].
vmeansThe vector of pixels means, one mean per vector of pixels.
Returns
The covariance matrix between the vectors of pixel values.
Warning
All vectors sizes must fit.
boost::numeric::ublas::matrix<double> te::rp::RasterAttributes::getGLCM ( const te::rst::Raster rin,
unsigned int  band,
int  dx,
int  dy 
)

Computes the Gray-Level CoOccurrence Matrix (GLCM) from a raster band.

Parameters
rinThe input raster.
bandThe input band position.
dxThe displacement in x direction, to be considered as neighborhood, can be either + or -.
dyThe displacement in y direction, to be considered as neighborhood, can be either + or -.
Returns
The GLCM from the raster band.
Warning
The pixels from the input band will be considered of type unsigned int.
boost::numeric::ublas::matrix<double> te::rp::RasterAttributes::getGLCM ( const te::rst::Raster rin,
unsigned int  band,
int  dx,
int  dy,
const te::gm::Polygon polygon 
)

Computes the Gray-Level CoOccurrence Matrix (GLCM) from a raster band, inside the polygon.

Parameters
rinThe input raster.
bandThe input band position.
dxThe displacement in x direction, to be considered as neighborhood, can be either + or -.
dyThe displacement in y direction, to be considered as neighborhood, can be either + or -.
polygonThe input polygon.
Returns
The GLCM from the raster band, inside the polygon.
Warning
The pixels from the input band will be considered of type unsigned int.
te::rp::Texture te::rp::RasterAttributes::getGLCMMetrics ( boost::numeric::ublas::matrix< double >  glcm)

Compute texture metrics from GLCM matrix.

Parameters
glcmThe input GLCM matrix.
Returns
The Texture structure will all available metrics computed.
te::stat::NumericStatisticalSummary te::rp::RasterAttributes::getStatistics ( std::vector< double > &  pixels)

Returns several statistics from a set of pixels.

Parameters
pixelsA vector of pixel values.
Returns
A series of statistics (
See also
te::stat::NumericStatisticalSummary).
std::vector<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.
std::vector<std::vector<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[band][pixel].
Warning
Bands and polygon must fit.
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.

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.

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.


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