From ada0a557226ab8bbb4d16bc8b0b25d4d318420f4 Mon Sep 17 00:00:00 2001
From: Ludovic Hussonnois <ludovic.hussonnois@c-s.fr>
Date: Fri, 13 Jan 2017 15:07:39 +0100
Subject: [PATCH] TEST: Add application tests for MorphologicalProfilesAnalysis
 and MorphologicalProfilesClassification.

---
 .../AppMorphology/test/CMakeLists.txt         | 58 +++++++++++++++++++
 1 file changed, 58 insertions(+)

diff --git a/Modules/Applications/AppMorphology/test/CMakeLists.txt b/Modules/Applications/AppMorphology/test/CMakeLists.txt
index cc17f575f6..0f359dafdb 100644
--- a/Modules/Applications/AppMorphology/test/CMakeLists.txt
+++ b/Modules/Applications/AppMorphology/test/CMakeLists.txt
@@ -56,3 +56,61 @@ otb_test_application(NAME  apTvFEMorphologicalMultiScaleDecompositionIteratif
 							 ${BASELINE}/apTvFEMorphologicalMultiScaleDecomposition_Iteration_2.tif
 							 ${TEMP}/apTvFEMorphologicalMultiScaleDecomposition_Iteration_2.tif)
 
+
+#----------- MorphologicalProfilesClassification TESTS ----------------
+otb_test_application(NAME  apTvFEMorphologicalProfilesClassification
+		             APP  MorphologicalProfilesClassification
+		             OPTIONS -in ${INPUTDATA}/ROI_IKO_PAN_LesHalles.tif
+			                 -channel 1
+		                     -structype ball
+		                     -radius 5
+							 -sigma 0.5
+		                     -out ${TEMP}/apTvFEMorphologicalProfilesClassification.tif
+		             VALID   --compare-image ${NOTOL}
+							 ${BASELINE}/apTvFEMorphologicalProfilesClassification.tif
+					         ${TEMP}/apTvFEMorphologicalProfilesClassification.tif)
+
+
+
+#----------- Opening MorphologicalProfilesAnalysis TESTS ----------------
+otb_test_application(NAME  apTvFEMorphologicalProfilesAnalysisOpening
+					 APP  MorphologicalProfilesAnalysis
+					 OPTIONS -in ${INPUTDATA}/ROI_IKO_PAN_LesHalles.tif
+		                     -channel 1
+		                     -structype ball
+		                     -profile closing
+		                     -size 4
+		                     -radius 1
+		                     -step 1
+							 -out ${TEMP}/apTvFEMorphologicalProfilesOpeningAnalysis.tif)
+
+#----------- Closing MorphologicalProfilesAnalysis TESTS ----------------
+otb_test_application(NAME  apTvFEMorphologicalProfilesAnalysisClosing
+					 APP  MorphologicalProfilesAnalysis
+					 OPTIONS -in ${INPUTDATA}/ROI_IKO_PAN_LesHalles.tif
+					         -channel 1
+					         -structype ball
+					         -profile closing
+					         -size 4
+					         -radius 1
+					         -step 1
+					         -out ${TEMP}/apTvFEMorphologicalProfilesClosingAnalysis.tif
+					 VALID   --compare-image ${NOTOL}
+					         ${BASELINE}/apTvFEMorphologicalProfilesClosingAnalysis.tif
+					         ${TEMP}/apTvFEMorphologicalProfilesClosingAnalysis.tif)
+
+#----------- Classfication MorphologicalProfilesAnalysis TESTS ----------------
+otb_test_application(NAME  apTvFEMorphologicalProfilesAnalysisClassification
+					 APP  MorphologicalProfilesAnalysis
+					 OPTIONS -in ${INPUTDATA}/ROI_IKO_PAN_LesHalles.tif
+						     -channel 1
+						     -structype ball
+						     -profile classification
+						     -size 5
+						     -radius 1
+						     -step 1
+							 -profile.classification.sigma 1
+						     -out ${TEMP}/apTvFEMorphologicalProfilesClosingAnalysis.tif
+					 VALID   --compare-image ${NOTOL}
+							 ${BASELINE}/msMultiScaleConvexOrConcaveClassificationFilterOutput.tif
+					 		 ${TEMP}/apTvFEMorphologicalProfilesClosingAnalysis.tif)
-- 
GitLab