From 6122f4f0146c0a46b2ef811b86e829670ab00abb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Traizet?= <cedric.traizet@c-s.fr> Date: Tue, 30 Apr 2019 17:54:33 +0200 Subject: [PATCH] ENH: move the io.confmatout parameter from TrainVectorBase to TrainVectorClassifier --- .../AppClassification/app/otbTrainVectorClassifier.cxx | 9 +++++++++ .../AppClassification/include/otbTrainVectorBase.hxx | 8 -------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Modules/Applications/AppClassification/app/otbTrainVectorClassifier.cxx b/Modules/Applications/AppClassification/app/otbTrainVectorClassifier.cxx index 3a7accaf5f..ccfeeef07c 100644 --- a/Modules/Applications/AppClassification/app/otbTrainVectorClassifier.cxx +++ b/Modules/Applications/AppClassification/app/otbTrainVectorClassifier.cxx @@ -74,6 +74,15 @@ protected: SetOfficialDocLink(); Superclass::DoInit(); + + // Add a new parameter to compute confusion matrix / contingency table + this->AddParameter( ParameterType_OutputFilename, "io.confmatout", + "Output confusion matrix or contingency table" ); + this->SetParameterDescription( "io.confmatout", + "Output file containing the confusion matrix or contingency table (.csv format)." + "The contingency table is output when we unsupervised algorithms is used otherwise the confusion matrix is output." ); + this->MandatoryOff( "io.confmatout" ); + } void DoUpdateParameters() override diff --git a/Modules/Applications/AppClassification/include/otbTrainVectorBase.hxx b/Modules/Applications/AppClassification/include/otbTrainVectorBase.hxx index 879f9b8db5..caf144257e 100644 --- a/Modules/Applications/AppClassification/include/otbTrainVectorBase.hxx +++ b/Modules/Applications/AppClassification/include/otbTrainVectorBase.hxx @@ -86,14 +86,6 @@ TrainVectorBase<TInputValue, TOutputValue> "Only geometries with this field available will be taken into account." ); this->SetListViewSingleSelectionMode( "cfield", true ); - // Add a new parameter to compute confusion matrix / contingency table - this->AddParameter( ParameterType_OutputFilename, "io.confmatout", - "Output confusion matrix or contingency table" ); - this->SetParameterDescription( "io.confmatout", - "Output file containing the confusion matrix or contingency table (.csv format)." - "The contingency table is output when we unsupervised algorithms is used otherwise the confusion matrix is output." ); - this->MandatoryOff( "io.confmatout" ); - this->AddParameter(ParameterType_Bool, "v", "Verbose mode"); this->SetParameterDescription("v", "Verbose mode, display the contingency table result."); this->SetParameterInt("v", 1); -- GitLab