Spectral Angle Mapper classification strategy. More...
#include <ClassifierSAMStrategy.h>
Classes | |
class | Parameters |
Classifier Parameters. More... | |
Public Types | |
typedef std::map< ClassIDT, SamplesT > | ClassesSamplesT |
Classes samples container type definition. More... | |
typedef boost::shared_ptr< ClassesSamplesT > | ClassesSamplesTPtr |
A shared pointer to a multi classes samples container type definition. More... | |
typedef unsigned int | ClassIDT |
Class ID type definition (zero means invalid ID). More... | |
typedef std::vector< SampleT > | SamplesT |
Class samples container type definition. More... | |
typedef std::vector< double > | SampleT |
Class sample type definition. More... | |
Public Member Functions | |
ClassifierSAMStrategy () | |
void | enableMultiThread (const bool &enable) |
Enable / disable the use of multiple threads. More... | |
void | enableOutputPalette (const bool enabled) |
Enable (true) or disable (false) the creation of a paletted output raster. More... | |
void | enableProgressInterface (const bool &enable) |
Enable / disable the progress interface. More... | |
void | enableRasterCache (const bool &enable) |
Enable / disable the use of raster data cache. More... | |
bool | execute () |
Executes the classification strategy. More... | |
const std::string & | getErrorMessage () const |
Return the current error message if there is any. More... | |
void | getMetaData (std::map< std::string, std::string > &metadata) const |
Returns strategy-dependent metadata. More... | |
virtual ClassifierStrategyOutParameters const * | getOutputParameters () const |
Returns a pointer to the strategy output execution parameters or a null pointer if there are none. More... | |
bool | initialize (ClassifierStrategyParameters const *const strategyParams) |
Initialize the classification strategy. More... | |
std::unique_ptr< te::rst::Raster > | releaseOutputRaster () |
Returns a pointer to the output raster or a void pointer if there is none. More... | |
void | setInputPolygons (const std::vector< te::gm::Polygon * > &polygonsPtrs) |
Set the input polygons. More... | |
void | setInputRaster (const te::rst::Raster &raster) |
Set the input raster. More... | |
void | setInputRasterBands (const std::vector< unsigned int > &rasterBands) |
Set the input raste bandsr. More... | |
void | setUserOutputPalette (std::vector< te::rst::BandProperty::ColorEntry > &userPalette) |
Set the output user palette. More... | |
~ClassifierSAMStrategy () | |
Protected Member Functions | |
bool | createOutputRaster (const std::vector< int > &bandsDataTypes, const std::vector< double > &noDataValues) |
Create the output raster using the EXPANSIBLE driver. More... | |
virtual void | reset () |
Reset to an initial state. More... | |
void | setErrorMessage (const std::string &newErrorMessage) |
Set the current error message. More... | |
bool | setOutputRasterPalette (const unsigned int size) |
Create and set the output raster palette folowing the current internal settings. More... | |
Protected Attributes | |
std::vector< ClassIDT > | m_classesIndex2ID |
An class index ordered vector of classes IDs;. More... | |
SamplesT | m_classesMeans |
Classes means. More... | |
bool | m_createRasterPalette |
Enable (true) or disable (false) the creation of a paletted output raster. More... | |
bool | m_enableMultiThread |
Enable or disable the use multipe threads. More... | |
bool | m_enableRasterCache |
Enable or disable the use a raster data cache. More... | |
ClassIDT | m_highestTrainClassID |
ClassifierSAMStrategy::Parameters | m_initParams |
Initialization parameters. More... | |
std::vector< te::gm::Polygon * > const * | m_inputPolygonsPtr |
Input polygons. More... | |
std::vector< unsigned int > | m_inputRasterBands |
Input raster bands. More... | |
te::rst::Raster const * | m_inputRasterPtr |
A pointer to the input raster. More... | |
bool | m_isInitialized |
Is this instance initialized? More... | |
std::map< std::string, std::string > | m_metaData |
Strategy-dependent metadata. More... | |
std::unique_ptr< te::rst::Raster > | m_outputRasterPtr |
A pointer to the output raster. More... | |
bool | m_progressInterfaceEnabled |
Progress interface status. More... | |
std::vector< te::rst::BandProperty::ColorEntry > | m_userOutputPalette |
User output raster palette (it must be large enough to accomodate all classifyier generated classes or an empty vector to automatically generate an random palette. More... | |
Private Attributes | |
std::string | m_errorMessage |
Current error message. More... | |
Spectral Angle Mapper classification strategy.
This algorithm maps the spectral similarity of input raster to the given reference spectra wich can be either laboratory of field spectra. This method assumes that the data have been reduced to apparent reflectance with all dark current and path radiance biases removed. Reference: The spectral image processing system (SIPS)- interactive visualization and analysis of imaging spectrometer data. Kruse, F. A.; Lefkoff, A. B.; Boardman, J. W.; Heidebrecht, K. B.; Shapiro, A. T.; Barloon, P. J.; Goetz, A. F. H. The earth and space science information system (ESSIS). AIP Conference Proceedings, Volume 283, pp. 192-201 (1993).
Definition at line 57 of file ClassifierSAMStrategy.h.
typedef std::map< ClassIDT, SamplesT > te::rp::ClassifierSAMStrategy::ClassesSamplesT |
Classes samples container type definition.
Definition at line 67 of file ClassifierSAMStrategy.h.
typedef boost::shared_ptr<ClassesSamplesT> te::rp::ClassifierSAMStrategy::ClassesSamplesTPtr |
A shared pointer to a multi classes samples container type definition.
Definition at line 69 of file ClassifierSAMStrategy.h.
typedef unsigned int te::rp::ClassifierSAMStrategy::ClassIDT |
Class ID type definition (zero means invalid ID).
Definition at line 61 of file ClassifierSAMStrategy.h.
typedef std::vector< SampleT > te::rp::ClassifierSAMStrategy::SamplesT |
Class samples container type definition.
Definition at line 65 of file ClassifierSAMStrategy.h.
typedef std::vector< double > te::rp::ClassifierSAMStrategy::SampleT |
Class sample type definition.
Definition at line 63 of file ClassifierSAMStrategy.h.
te::rp::ClassifierSAMStrategy::ClassifierSAMStrategy | ( | ) |
te::rp::ClassifierSAMStrategy::~ClassifierSAMStrategy | ( | ) |
|
protectedinherited |
Create the output raster using the EXPANSIBLE driver.
bandsDataTypes | Bands data types. |
noDataValues | A vector of no-data values for each band. |
|
inherited |
Enable / disable the use of multiple threads.
enable | Enable (true) or disable (false) the use of multiple threads. |
|
inherited |
Enable (true) or disable (false) the creation of a paletted output raster.
enabled | Enable (true) or disable (false) the creation of a paletted output raster. |
|
inherited |
Enable / disable the progress interface.
enable | Enable (true) or disable (false) the progress interface. |
|
inherited |
Enable / disable the use of raster data cache.
enable | Enable (true) or disable (false) the use of raster cache. |
|
virtual |
Executes the classification strategy.
Implements te::rp::ClassifierStrategy.
|
inherited |
Return the current error message if there is any.
|
inherited |
Returns strategy-dependent metadata.
metadata | Strategy-dependent metadata. |
|
virtualinherited |
Returns a pointer to the strategy output execution parameters or a null pointer if there are none.
Reimplemented in te::rp::ClassifierMAPStrategy.
|
virtual |
Initialize the classification strategy.
strategyParams | A pointer to the user given specific classification strategy parameters ou NULL if no parameters are present. |
Implements te::rp::ClassifierStrategy.
|
inherited |
Returns a pointer to the output raster or a void pointer if there is none.
|
protectedvirtualinherited |
Reset to an initial state.
|
protectedinherited |
Set the current error message.
newErrorMessage | New error message; |
|
inherited |
Set the input polygons.
polygonsPtrs | Input polygons pointers. |
|
inherited |
Set the input raster.
raster | Input raster. |
|
inherited |
Set the input raste bandsr.
rasterBands | Input raster bands. |
|
protectedinherited |
Create and set the output raster palette folowing the current internal settings.
size | Palette size. |
|
inherited |
Set the output user palette.
userPalette | User output raster palette (it must be large enough to accomodate all classifyier generated classes or an empty vector to automatically generate an random palette. |
|
protected |
An class index ordered vector of classes IDs;.
Definition at line 121 of file ClassifierSAMStrategy.h.
|
protected |
Classes means.
Definition at line 119 of file ClassifierSAMStrategy.h.
|
protectedinherited |
Enable (true) or disable (false) the creation of a paletted output raster.
Definition at line 172 of file ClassifierStrategy.h.
|
protectedinherited |
Enable or disable the use multipe threads.
Definition at line 167 of file ClassifierStrategy.h.
|
protectedinherited |
Enable or disable the use a raster data cache.
Definition at line 162 of file ClassifierStrategy.h.
|
privateinherited |
Current error message.
Definition at line 236 of file ClassifierStrategy.h.
|
protected |
Definition at line 115 of file ClassifierSAMStrategy.h.
|
protected |
Initialization parameters.
Definition at line 117 of file ClassifierSAMStrategy.h.
|
protectedinherited |
Input polygons.
Definition at line 187 of file ClassifierStrategy.h.
|
protectedinherited |
Input raster bands.
Definition at line 182 of file ClassifierStrategy.h.
|
protectedinherited |
A pointer to the input raster.
Definition at line 152 of file ClassifierStrategy.h.
|
protected |
Is this instance initialized?
Definition at line 113 of file ClassifierSAMStrategy.h.
|
protectedinherited |
Strategy-dependent metadata.
Definition at line 192 of file ClassifierStrategy.h.
|
protectedinherited |
A pointer to the output raster.
Definition at line 177 of file ClassifierStrategy.h.
|
protectedinherited |
Progress interface status.
Definition at line 157 of file ClassifierStrategy.h.
|
protectedinherited |
User output raster palette (it must be large enough to accomodate all classifyier generated classes or an empty vector to automatically generate an random palette.
Definition at line 197 of file ClassifierStrategy.h.