Commit 34802fe9 authored by Jonathan Guinet's avatar Jonathan Guinet
Browse files

TEST: application tests update.

parent 571cdb81
IF(OTB_DATA_USE_LARGEINPUT)
add_test(NAME apTvPrOrthorectification_UTM
COMMAND otbTestDriver
--compare-image 0.0
${BASELINE}/owTvOrthorectifTest_UTM.tif
${TEMP}/owTvOrthorectifTest_UTM.tif
Execute $<TARGET_FILE:otbApplicationLauncherCommandLine>
OrthoRectification
$<TARGET_FILE_DIR:otbapp_OrthoRectification>
--io.in ${OTB_DATA_LARGEINPUT_ROOT}/QUICKBIRD/TOULOUSE/000000128955_01_P001_PAN/02APR01105228-P1BS-000000128955_01_P001.TIF
--io.out ${TEMP}/owTvOrthorectifTest_UTM.tif
--elev.dem ${INPUTDATA}/DEM/srtm_directory/
--outputs.ulx 374100.8
--outputs.uly 4829184.8
--outputs.sizex 500
--outputs.sizey 500
--outputs.spacingx 0.5
--outputs.spacingy -0.5
--map utm
--opt.gridspacing 4 # Spacing of the deformation field
)
OTB_TEST_APPLICATION(NAME apTvPrOrthorectification_UTM
APP OrthoRectification
OPTIONS --io.in ${OTB_DATA_LARGEINPUT_ROOT}/QUICKBIRD/TOULOUSE/000000128955_01_P001_PAN/02APR01105228-P1BS-000000128955_01_P001.TIF
--io.out ${TEMP}/apTvPrOrthorectifTest_UTM.tif
--elev.dem ${INPUTDATA}/DEM/srtm_directory/
--outputs.ulx 374100.8
--outputs.uly 4829184.8
--outputs.sizex 500
--outputs.sizey 500
--outputs.spacingx 0.5
--outputs.spacingy -0.5
--map utm
--opt.gridspacing 4 # Spacing of the deformation field
VALID --compare-image ${NOTOL}
${BASELINE}/owTvOrthorectifTest_UTM.tif
${TEMP}/apTvPrOrthorectifTest_UTM.tif)
ENDIF(OTB_DATA_USE_LARGEINPUT)
add_test(NAME apTvPrRigidTransform
COMMAND otbTestDriver
--compare-image 0.0
${BASELINE}/owTvRigidTransformResampleTest.tif
${TEMP}/owTvRigidTransformResampleTest.tif
Execute $<TARGET_FILE:otbApplicationLauncherCommandLine>
RigidTransformResample
$<TARGET_FILE_DIR:otbapp_RigidTransformResample>
--in ${INPUTDATA}/poupees.tif
--out ${TEMP}/owTvRigidTransformResampleTest.tif
--tx 5
--ty -5
)
OTB_TEST_APPLICATION(NAME apTvPrRigidTransformResample
APP RigidTransformResample
OPTIONS --in ${INPUTDATA}/poupees.tif
--out ${TEMP}/apTvPrRigidTransformResampleTest.tif
--tx 5
--ty -5
VALID --compare-image ${NOTOL}
${BASELINE}/owTvRigidTransformResampleTest.tif
${TEMP}/apTvPrRigidTransformResampleTest.tif)
add_test(NAME apTvPrConvertCartoToGeoPoint
COMMAND otbTestDriver
Execute $<TARGET_FILE:otbApplicationLauncherCommandLine>
ConvertCartoToGeoPoint
$<TARGET_FILE_DIR:otbapp_ConvertCartoToGeoPoint>
--carto.x 367074.625
--carto.y 4835740
--mapproj utm
--mapproj.utm.hemisphere true
--mapproj.utm.zone 31
)
OTB_TEST_APPLICATION(NAME apTuPrConvertCartoToGeoPoint
APP ConvertCartoToGeoPoint
OPTIONS --carto.x 367074.625
--carto.y 4835740
--mapproj utm
--mapproj.utm.hemisphere true
--mapproj.utm.zone 31)
set(TEST_DRIVER otbTestDriver
--add-before-env ITK_AUTOLOAD_PATH $<TARGET_FILE_DIR:otbapp_ReadImageInfo> )
add_test(NAME apTvRIRadiometricVegetationIndices
COMMAND otbTestDriver --compare-image ${NOTOL}
${BASELINE}/apTvRIRadiometricVegetationIndices.tif
${TEMP}/apTvRIRadiometricVegetationIndices.tif
Execute $<TARGET_FILE:otbApplicationLauncherCommandLine>
RadiometricVegetationIndices
$<TARGET_FILE_DIR:otbapp_RadiometricVegetationIndices>
--in ${INPUTDATA}/veryverySmallFSATSW.tif
--index.ndvi 1
--index.rvi 1
--index.ipvi 1
--out ${TEMP}/apTvRIRadiometricVegetationIndices.tif
)
OTB_TEST_APPLICATION(NAME apTvRIRadiometricVegetationIndices
APP RadiometricVegetationIndices
OPTIONS --in ${INPUTDATA}/veryverySmallFSATSW.tif
--index.ndvi 1
--index.rvi 1
--index.ipvi 1
--out ${TEMP}/apTvRIRadiometricVegetationIndices.tif
VALID --compare-image ${NOTOL}
${BASELINE}/apTvRIRadiometricVegetationIndices.tif
${TEMP}/apTvRIRadiometricVegetationIndices.tif)
#--- MeanShift ---#
add_test(NAME apTvSeMeanShift
COMMAND otbTestDriver
--compare-n-images ${EPSILON_7} 4
${BASELINE}/bfMeanShiftVectorImageFilterOutput.tif
${TEMP}/apTvSeMeanShift_FilterOutput.tif
${BASELINE}/bfMeanShiftVectorImageFilterClusteredOutput.tif
${TEMP}/apTvSeMeanShift_ClusteredOutput.tif
${BASELINE}/bfMeanShiftVectorImageFilterLabeledClusteredOutput.tif
${TEMP}/apTvSeMeanShift_LabeledClusteredOutput.tif
${BASELINE}/bfMeanShiftVectorImageFilterClusterBoundariesOutput.tif
${TEMP}/apTvSeMeanShift_ClusterBoundariesOutput.tif
Execute $<TARGET_FILE:otbApplicationLauncherCommandLine>
MeanShiftSegmentation
$<TARGET_FILE_DIR:otbapp_MeanShiftSegmentation>
--in ${INPUTDATA}/qb_RoadExtract2sub200x200.tif
--fout ${TEMP}/apTvSeMeanShift_FilterOutput.tif
--cout ${TEMP}/apTvSeMeanShift_ClusteredOutput.tif
--lout ${TEMP}/apTvSeMeanShift_LabeledClusteredOutput.tif
--cbout ${TEMP}/apTvSeMeanShift_ClusterBoundariesOutput.tif
--spatialr 16
--ranger 16
--minsize 10
--scale 1.0 )
OTB_TEST_APPLICATION(NAME apTvSeMeanShift
APP MeanShiftSegmentation
OPTIONS --in ${INPUTDATA}/qb_RoadExtract2sub200x200.tif
--fout ${TEMP}/apTvSeMeanShift_FilterOutput.tif
--cout ${TEMP}/apTvSeMeanShift_ClusteredOutput.tif
--lout ${TEMP}/apTvSeMeanShift_LabeledClusteredOutput.tif
--cbout ${TEMP}/apTvSeMeanShift_ClusterBoundariesOutput.tif
--spatialr 16
--ranger 16
--minsize 10
--scale 1.0
VALID --compare-n-images ${EPSILON_7} 4
${BASELINE}/bfMeanShiftVectorImageFilterOutput.tif
${TEMP}/apTvSeMeanShift_FilterOutput.tif
${BASELINE}/bfMeanShiftVectorImageFilterClusteredOutput.tif
${TEMP}/apTvSeMeanShift_ClusteredOutput.tif
${BASELINE}/bfMeanShiftVectorImageFilterLabeledClusteredOutput.tif
${TEMP}/apTvSeMeanShift_LabeledClusteredOutput.tif
${BASELINE}/bfMeanShiftVectorImageFilterClusterBoundariesOutput.tif
${TEMP}/apTvSeMeanShift_ClusterBoundariesOutput.tif)
\ No newline at end of file
......@@ -3,196 +3,153 @@ set(TEST_DRIVER otbTestDriver
--add-before-env ITK_AUTOLOAD_PATH $<TARGET_FILE_DIR:otbapp_ReadImageInfo> )
#--- Rescale ---#
add_test(NAME apTvUtRescaleTest
COMMAND otbTestDriver
Execute $<TARGET_FILE:otbApplicationLauncherCommandLine>
Rescale
$<TARGET_FILE_DIR:otbapp_Rescale>
--in ${INPUTDATA}/poupees.tif
--out ${TEMP}/owTvRescaleTest.tif
--outmin 20
--outmax 150 )
#--- Smoothing ---#
add_test(NAME apTvUtSmoothingTest
COMMAND otbTestDriver
Execute $<TARGET_FILE:otbApplicationLauncherCommandLine>
Smoothing
$<TARGET_FILE_DIR:otbapp_Smoothing>
--in ${INPUTDATA}/poupees.tif
--out ${TEMP}/owTvSmoothingTest2.tif
--type mean)
OTB_TEST_APPLICATION(NAME apTuUtRescaleTest
APP Rescale
OPTIONS --in ${INPUTDATA}/poupees.tif
--out ${TEMP}/owTvRescaleTest.tif
--outmin 20
--outmax 150)
#--- Smoothing ---#
OTB_TEST_APPLICATION(NAME apTuUtSmoothingTest
APP Smoothing
OPTIONS --in ${INPUTDATA}/poupees.tif
--out ${TEMP}/apTuUtSmoothingTest2.tif
--type mean)
#--- ReadImageInfo ---#
add_test(NAME apTvUtReadImageInfoTest
COMMAND otbTestDriver
Execute $<TARGET_FILE:otbApplicationLauncherCommandLine>
ReadImageInfo
$<TARGET_FILE_DIR:otbapp_ReadImageInfo>
--in ${INPUTDATA}/poupees.tif )
OTB_TEST_APPLICATION(NAME apTuUtReadImageInfoTest
APP ReadImageInfo
OPTIONS --in ${INPUTDATA}/poupees.tif)
IF(OTB_DATA_USE_LARGEINPUT)
add_test(NAME apTvUtReadImageInfoSpot5
COMMAND otbTestDriver
Execute $<TARGET_FILE:otbApplicationLauncherCommandLine>
ReadImageInfo
$<TARGET_FILE_DIR:otbapp_ReadImageInfo>
--in ${LARGEDATA}/SPOT5/TEHERAN/IMAGERY.TIF )
add_test(NAME apTvUtReadImageInfoERS
COMMAND otbTestDriver
Execute $<TARGET_FILE:otbApplicationLauncherCommandLine>
ReadImageInfo
$<TARGET_FILE_DIR:otbapp_ReadImageInfo>
--in ${LARGEDATA}/SAR_ERS2_SLCI_SCENE1/DAT_01.001 )
add_test(NAME apTvUtReadImageInfoRADARSAT1
COMMAND otbTestDriver
Execute $<TARGET_FILE:otbApplicationLauncherCommandLine>
ReadImageInfo
$<TARGET_FILE_DIR:otbapp_ReadImageInfo>
--in ${LARGEDATA}/RADARSAT1/GOMA/SCENE01/DAT_01.001 )
OTB_TEST_APPLICATION(NAME apTuUtReadImageInfoSpot5
APP ReadImageInfo
OPTIONS --in ${LARGEDATA}/SPOT5/TEHERAN/IMAGERY.TIF)
OTB_TEST_APPLICATION(NAME apTuUtReadImageInfoERS
APP ReadImageInfo
OPTIONS --in ${LARGEDATA}/SAR_ERS2_SLCI_SCENE1/DAT_01.001)
OTB_TEST_APPLICATION(NAME apTuUtReadImageInfoRADARSAT1
APP ReadImageInfo
OPTIONS --in ${LARGEDATA}/RADARSAT1/GOMA/SCENE01/DAT_01.001)
ENDIF(OTB_DATA_USE_LARGEINPUT)
#--- ExtractROI ---#
add_test(NAME apTvUtExtractROIRightInputFile
COMMAND otbTestDriver --compare-image ${NOTOL}
${INPUTDATA}/couleurs_extrait.png
${TEMP}/utExtractROIRightInputFile.tif
Execute $<TARGET_FILE:otbApplicationLauncherCommandLine>
ExtractROI
$<TARGET_FILE_DIR:otbapp_ExtractROI>
--in ${INPUTDATA}/couleurs_extrait.png
--out ${TEMP}/utExtractROIRightInputFile.tif )
add_test(NAME apTvUtExtractROISizeNULL
COMMAND otbTestDriver --compare-image ${NOTOL}
${INPUTDATA}/couleurs_extrait.png
${TEMP}/utExtractROISizeNULL.tif
Execute $<TARGET_FILE:otbApplicationLauncherCommandLine>
ExtractROI
$<TARGET_FILE_DIR:otbapp_ExtractROI>
--in ${INPUTDATA}/couleurs_extrait.png
--out ${TEMP}/utExtractROISizeNULL.tif
--sizex 0 )
add_test(NAME apTvUtExtractROISizeTooBig
COMMAND otbTestDriver --compare-image ${NOTOL}
${INPUTDATA}/couleurs_extrait.png
${TEMP}/utExtractROISizeNULL.tif
Execute $<TARGET_FILE:otbApplicationLauncherCommandLine>
ExtractROI
$<TARGET_FILE_DIR:otbapp_ExtractROI>
--in ${INPUTDATA}/couleurs_extrait.png
--out ${TEMP}/utExtractROISizeNULL.tif
--sizex 1000000 )
OTB_TEST_APPLICATION(NAME apTvUtExtractROIRightInputFile
APP ExtractROI
OPTIONS --in ${INPUTDATA}/couleurs_extrait.png
--out ${TEMP}/apTvUtExtractROIRightInputFile.tif
VALID --compare-image ${NOTOL}
${INPUTDATA}/couleurs_extrait.png
${TEMP}/apTvUtExtractROIRightInputFile.tif)
OTB_TEST_APPLICATION(NAME apTvUtExtractROISizeNULL
APP ExtractROI
OPTIONS --in ${INPUTDATA}/couleurs_extrait.png
--out ${TEMP}/apTvUtExtractROISizeNULL.tif
--sizex 0
VALID --compare-image ${NOTOL}
${INPUTDATA}/couleurs_extrait.png
${TEMP}/apTvUtExtractROISizeNULL.tif)
OTB_TEST_APPLICATION(NAME apTvUtExtractROISizeTooBig
APP ExtractROI
OPTIONS --in ${INPUTDATA}/couleurs_extrait.png
--out ${TEMP}/apTvUtExtractROISizeTooBig.tif
--sizex 1000000
VALID --compare-image ${NOTOL}
${INPUTDATA}/couleurs_extrait.png
${TEMP}/apTvUtExtractROISizeTooBig.tif)
#--- ConcatenateImages ---#
add_test(NAME apTvUtConcatenateImages_1Image
COMMAND otbTestDriver --compare-image ${NOTOL}
${INPUTDATA}/poupees_c1
${TEMP}/apTvUtConcatenateImages_1Image.tif
Execute $<TARGET_FILE:otbApplicationLauncherCommandLine>
ConcatenateImages
$<TARGET_FILE_DIR:otbapp_ConcatenateImages>
--il ${INPUTDATA}/poupees_c1
--out ${TEMP}/apTvUtConcatenateImages_1Image.tif)
add_test(NAME apTvUtConcatenateImages
COMMAND otbTestDriver --compare-image ${NOTOL}
${INPUTDATA}/poupees_sub_3c.png
${TEMP}/apTvUtConcatenateImages.png
Execute $<TARGET_FILE:otbApplicationLauncherCommandLine>
ConcatenateImages
$<TARGET_FILE_DIR:otbapp_ConcatenateImages>
--il ${INPUTDATA}/poupees_sub_c1.png ${INPUTDATA}/poupees_sub_c2.png ${INPUTDATA}/poupees_sub_c3.png
--out ${TEMP}/apTvUtConcatenateImages.png)
OTB_TEST_APPLICATION(NAME apTvUtConcatenateImages_1Image
APP ConcatenateImages
OPTIONS --il ${INPUTDATA}/poupees_c1
--out ${TEMP}/apTvUtConcatenateImages_1Image.tif
VALID --compare-image ${NOTOL}
${INPUTDATA}/poupees_c1
${TEMP}/apTvUtConcatenateImages_1Image.tif)
OTB_TEST_APPLICATION(NAME apTvUtConcatenateImages
APP ConcatenateImages
OPTIONS --il ${INPUTDATA}/poupees_sub_c1.png
${INPUTDATA}/poupees_sub_c2.png
${INPUTDATA}/poupees_sub_c3.png
--out ${TEMP}/apTvUtConcatenateImages.png
VALID --compare-image ${NOTOL}
${INPUTDATA}/poupees_sub_3c.png
${TEMP}/apTvUtConcatenateImages.png)
#--- BandMath application -----
add_test(NAME apTvUtBandMath
COMMAND otbTestDriver --compare-image ${NOTOL}
${INPUTDATA}/apTvUtBandMathOutput.tif
${TEMP}/apTvUtBandMathOutput.tif
Execute $<TARGET_FILE:otbApplicationLauncherCommandLine>
BandMath
$<TARGET_FILE_DIR:otbapp_BandMath>
--il ${INPUTDATA}/poupees_sub_c1.png
${INPUTDATA}/poupees_sub_c2.png
${INPUTDATA}/poupees_sub.png
--out ${TEMP}/apTvUtBandMathOutput.tif
--exp "cos(im1b1)+im2b1*im3b1-im3b2+ndvi(im3b3,im3b4)"
)
OTB_TEST_APPLICATION(NAME apTvUtBandMath
APP BandMath
OPTIONS --il ${INPUTDATA}/poupees_sub_c1.png
${INPUTDATA}/poupees_sub_c2.png
${INPUTDATA}/poupees_sub.png
--out ${TEMP}/apTvUtBandMathOutput.tif
--exp "cos(im1b1)+im2b1*im3b1-im3b2+ndvi(im3b3,im3b4)"
VALID --compare-image ${NOTOL}
${INPUTDATA}/apTvUtBandMathOutput.tif
${TEMP}/apTvUtBandMathOutput.tif)
#--- Split Image application ----
add_test(NAME apTvUtSplitImage
COMMAND otbTestDriver --compare-n-images ${NOTOL} 3
${INPUTDATA}/poupees_sub_c1.png
${TEMP}/apTvUtSplitImageOutput_0.tif
${INPUTDATA}/poupees_sub_c2.png
${TEMP}/apTvUtSplitImageOutput_1.tif
OTB_TEST_APPLICATION(NAME apTvUtSplitImage
APP SplitImage
OPTIONS --in ${INPUTDATA}/poupees_sub.png
--out ${TEMP}/apTvUtSplitImageOutput.tif
VALID --compare-n-images ${NOTOL} 3
${INPUTDATA}/poupees_sub_c1.png
${TEMP}/apTvUtSplitImageOutput_0.tif
${INPUTDATA}/poupees_sub_c3.png
${TEMP}/apTvUtSplitImageOutput_2.tif
Execute $<TARGET_FILE:otbApplicationLauncherCommandLine>
SplitImage
$<TARGET_FILE_DIR:otbapp_BandMath>
--in ${INPUTDATA}/poupees_sub.png
--out ${TEMP}/apTvUtSplitImageOutput.tif
)
${INPUTDATA}/poupees_sub_c2.png
${TEMP}/apTvUtSplitImageOutput_1.tif
${INPUTDATA}/poupees_sub_c3.png
${TEMP}/apTvUtSplitImageOutput_2.tif)
#--- Convert ----
add_test(NAME apTvUtConvertBasic
COMMAND otbTestDriver
Execute $<TARGET_FILE:otbApplicationLauncherCommandLine>
Convert
$<TARGET_FILE_DIR:otbapp_BandMath>
--in ${INPUTDATA}/QB_Toulouse_Ortho_XS.tif
--out ${TEMP}/otbConvertBasicOutput.tif
)
add_test(NAME apTvUtConvertWithScaling
COMMAND otbTestDriver
Execute $<TARGET_FILE:otbApplicationLauncherCommandLine>
Convert
$<TARGET_FILE_DIR:otbapp_BandMath>
--in ${INPUTDATA}/QB_Toulouse_Ortho_XS.tif
--out ${TEMP}/otbConvertWithScalingOutput.png
--type linear
)
OTB_TEST_APPLICATION(NAME apTuUtConvertBasic
APP Convert
OPTIONS --in ${INPUTDATA}/QB_Toulouse_Ortho_XS.tif
--out ${TEMP}/apTuUtConvertBasicOutput.tif)
#--- KmzExport ----
add_test(NAME apTvUtKmzExport
COMMAND otbTestDriver
Execute $<TARGET_FILE:otbApplicationLauncherCommandLine>
KmzExport
$<TARGET_FILE_DIR:otbapp_KmzExport>
--in ${INPUTDATA}/qb_RoadExtract.img
--out ${TEMP}/apTvUtKmzExport.kmz
--logo ${INPUTDATA}/cnes.png
--legend ${INPUTDATA}/otb_big.png
--dem ${INPUTDATA}/DEM/srtm_directory
)
OTB_TEST_APPLICATION(NAME apTuUtConvertWithScaling
APP Convert
OPTIONS --in ${INPUTDATA}/QB_Toulouse_Ortho_XS.tif
--out ${TEMP}/apTuUtConvertWithScaling.tif
--type linear)
#--- KmzExport ----
OTB_TEST_APPLICATION(NAME apTuUtKmzExport
APP KmzExport
OPTIONS --in ${INPUTDATA}/qb_RoadExtract.img
--out ${TEMP}/apTvUtKmzExport.kmz
--logo ${INPUTDATA}/cnes.png
--legend ${INPUTDATA}/otb_big.png
--dem ${INPUTDATA}/DEM/srtm_directory)
#--- OSMDownloader ---
IF(OTB_DATA_USE_LARGEINPUT)
add_test(NAME apTvUtOSMDownloader
COMMAND otbTestDriver --compare-ogr ${NOTOL}
${OTBAPP_BASELINE_FILES}/otbOSMDownloaderOutput.shp
${TEMP}/apTvUtOSMDownloader.shp
Execute $<TARGET_FILE:otbApplicationLauncherCommandLine>
OSMDownloader
$<TARGET_FILE_DIR:otbapp_OSMDownloader>
--support ${OTB_DATA_LARGEINPUT_ROOT}/DEMPSTER-SHAFER/ROI_QB_TOULOUSE.TIF
--key highway
--out ${TEMP}/apTvUtOSMDownloader.shp
)
OTB_TEST_APPLICATION(NAME apTvUtOSMDownloader
APP OSMDownloader
OPTIONS --support ${OTB_DATA_LARGEINPUT_ROOT}/DEMPSTER-SHAFER/ROI_QB_TOULOUSE.TIF
--key highway
--out ${TEMP}/apTvUtOSMDownloader.shp
VALID --compare-ogr ${NOTOL}
${OTBAPP_BASELINE_FILES}/otbOSMDownloaderOutput.shp
${TEMP}/apTvUtOSMDownloader.shp)
#ADD_TEST(utTvOSMDownloader ${OTB_TEST_DRIVER}
# --compare-ogr ${TOL}
......
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