Raster classifier strategy base class.
More...
#include <ClassifierStrategy.h>
Raster classifier strategy base class.
Definition at line 49 of file ClassifierStrategy.h.
◆ ~ClassifierStrategy()
virtual te::rp::ClassifierStrategy::~ClassifierStrategy |
( |
| ) |
|
|
virtual |
◆ ClassifierStrategy() [1/2]
te::rp::ClassifierStrategy::ClassifierStrategy |
( |
| ) |
|
|
protected |
◆ ClassifierStrategy() [2/2]
Copy constructor.
- Parameters
-
rhs | The right-hand side Raster. |
◆ createOutputRaster()
bool te::rp::ClassifierStrategy::createOutputRaster |
( |
const std::vector< int > & |
bandsDataTypes, |
|
|
const std::vector< double > & |
noDataValues |
|
) |
| |
|
protected |
Create the output raster using the EXPANSIBLE driver.
- Parameters
-
bandsDataTypes | Bands data types. |
noDataValues | A vector of no-data values for each band. |
- Returns
- true if ok,false on errors.
- Note
- A pointer to the created raster will be handled by m_outputRasterPtr.
◆ enableMultiThread()
void te::rp::ClassifierStrategy::enableMultiThread |
( |
const bool & |
enable | ) |
|
Enable / disable the use of multiple threads.
- Parameters
-
enable | Enable (true) or disable (false) the use of multiple threads. |
◆ enableOutputPalette()
void te::rp::ClassifierStrategy::enableOutputPalette |
( |
const bool |
enabled | ) |
|
Enable (true) or disable (false) the creation of a paletted output raster.
- Parameters
-
enabled | Enable (true) or disable (false) the creation of a paletted output raster. |
◆ enableProgressInterface()
void te::rp::ClassifierStrategy::enableProgressInterface |
( |
const bool & |
enable | ) |
|
Enable / disable the progress interface.
- Parameters
-
enable | Enable (true) or disable (false) the progress interface. |
◆ enableRasterCache()
void te::rp::ClassifierStrategy::enableRasterCache |
( |
const bool & |
enable | ) |
|
Enable / disable the use of raster data cache.
- Parameters
-
enable | Enable (true) or disable (false) the use of raster cache. |
◆ execute()
virtual bool te::rp::ClassifierStrategy::execute |
( |
| ) |
|
|
pure virtual |
◆ getErrorMessage()
const std::string& te::rp::ClassifierStrategy::getErrorMessage |
( |
| ) |
const |
Return the current error message if there is any.
- Returns
- Return the current error message if there is any.
◆ getMetaData()
void te::rp::ClassifierStrategy::getMetaData |
( |
std::map< std::string, std::string > & |
metadata | ) |
const |
Returns strategy-dependent metadata.
- Parameters
-
metadata | Strategy-dependent metadata. |
◆ getOutputParameters()
Returns a pointer to the strategy output execution parameters or a null pointer if there are none.
- Returns
- Returns a pointer to the strategy output execution parameters or a null pointer if there are none.
Reimplemented in te::rp::ClassifierMAPStrategy.
◆ initialize()
◆ operator=()
Assignment operator.
- Parameters
-
rhs | The right-hand-side copy that would be used to copy from. |
- Returns
- A reference to this object.
◆ releaseOutputRaster()
std::unique_ptr< te::rst::Raster > te::rp::ClassifierStrategy::releaseOutputRaster |
( |
| ) |
|
Returns a pointer to the output raster or a void pointer if there is none.
- Returns
- Returns a pointer to the output raster or a void pointer if there is none.
- Note
- The caller of this method must take the ownership of the returned object.
◆ reset()
virtual void te::rp::ClassifierStrategy::reset |
( |
| ) |
|
|
protectedvirtual |
Reset to an initial state.
◆ setErrorMessage()
void te::rp::ClassifierStrategy::setErrorMessage |
( |
const std::string & |
newErrorMessage | ) |
|
|
protected |
Set the current error message.
- Parameters
-
newErrorMessage | New error message; |
◆ setInputPolygons()
void te::rp::ClassifierStrategy::setInputPolygons |
( |
const std::vector< te::gm::Polygon * > & |
polygonsPtrs | ) |
|
Set the input polygons.
- Parameters
-
polygonsPtrs | Input polygons pointers. |
- Note
- The caller of this method must keep the ownership of the objects.
◆ setInputRaster()
void te::rp::ClassifierStrategy::setInputRaster |
( |
const te::rst::Raster & |
raster | ) |
|
Set the input raster.
- Parameters
-
◆ setInputRasterBands()
void te::rp::ClassifierStrategy::setInputRasterBands |
( |
const std::vector< unsigned int > & |
rasterBands | ) |
|
Set the input raste bandsr.
- Parameters
-
rasterBands | Input raster bands. |
◆ setOutputRasterPalette()
bool te::rp::ClassifierStrategy::setOutputRasterPalette |
( |
const unsigned int |
size | ) |
|
|
protected |
Create and set the output raster palette folowing the current internal settings.
- Parameters
-
- Returns
- true if ok,false on errors.
◆ setUserOutputPalette()
Set the output user palette.
- Parameters
-
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. |
◆ m_createRasterPalette
bool te::rp::ClassifierStrategy::m_createRasterPalette |
|
protected |
Enable (true) or disable (false) the creation of a paletted output raster.
Definition at line 172 of file ClassifierStrategy.h.
◆ m_enableMultiThread
bool te::rp::ClassifierStrategy::m_enableMultiThread |
|
protected |
◆ m_enableRasterCache
bool te::rp::ClassifierStrategy::m_enableRasterCache |
|
protected |
◆ m_errorMessage
std::string te::rp::ClassifierStrategy::m_errorMessage |
|
private |
◆ m_inputPolygonsPtr
std::vector<te::gm::Polygon*> const* te::rp::ClassifierStrategy::m_inputPolygonsPtr |
|
protected |
◆ m_inputRasterBands
std::vector<unsigned int> te::rp::ClassifierStrategy::m_inputRasterBands |
|
protected |
◆ m_inputRasterPtr
◆ m_metaData
std::map< std::string, std::string > te::rp::ClassifierStrategy::m_metaData |
|
protected |
◆ m_outputRasterPtr
std::unique_ptr< te::rst::Raster > te::rp::ClassifierStrategy::m_outputRasterPtr |
|
protected |
◆ m_progressInterfaceEnabled
bool te::rp::ClassifierStrategy::m_progressInterfaceEnabled |
|
protected |
◆ 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.
Definition at line 197 of file ClassifierStrategy.h.
The documentation for this class was generated from the following file: