From 5fd7b9e46b959718796b057e36f3d40c6ba2dd0e Mon Sep 17 00:00:00 2001
From: Guillaume Pasero <guillaume.pasero@c-s.fr>
Date: Thu, 30 Jul 2015 16:57:07 +0200
Subject: [PATCH] ENH: handle missing confmap properly

---
 .../AppClassification/app/otbImageClassifier.cxx             | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Modules/Applications/AppClassification/app/otbImageClassifier.cxx b/Modules/Applications/AppClassification/app/otbImageClassifier.cxx
index 5686ef6d18..c12ed7df67 100644
--- a/Modules/Applications/AppClassification/app/otbImageClassifier.cxx
+++ b/Modules/Applications/AppClassification/app/otbImageClassifier.cxx
@@ -186,6 +186,11 @@ private:
         {
         SetParameterOutputImage<ConfidenceImageType>("confmap",m_ClassificationFilter->GetOutputConfidence());
         }
+      else
+        {
+        otbAppLogWARNING("Confidence map requested but the classifier doesn't support it!");
+        this->DisableParameter("confmap");
+        }
       }
   }
 
-- 
GitLab