diff --git a/Modules/Applications/AppClassification/app/otbVectorClassifier.cxx b/Modules/Applications/AppClassification/app/otbVectorClassifier.cxx index a90f8d2d1e9608925c522b6052812fd41355ccef..add5f261cd2bcc29758a65b32f60143ddc7809f3 100644 --- a/Modules/Applications/AppClassification/app/otbVectorClassifier.cxx +++ b/Modules/Applications/AppClassification/app/otbVectorClassifier.cxx @@ -103,7 +103,7 @@ VectorClassifier template<> bool VectorClassifier -::shouldComputeConfidenceMap() +::shouldComputeConfidenceMap() const { bool computeConfidenceMap(GetParameterInt("confmap") && m_Model->HasConfidenceIndex() ); diff --git a/Modules/Applications/AppClassification/app/otbVectorRegression.cxx b/Modules/Applications/AppClassification/app/otbVectorRegression.cxx index 74ac136552b34fd6aa65f2996f0bfd8532f95a29..3e529e9000f6acae1eca79b4dcc23f2b50f2ab76 100644 --- a/Modules/Applications/AppClassification/app/otbVectorRegression.cxx +++ b/Modules/Applications/AppClassification/app/otbVectorRegression.cxx @@ -94,7 +94,7 @@ VectorRegression template<> bool VectorRegression -::shouldComputeConfidenceMap() +::shouldComputeConfidenceMap() const { return false; } diff --git a/Modules/Applications/AppClassification/include/otbVectorPrediction.h b/Modules/Applications/AppClassification/include/otbVectorPrediction.h index 83f74f52a4e3c83803cecdfe8c16e227a1c6b2bb..637ee4ba918ea71a4fd8c2fe8401c39f436bd5de 100644 --- a/Modules/Applications/AppClassification/include/otbVectorPrediction.h +++ b/Modules/Applications/AppClassification/include/otbVectorPrediction.h @@ -100,7 +100,7 @@ private: void DoExecute() override; - bool shouldComputeConfidenceMap(); + bool shouldComputeConfidenceMap() const; ModelPointerType m_Model; }; diff --git a/Modules/Wrappers/ApplicationEngine/include/otbWrapperApplication.h b/Modules/Wrappers/ApplicationEngine/include/otbWrapperApplication.h index 6d857dfde441ad207bd449f3c0e88ac9a7b24a59..a1926380836519267d86e950f078f3d1368cc9ea 100644 --- a/Modules/Wrappers/ApplicationEngine/include/otbWrapperApplication.h +++ b/Modules/Wrappers/ApplicationEngine/include/otbWrapperApplication.h @@ -420,14 +420,14 @@ public: * \li ParameterType_Radius * \li ParameterType_Choice */ - int GetParameterInt(std::string parameter); + int GetParameterInt(std::string parameter) const; /* Get a floating parameter value * * Can be called for types : * \li ParameterType_Float */ - float GetParameterFloat(std::string parameter); + float GetParameterFloat(std::string parameter) const; /* Get a string parameter value * @@ -441,7 +441,7 @@ public: * \li ParameterType_OutputImage * \li ParameterType_OutputVectorData */ - std::string GetParameterString(std::string parameter); + std::string GetParameterString(std::string parameter) const; /* Get a string list parameter value * diff --git a/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx b/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx index 9cdfa1e1d841dd1a4c2f8693b342bc3dd6c72c63..7d5cfe93b7a1f29482afe3b313ecb28916998f78 100644 --- a/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx +++ b/Modules/Wrappers/ApplicationEngine/src/otbWrapperApplication.cxx @@ -1234,17 +1234,17 @@ void Application::SetParameterDescription(std::string parameter, std::string des param->SetDescription(desc); } -int Application::GetParameterInt(std::string key) +int Application::GetParameterInt(std::string key) const { return GetParameterByKey(key)->ToInt(); } -float Application::GetParameterFloat(std::string key) +float Application::GetParameterFloat(std::string key) const { return GetParameterByKey(key)->ToFloat(); } -std::string Application::GetParameterString(std::string key) +std::string Application::GetParameterString(std::string key) const { return GetParameterByKey(key)->ToString(); }