Newer
Older
Julien Malik
committed
set(TEST_DRIVER otbTestDriver
--add-before-env ITK_AUTOLOAD_PATH $<TARGET_FILE_DIR:otbapp_ReadImageInfo> )
Julien Malik
committed
#--- Rescale ---#
add_test(NAME apTvUtRescaleTest
Julien Malik
committed
COMMAND otbTestDriver
Execute $<TARGET_FILE:otbApplicationLauncherCommandLine>
$<TARGET_FILE_DIR:otbapp_Rescale>
--in ${INPUTDATA}/poupees.tif
--out ${TEMP}/owTvRescaleTest.tif
--outmin 20
--outmax 150 )
#--- Smoothing ---#
add_test(NAME apTvUtSmoothingTest
Julien Malik
committed
COMMAND otbTestDriver
Execute $<TARGET_FILE:otbApplicationLauncherCommandLine>
$<TARGET_FILE_DIR:otbapp_Smoothing>
--in ${INPUTDATA}/poupees.tif
--out ${TEMP}/owTvSmoothingTest2.tif
--type mean)
#--- ReadImageInfo ---#
add_test(NAME apTvUtReadImageInfoTest
Julien Malik
committed
COMMAND otbTestDriver
Execute $<TARGET_FILE:otbApplicationLauncherCommandLine>
$<TARGET_FILE_DIR:otbapp_ReadImageInfo>
--in ${INPUTDATA}/poupees.tif )
Julien Malik
committed
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 )
ENDIF(OTB_DATA_USE_LARGEINPUT)
#--- ExtractROI ---#
add_test(NAME apTvUtExtractROIRightInputFile
COMMAND otbTestDriver --compare-image ${NOTOL}
Julien Malik
committed
${INPUTDATA}/couleurs_extrait.png
${TEMP}/utExtractROIRightInputFile.tif
Execute $<TARGET_FILE:otbApplicationLauncherCommandLine>
ExtractROI
$<TARGET_FILE_DIR:otbapp_ExtractROI>
Julien Malik
committed
--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 )
#--- 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)
#--- 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)"
Cyrille Valladeau
committed
#--- 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
${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
)
Cyrille Valladeau
committed
#--- 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
Cyrille Valladeau
committed
--type linear
)
#--- 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
)
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
#--- 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
)
#ADD_TEST(utTvOSMDownloader ${OTB_TEST_DRIVER}
# --compare-ogr ${TOL}
# ${BASELINE_FILES}/otbOSMDownloaderOutput.shp
# ${TEMP}/otbOSMDownloaderOutput.shp
# Execute otbOSMDownloader-cli
# -in ${OTB_DATA_LARGEINPUT_ROOT}/DEMPSTER-SHAFER/ROI_QB_TOULOUSE.TIF
# -key "highway"
# -out ${TEMP}/otbOSMDownloaderOutput.shp
#)
ENDIF(OTB_DATA_USE_LARGEINPUT)