<commit_before>
#--- Rescale ---#
OTB_TEST_APPLICATION(NAME  apTvUtRescaleTest
                     APP  Rescale
                     OPTIONS -in ${INPUTDATA}/poupees.tif
                             -out ${TEMP}/apTvUtRescaleTest.png uint8
                             -outmin 20
                             -outmax 150
                     VALID   --compare-image ${NOTOL}
                             ${BASELINE}/apTvUtRescaleTest.png
                             ${TEMP}/apTvUtRescaleTest.png)

#--- Smoothing ---#
OTB_TEST_APPLICATION(NAME  apTvUtSmoothingTest
                     APP  Smoothing
                     OPTIONS -in ${INPUTDATA}/poupees.tif
               	             -out ${TEMP}/apTvUtSmoothingTest.tif
                             -type mean
                     VALID   --compare-image ${NOTOL}
                             ${BASELINE}/apTvUtSmoothingTest.tif
                             ${TEMP}/apTvUtSmoothingTest.tif)
#--- ReadImageInfo ---#

OTB_TEST_APPLICATION(NAME  apTvUtReadImageInfoTest
                     APP  ReadImageInfo
                     OPTIONS -in ${INPUTDATA}/poupees.tif)

IF(OTB_DATA_USE_LARGEINPUT)

OTB_TEST_APPLICATION(NAME  apTvUtReadImageInfoSpot5
                     APP  ReadImageInfo
                     OPTIONS -in ${LARGEDATA}/SPOT5/TEHERAN/IMAGERY.TIF)
                     
OTB_TEST_APPLICATION(NAME  apTvUtReadImageInfoERS
                     APP  ReadImageInfo
                     OPTIONS -in ${LARGEDATA}/SAR_ERS2_SLCI_SCENE1/DAT_01.001)

OTB_TEST_APPLICATION(NAME  apTvUtReadImageInfoRADARSAT1
                     APP  ReadImageInfo
                     OPTIONS -in ${LARGEDATA}/RADARSAT1/GOMA/SCENE01/DAT_01.001)

ENDIF(OTB_DATA_USE_LARGEINPUT)

#--- ExtractROI ---#

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 ---#
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 -----

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 ----

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_c2.png
                             ${TEMP}/apTvUtSplitImageOutput_1.tif

                             ${INPUTDATA}/poupees_sub_c3.png
                             ${TEMP}/apTvUtSplitImageOutput_2.tif)

#--- Convert ----
OTB_TEST_APPLICATION(NAME apTvUtConvertBasic
                     APP Convert
                     OPTIONS -in ${INPUTDATA}/QB_Toulouse_Ortho_XS.tif
                             -out ${TEMP}/apTvUtConvertBasicOutput.tif
                     VALID   --compare-image ${NOTOL}
                             ${INPUTDATA}/apTvUtConvertBasicOutput.tif
                	     ${TEMP}/apTvUtConvertBasicOutput.tif
)

OTB_TEST_APPLICATION(NAME apTvUtConvertWithScaling
                     APP Convert
                     OPTIONS -in ${INPUTDATA}/QB_Toulouse_Ortho_XS.tif
                             -out ${TEMP}/apTvUtConvertWithScalingOutput.tif
                             -type linear
                     VALID   --compare-image ${NOTOL}
                             ${INPUTDATA}/apTvUtConvertWithScalingOutput.tif
                	     ${TEMP}/apTvUtConvertWithScalingOutput.tif
)

#--- KmzExport ----
OTB_TEST_APPLICATION(NAME apTvUtKmzExport
                     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)


IF(OTB_DATA_USE_LARGEINPUT)
#--- OSMDownloader ---
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)
<commit_msg>ENH: use the right key for the elevation in the Kmz export test<commit_after>
#--- Rescale ---#
OTB_TEST_APPLICATION(NAME  apTvUtRescaleTest
                     APP  Rescale
                     OPTIONS -in ${INPUTDATA}/poupees.tif
                             -out ${TEMP}/apTvUtRescaleTest.png uint8
                             -outmin 20
                             -outmax 150
                     VALID   --compare-image ${NOTOL}
                             ${BASELINE}/apTvUtRescaleTest.png
                             ${TEMP}/apTvUtRescaleTest.png)

#--- Smoothing ---#
OTB_TEST_APPLICATION(NAME  apTvUtSmoothingTest
                     APP  Smoothing
                     OPTIONS -in ${INPUTDATA}/poupees.tif
               	             -out ${TEMP}/apTvUtSmoothingTest.tif
                             -type mean
                     VALID   --compare-image ${NOTOL}
                             ${BASELINE}/apTvUtSmoothingTest.tif
                             ${TEMP}/apTvUtSmoothingTest.tif)
#--- ReadImageInfo ---#

OTB_TEST_APPLICATION(NAME  apTvUtReadImageInfoTest
                     APP  ReadImageInfo
                     OPTIONS -in ${INPUTDATA}/poupees.tif)

IF(OTB_DATA_USE_LARGEINPUT)

OTB_TEST_APPLICATION(NAME  apTvUtReadImageInfoSpot5
                     APP  ReadImageInfo
                     OPTIONS -in ${LARGEDATA}/SPOT5/TEHERAN/IMAGERY.TIF)
                     
OTB_TEST_APPLICATION(NAME  apTvUtReadImageInfoERS
                     APP  ReadImageInfo
                     OPTIONS -in ${LARGEDATA}/SAR_ERS2_SLCI_SCENE1/DAT_01.001)

OTB_TEST_APPLICATION(NAME  apTvUtReadImageInfoRADARSAT1
                     APP  ReadImageInfo
                     OPTIONS -in ${LARGEDATA}/RADARSAT1/GOMA/SCENE01/DAT_01.001)

ENDIF(OTB_DATA_USE_LARGEINPUT)

#--- ExtractROI ---#

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 ---#
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 -----

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 ----

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_c2.png
                             ${TEMP}/apTvUtSplitImageOutput_1.tif

                             ${INPUTDATA}/poupees_sub_c3.png
                             ${TEMP}/apTvUtSplitImageOutput_2.tif)

#--- Convert ----
OTB_TEST_APPLICATION(NAME apTvUtConvertBasic
                     APP Convert
                     OPTIONS -in ${INPUTDATA}/QB_Toulouse_Ortho_XS.tif
                             -out ${TEMP}/apTvUtConvertBasicOutput.tif
                     VALID   --compare-image ${NOTOL}
                             ${INPUTDATA}/apTvUtConvertBasicOutput.tif
                	     ${TEMP}/apTvUtConvertBasicOutput.tif
)

OTB_TEST_APPLICATION(NAME apTvUtConvertWithScaling
                     APP Convert
                     OPTIONS -in ${INPUTDATA}/QB_Toulouse_Ortho_XS.tif
                             -out ${TEMP}/apTvUtConvertWithScalingOutput.tif
                             -type linear
                     VALID   --compare-image ${NOTOL}
                             ${INPUTDATA}/apTvUtConvertWithScalingOutput.tif
                	     ${TEMP}/apTvUtConvertWithScalingOutput.tif
)

#--- KmzExport ----
OTB_TEST_APPLICATION(NAME apTvUtKmzExport
                     APP KmzExport
                     OPTIONS -in   ${INPUTDATA}/qb_RoadExtract.img
                             -out ${TEMP}/apTvUtKmzExport.kmz
                             -logo ${INPUTDATA}/cnes.png
                             -legend ${INPUTDATA}/otb_big.png
                             -elev dem
                             -elev.dem.path ${INPUTDATA}/DEM/srtm_directory)


IF(OTB_DATA_USE_LARGEINPUT)
#--- OSMDownloader ---
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)

{'fraction_non_alphanumeric': 0.07949647670520626, 'fraction_numerical': 0.008483272901416159, 'mean_word_length': 1.2396200398345334, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 20, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4428171', 'n_tokens_mistral': 4564, 'n_tokens_neox': 4174, 'n_words': 522}