Raster post classification. More...
#include <PostClassification.h>
Classes | |
| class | InputParameters |
| Filter input parameters. More... | |
| class | OutputParameters |
| PostClassification output parameters. More... | |
Public Member Functions | |
| bool | execute (AlgorithmOutputParameters &outputParams) _NOEXCEPT_OP(false) |
| Executes the algorithm using the supplied parameters. More... | |
| const std::string & | getErrorMessage () const |
| Return the current error message if there is any. More... | |
| bool | initialize (const AlgorithmInputParameters &inputParams) _NOEXCEPT_OP(false) |
| 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... | |
| PostClassification () | |
| void | reset () _NOEXCEPT_OP(false) |
| Clear all internal allocated objects and reset the algorithm to its initial state. More... | |
| ~PostClassification () | |
Protected Member Functions | |
| bool | runPostClassification (const te::rst::Raster &srcRaster, te::rst::Raster &dstRaster, unsigned int weight, unsigned int threshold) |
| Apply the post classification. More... | |
| void | setErrorMessage (const std::string &newErrorMessage) |
| Set the current error message. More... | |
Protected Attributes | |
| PostClassification::InputParameters | m_inputParameters |
| Input parameters. More... | |
| bool | m_isInitialized |
| Is this instance already initialized? More... | |
Raster post classification.
Definition at line 40 of file PostClassification.h.
| te::rp::PostClassification::PostClassification | ( | ) |
Definition at line 124 of file PostClassification.cpp.
References te::rp::PostClassification::InputParameters::reset(), and ~PostClassification().
|
default |
Referenced by PostClassification().
|
virtual |
Executes the algorithm using the supplied parameters.
| outputParams | Output parameters. |
Implements te::rp::Algorithm.
Definition at line 131 of file PostClassification.cpp.
References col, te::rst::Copy(), te::rst::Raster::getBand(), te::rst::Raster::getGrid(), te::rst::Band::getProperty(), te::rst::Band::getValue(), te::sa::Grid, m_inputParameters, te::rp::PostClassification::InputParameters::m_inRasterPtr, m_isInitialized, te::rp::PostClassification::OutputParameters::m_outputRasterPtr, te::rp::PostClassification::OutputParameters::m_rInfo, te::rp::PostClassification::OutputParameters::m_rType, te::rp::PostClassification::InputParameters::m_threshold, te::rp::PostClassification::InputParameters::m_weight, te::rst::RasterFactory::make(), TERP_INSTANCE_TRUE_OR_RETURN_FALSE, and TERP_TRUE_OR_THROW.
Referenced by BOOST_AUTO_TEST_CASE(), and te::qt::widgets::PostClassificationWidget::execute().
|
inherited |
Return the current error message if there is any.
Definition at line 44 of file rp/Algorithm.cpp.
References te::rp::Algorithm::m_errorMessage.
Referenced by te::qt::widgets::FilterDialogForm::applyPreview(), te::qt::widgets::PostClassificationWidget::execute(), te::qt::widgets::ClassifierWizard::execute(), te::qt::widgets::MixtureModelWizard::execute(), te::qt::widgets::ContrastDialogForm::execute(), te::qt::widgets::FilterDialogForm::execute(), te::qt::widgets::ArithmeticOpDialogForm::execute(), te::qt::widgets::MosaicWizard::executeGeoMosaic(), te::qt::widgets::FusionWizard::executeIHS(), te::qt::widgets::FusionWizard::executePCA(), te::qt::widgets::MosaicWizard::executeSequenceMosaic(), te::qt::widgets::MosaicWizard::executeTiePointMosaic(), and te::qt::widgets::FusionWizard::executeWisper().
|
virtual |
Initialize the algorithm instance making it ready for execution.
| inputParams | Input parameters. |
Implements te::rp::Algorithm.
Definition at line 251 of file PostClassification.cpp.
References te::rst::Raster::getAccessPolicy(), m_inputParameters, te::rp::PostClassification::InputParameters::m_inRasterPtr, m_isInitialized, te::rp::PostClassification::InputParameters::m_threshold, te::rp::PostClassification::InputParameters::m_weight, te::common::RAccess, te::rp::PostClassification::InputParameters::reset(), TE_TR, and TERP_INSTANCE_TRUE_OR_RETURN_FALSE.
Referenced by BOOST_AUTO_TEST_CASE(), and te::qt::widgets::PostClassificationWidget::execute().
|
virtual |
Returns true if the algorithm instance is initialized and ready for execution.
Implements te::rp::Algorithm.
Definition at line 278 of file PostClassification.cpp.
References m_isInitialized.
|
virtual |
Clear all internal allocated objects and reset the algorithm to its initial state.
Reimplemented from te::rp::Algorithm.
Definition at line 243 of file PostClassification.cpp.
References m_inputParameters, m_isInitialized, te::rp::PostClassification::InputParameters::reset(), and te::rp::Algorithm::reset().
|
protected |
Apply the post classification.
| srcRaster | Source raster. |
| srcBandIdx | Source raster band index. |
| dstRaster | Destination raster. |
| dstBandIdx | Destination raster band index. |
| weight | Weight value. |
| threshold | Threshold value. |
| useProgress | if true, the progress interface must be used. |
Definition at line 283 of file PostClassification.cpp.
References col, te::rst::Copy(), te::rst::Raster::getBand(), te::rst::Raster::getNumberOfColumns(), te::rst::Raster::getNumberOfRows(), te::rst::Band::getValue(), and te::rst::Raster::setIValue().
|
protectedinherited |
Set the current error message.
| newErrorMessage | New error message; |
Definition at line 49 of file rp/Algorithm.cpp.
References te::rp::Algorithm::m_errorMessage.
|
protected |
Input parameters.
Definition at line 124 of file PostClassification.h.
Referenced by execute(), initialize(), and reset().
|
protected |
Is this instance already initialized?
Definition at line 122 of file PostClassification.h.
Referenced by execute(), initialize(), isInitialized(), and reset().