Commit fb2bdc76 authored by Emmanuel Christophe's avatar Emmanuel Christophe

TEST: add hill shading test

parent 12223c7a
......@@ -22,6 +22,8 @@ TARGET_LINK_LIBRARIES(IndexedToRGBExample OTBCommon OTBIO)
ADD_EXECUTABLE(MeanShiftVectorImageFilterExample MeanShiftVectorImageFilterExample.cxx )
TARGET_LINK_LIBRARIES(MeanShiftVectorImageFilterExample OTBCommon OTBIO OTBBasicFilters)
ADD_EXECUTABLE(HillShadingExample HillShadingExample.cxx )
TARGET_LINK_LIBRARIES(HillShadingExample OTBCommon OTBIO OTBBasicFilters)
IF( NOT OTB_DISABLE_CXX_TESTING AND BUILD_TESTING )
......@@ -32,13 +34,13 @@ SET(TEMP ${OTB_BINARY_DIR}/Testing/Temporary)
SET(EXE_TESTS ${CXX_TEST_PATH}/otbBasicFiltersExamplesTests)
SET(TOL 0.0)
SET(NOTOL 0.0)
# ------- LeeImageFilterTest----------
ADD_TEST(bfTeLeeImageFilterTest ${EXE_TESTS}
--compare-n-images ${TOL} 1
--compare-n-images ${NOTOL} 1
${BASELINE}/GomaSmallLeeFiltered.png
${TEMP}/GomaSmallLeeFiltered.png
LeeImageFilterTest
......@@ -50,7 +52,7 @@ ADD_TEST(bfTeLeeImageFilterTest ${EXE_TESTS}
# ------- FrostImageFilterTest----------
ADD_TEST(bfTeFrostImageFilterTest ${EXE_TESTS}
--compare-n-images ${TOL} 1
--compare-n-images ${NOTOL} 1
${BASELINE}/GomaSmallFrostFiltered.png
${TEMP}/GomaSmallFrostFiltered.png
FrostImageFilterTest
......@@ -62,7 +64,7 @@ ADD_TEST(bfTeFrostImageFilterTest ${EXE_TESTS}
# ------- DEMToRainbowExampleTest ----------
ADD_TEST(bfTeDEMToRainbowExampleTest ${EXE_TESTS}
--compare-n-images ${TOL} 1
--compare-n-images ${NOTOL} 1
${BASELINE}/DEMToRainbowImageGenerator.png
${TEMP}/DEMToRainbowImageGenerator.png
DEMToRainbowExampleTest
......@@ -74,7 +76,7 @@ ADD_TEST(bfTeDEMToRainbowExampleTest ${EXE_TESTS}
# ------- ScalingFilterExampleTest ----------
ADD_TEST(bfTeScalingFilterExampleTest ${EXE_TESTS}
--compare-n-images ${TOL} 2
--compare-n-images ${NOTOL} 2
${BASELINE}/QB_Toulouse_Ortho_PAN_rescaled.png
${TEMP}/QB_Toulouse_Ortho_PAN_rescaled.png
${BASELINE}/QB_Toulouse_Ortho_PAN_casted.png
......@@ -88,7 +90,7 @@ ADD_TEST(bfTeScalingFilterExampleTest ${EXE_TESTS}
# ------- PrintableImageFilterTest----------
ADD_TEST(bfTePrintableImageFilterExample1Test ${EXE_TESTS}
--compare-n-images ${TOL} 1
--compare-n-images ${NOTOL} 1
${BASELINE}/PrintableExampleOutput1.png
${TEMP}/PrintableExampleOutput1.png
PrintableImageFilterExample1Test
......@@ -98,7 +100,7 @@ ADD_TEST(bfTePrintableImageFilterExample1Test ${EXE_TESTS}
)
ADD_TEST(bfTePrintableImageFilteExample2rTest ${EXE_TESTS}
--compare-n-images ${TOL} 1
--compare-n-images ${NOTOL} 1
${BASELINE}/PrintableExampleOutput2.png
${TEMP}/PrintableExampleOutput2.png
PrintableImageFilterExample2Test
......@@ -110,7 +112,7 @@ ADD_TEST(bfTePrintableImageFilteExample2rTest ${EXE_TESTS}
# ------- IndexedToRGBExampleTest----------
ADD_TEST(bfTeIndexedToRGBExampleTest ${EXE_TESTS}
--compare-n-images ${TOL} 2
--compare-n-images ${NOTOL} 2
${BASELINE}/buildingExtractionRGB.png
${TEMP}/buildingExtractionRGB.png
${BASELINE}/buildingExtractionIndexed_scaled.png
......@@ -122,7 +124,7 @@ ADD_TEST(bfTeIndexedToRGBExampleTest ${EXE_TESTS}
)
ADD_TEST(bfTeMeanShiftVectorImageFilterExampleTest ${EXE_TESTS}
--compare-n-images ${TOL} 6
--compare-n-images ${NOTOL} 6
${BASELINE}/MSFilteredOutput.tif
${TEMP}/MSFilteredOutput.tif
${BASELINE}/MSClusteredOutput.tif
......@@ -149,6 +151,20 @@ ADD_TEST(bfTeMeanShiftVectorImageFilterExampleTest ${EXE_TESTS}
1.0
)
# ------- HillShadingExampleTest ----------
ADD_TEST(bfTeHillShadingExampleTest ${EXE_TESTS}
--compare-n-images ${NOTOL} 2
${BASELINE}/HillShadingExample.png
${TEMP}/HillShadingExample.png
${BASELINE}/HillShadingColorExample.png
${TEMP}/HillShadingColorExample.png
HillShadingExampleTest
${TEMP}/HillShadingExample.png
${TEMP}/HillShadingColorExample.png
6.5 45.5 500 500 0.002 -0.002 ${OTB_DATA_ROOT}/Examples/DEM_srtm
)
INCLUDE_DIRECTORIES(${OTB_SOURCE_DIR}/Testing/Code)
ADD_EXECUTABLE(otbBasicFiltersExamplesTests otbBasicFiltersExamplesTests.cxx)
TARGET_LINK_LIBRARIES(otbBasicFiltersExamplesTests ITKAlgorithms ITKStatistics OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction OTBLearning OTBMultiScale OTBTesting)
......
......@@ -6,12 +6,13 @@
Version: $Revision$
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See OTBCopyright.txt for details.
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See OTBCopyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
......@@ -33,6 +34,7 @@ void RegisterTests()
REGISTER_TEST(PrintableImageFilterExample2Test);
REGISTER_TEST(IndexedToRGBExampleTest);
REGISTER_TEST(MeanShiftVectorImageFilterExampleTest);
REGISTER_TEST(HillShadingExampleTest);
}
#undef main
......@@ -68,3 +70,6 @@ void RegisterTests()
#define main MeanShiftVectorImageFilterExampleTest
#include "MeanShiftVectorImageFilterExample.cxx"
#undef main
#define main HillShadingExampleTest
#include "HillShadingExample.cxx"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment