From 6d723045a44652f1d319993e2c2e12930bff737f Mon Sep 17 00:00:00 2001 From: Julien Michel <julien.michel@orfeo-toolbox.org> Date: Thu, 5 Mar 2015 09:39:56 +0100 Subject: [PATCH] TEST: Adding all remaining missing tests --- .../AppImageUtils/test/CMakeLists.txt | 22 +++++++++++++++ .../AppProjection/test/CMakeLists.txt | 19 +++++++++++++ Modules/Core/ImageBase/test/CMakeLists.txt | 28 +++++++++++++++++++ .../ImageManipulation/test/CMakeLists.txt | 9 ++++++ Modules/IO/ImageIO/test/CMakeLists.txt | 28 +++++++++++++++++++ 5 files changed, 106 insertions(+) diff --git a/Modules/Applications/AppImageUtils/test/CMakeLists.txt b/Modules/Applications/AppImageUtils/test/CMakeLists.txt index fec5cc09e2..7b502f2f42 100644 --- a/Modules/Applications/AppImageUtils/test/CMakeLists.txt +++ b/Modules/Applications/AppImageUtils/test/CMakeLists.txt @@ -224,6 +224,19 @@ otb_test_application(NAME apTvUtConcatenateImages_1Image #----------- MultiResolutionPyramid TESTS ---------------- +#----------- PixelValue TESTS ---------------- +OTB_TEST_APPLICATION(NAME apTvUtPixelValue + APP PixelValue + OPTIONS -in ${INPUTDATA}/QB_Toulouse_Ortho_XS.tif + -coordx 30 + -coordy 30 + -cl Channel1 Channel3 Channel4 + TESTENVOPTIONS ${TEMP}/apTvUtPixelValue.txt + VALID --compare-ascii ${EPSILON_7} + ${BASELINE_FILES}/apTvUtPixelValue.txt + ${TEMP}/apTvUtPixelValue.txt + ) + #----------- ColorMapping TESTS ---------------- otb_test_application(NAME apTvUtColorMappingLabelToColorCustomLUT APP ColorMapping @@ -319,6 +332,15 @@ otb_test_application(NAME apTvUtColorMappingLabelToColorOptimalLUT ${BASELINE}/apTvUtColorMappingLabelToColorOptimalLUT.tif ${TEMP}/apTvUtColorMappingLabelToColorOptimalLUT.tif) +OTB_TEST_APPLICATION(NAME apTvClLabeledImageColorMappingQB123_1 + APP ColorMapping + OPTIONS -in ${OTBAPP_BASELINE}/clLabeledImageQB123_1.tif + -method custom + -method.custom.lut ${INPUTDATA}/Classification/ColorTable.txt + -out ${TEMP}/clLabeledFancyImageQB123_1.tif + VALID --compare-image ${NOTOL} + ${OTBAPP_BASELINE}/clLabeledFancyImageQB123_1.tif + ${TEMP}/clLabeledFancyImageQB123_1.tif) #----------- KmzExport TESTS ---------------- otb_test_application(NAME apTvUtKmzExport diff --git a/Modules/Applications/AppProjection/test/CMakeLists.txt b/Modules/Applications/AppProjection/test/CMakeLists.txt index 9c1ac11f48..02be7f44ec 100644 --- a/Modules/Applications/AppProjection/test/CMakeLists.txt +++ b/Modules/Applications/AppProjection/test/CMakeLists.txt @@ -147,6 +147,25 @@ otb_test_application(NAME apTvPrGenerateRPCSensorModel #----------- GridBasedImageResampling TESTS ---------------- +otb_test_application(NAME apTuDmGridBasedImageResamplingLeftTest + APP GridBasedImageResampling + OPTIONS -io.in ${EXAMPLEDATA}/sensor_stereo_left.tif + -io.out ${TEMP}/apTvDmGridBasedImageResamplingLeftTest.tif + -grid.in ${INPUTDATA}/sensor_stereo_rectif_left.tif + -out.sizex 158 + -out.sizey 158 + ) + + +otb_test_application(NAME apTuDmGridBasedImageResamplingRightTest + APP GridBasedImageResampling + OPTIONS -io.in ${EXAMPLEDATA}/sensor_stereo_right.tif + -io.out ${TEMP}/apTvDmGridBasedImageResamplingRightTest.tif + -grid.in ${INPUTDATA}/sensor_stereo_rectif_right.tif + -out.sizex 158 + -out.sizey 158 + ) + #----------- VectorDataReprojection TESTS ---------------- otb_test_application(NAME apTuPrVectorDataReprojectionFromImageToMap APP VectorDataReprojection diff --git a/Modules/Core/ImageBase/test/CMakeLists.txt b/Modules/Core/ImageBase/test/CMakeLists.txt index 0356ed143f..741c17c110 100644 --- a/Modules/Core/ImageBase/test/CMakeLists.txt +++ b/Modules/Core/ImageBase/test/CMakeLists.txt @@ -801,3 +801,31 @@ otb_add_test(NAME ioTvMultiResolutionReading3 COMMAND otbImageBaseTestDriver ${TEMP}/ioTvMultiResolutionReading3.txt ) +otb_add_test(NAME ioTvOtbVectorImageTestSpot5 COMMAND otbImageBaseTestDriver + --compare-ascii ${EPSILON_3} ${BASELINE_FILES}/ioOtbVectorImageTestSpot5.txt + ${TEMP}/ioOtbVectorImageTestSpot5.txt + otbVectorImageLegacyTest + LARGEINPUT{/SPOT5/TEHERAN/} + ${TEMP}/ioOtbVectorImageTestSpot5.txt) + +otb_add_test(NAME ioTvOtbVectorImageTestFORMOSAT2 COMMAND otbImageBaseTestDriver + --compare-ascii ${EPSILON_3} ${BASELINE_FILES}/ioOtbVectorImageTestFORMOSAT2.txt + ${TEMP}/ioOtbVectorImageTestFORMOSAT2.txt + otbVectorImageLegacyTest + LARGEINPUT{/FORMOSAT/Sudouest_20071013_MS_fmsat/} + ${TEMP}/ioOtbVectorImageTestFORMOSAT2.txt) + +otb_add_test(NAME ioTvOtbVectorImageTestCOSMOSKYMED COMMAND otbImageBaseTestDriver + --compare-ascii ${EPSILON_3} ${BASELINE_FILES}/ioOtbVectorImageTestCOSMOSKYMED.txt + ${TEMP}/ioOtbVectorImageTestCOSMOSKYMED.txt + otbVectorImageLegacyTest + LARGEINPUT{/COSMOSKYMED/Toulouse_spotlight/CSKS3_GTC_B_S2_08_HH_RD_SF_20110418180325_20110418180332.h5} + ${TEMP}/ioOtbVectorImageTestCOSMOSKYMED.txt) + +otb_add_test(NAME ioTvOtbVectorImageTestRadarsat COMMAND otbImageBaseTestDriver + --compare-ascii ${EPSILON_3} + ${BASELINE_FILES}/ioOtbImageTestRadarsat.txt + ${TEMP}/ioOtbVectorImageTestRadarsat.txt + otbVectorImageLegacyTest + LARGEINPUT{/RADARSAT1/GOMA/SCENE01/} + ${TEMP}/ioOtbVectorImageTestRadarsat.txt) diff --git a/Modules/Filtering/ImageManipulation/test/CMakeLists.txt b/Modules/Filtering/ImageManipulation/test/CMakeLists.txt index 0eb9ea1a7e..a167f9c62b 100644 --- a/Modules/Filtering/ImageManipulation/test/CMakeLists.txt +++ b/Modules/Filtering/ImageManipulation/test/CMakeLists.txt @@ -435,6 +435,15 @@ otb_add_test(NAME coTuShiftScaleImageAdaptorNew COMMAND otbImageManipulationTest otbShiftScaleImageAdaptorNew ) +otb_add_test(NAME coTvShiftScaleImageAdaptor COMMAND otbImageManipulationTestDriver + --compare-image ${EPSILON_9} + ${BASELINE}/coTvShiftScaleImageAdaptor.tif # copie the input image + ${TEMP}/coTvShiftScaleImageAdaptor.tif + otbShiftScaleImageAdaptor + ${INPUTDATA}/ROI_IKO_PAN_LesHalles.tif + ${TEMP}/coTvShiftScaleImageAdaptor.tif + ) + otb_add_test(NAME bfTuStreamingInnerProductVectorImageFilterNew COMMAND otbImageManipulationTestDriver otbStreamingInnerProductVectorImageFilterNew ) diff --git a/Modules/IO/ImageIO/test/CMakeLists.txt b/Modules/IO/ImageIO/test/CMakeLists.txt index a6a90bcb6a..e3bf3d31cb 100644 --- a/Modules/IO/ImageIO/test/CMakeLists.txt +++ b/Modules/IO/ImageIO/test/CMakeLists.txt @@ -321,6 +321,26 @@ otb_add_test(NAME ioTvReadingComplexDataIntoComplexImage COMMAND otbImageIOTestD 1000 1000 ) +otb_add_test(NAME ioTvStreamingImageFilterBSQ2PNG COMMAND otbImageIOTestDriver + --compare-image ${EPSILON_9} + ${TEMP}/ioImageFileReaderPNG2BSQ.hd + ${TEMP}/ioStreamingImageFilterTestBSQ.png + otbStreamingImageFilterTest + ${TEMP}/ioImageFileReaderPNG2BSQ.hd + ${TEMP}/ioStreamingImageFilterTestBSQ.png + ) +set_tests_properties(ioTvStreamingImageFilterBSQ2PNG PROPERTIES DEPENDS ioTvImageFileReaderPNG2BSQ) + +otb_add_test(ioTvStreamingImageFilterLUM2PNG COMMAND otbImageIOTestDriver + --compare-image ${EPSILON_9} ${TEMP}/ioImageFileReaderPNG2LUM.lum + ${TEMP}/ioStreamingImageFilterTestLUM.png + otbStreamingImageFilterTest + ${TEMP}/ioImageFileReaderPNG2LUM.lum + ${TEMP}/ioStreamingImageFilterTestLUM.png + ) +set_tests_properties(ioTvStreamingImageFilterLUM2PNG PROPERTIES DEPENDS ioTvImageFileReaderPNG2LUM) + + otb_add_test(NAME ioTvImageFileWriterRGB_PNG2PNG COMMAND otbImageIOTestDriver --compare-image ${EPSILON_9} ${BASELINE}/ioImageFileWriterRGB_PNG2PNG.png ${TEMP}/ioImageFileWriterRGB_PNG2PNG.png @@ -796,6 +816,14 @@ otb_add_test(NAME ioTvImageFileReaderPDS2TIFF COMMAND otbImageIOTestDriver ${INPUTDATA}/pdsImage.img ${TEMP}/ioTvImageFileReaderPDS2TIFF.tif) +otb_add_test(NAME ioTvImageFileReaderPNG2BSQ COMMAND otbImageIOTestDriver + --compare-image ${EPSILON_9} ${INPUTDATA}/cthead1.png + ${TEMP}/ioImageFileReaderPNG2BSQ.hd + otbImageFileReaderTest + ${INPUTDATA}/cthead1.png + ${TEMP}/ioImageFileReaderPNG2BSQ.hd ) + + otb_add_test(NAME ioTvWritingComplexDataWithComplexImage COMMAND otbImageIOTestDriver --compare-image ${EPSILON_9} ${BASELINE}/ioWritingComplexDataWithComplexImageOutput.tif -- GitLab