CMakeLists.txt 24.3 KB
Newer Older
1
#--- Rescale ---#
2
OTB_TEST_APPLICATION(NAME  apTvUtRescaleTest
3
                     APP  Rescale
4 5 6 7
                     OPTIONS -in ${INPUTDATA}/poupees.tif
                             -out ${TEMP}/apTvUtRescaleTest.png uint8
                             -outmin 20
                             -outmax 150
8 9 10
                     VALID   --compare-image ${NOTOL}
                             ${BASELINE}/apTvUtRescaleTest.png
                             ${TEMP}/apTvUtRescaleTest.png)
11 12

#--- Smoothing ---#
13
OTB_TEST_APPLICATION(NAME  apTvUtSmoothingTest
14
                     APP  Smoothing
15 16 17
                     OPTIONS -in ${INPUTDATA}/poupees.tif
               	             -out ${TEMP}/apTvUtSmoothingTest.tif
                             -type mean
18 19 20
                     VALID   --compare-image ${NOTOL}
                             ${BASELINE}/apTvUtSmoothingTest.tif
                             ${TEMP}/apTvUtSmoothingTest.tif)
21 22 23 24

OTB_TEST_APPLICATION(NAME  apTvUtSmoothingTest_OutXML
                     APP  Smoothing
                     OPTIONS -in ${INPUTDATA}/poupees.tif
25
               	             -out ${TEMP}/apTvUtSmoothingTest_OutXML.tif
26 27 28 29
                             -type mean
                             -outxml ${TEMP}/apTvUtSmoothingTest_OutXML.xml
                     VALID   --compare-image ${NOTOL}
                             ${BASELINE}/apTvUtSmoothingTest.tif
30
                             ${TEMP}/apTvUtSmoothingTest_OutXML.tif)
31 32 33

OTB_TEST_APPLICATION(NAME  apTvUtSmoothingTest_InXML
                     APP  Smoothing
34
                     OPTIONS -inxml ${INPUTDATA}/apTvUtSmoothingTest_OutXML.xml
35
               	             -in ${INPUTDATA}/poupees.tif
36
               	             -out ${TEMP}/apTvUtSmoothingTest_InXML.tif
37 38 39
                             -type mean                         
                     VALID   --compare-image ${NOTOL}
                             ${BASELINE}/apTvUtSmoothingTest.tif
40
                             ${TEMP}/apTvUtSmoothingTest_InXML.tif)
41 42
#--- ReadImageInfo ---#

43
OTB_TEST_APPLICATION(NAME  apTvUtReadImageInfoTest
44
                     APP  ReadImageInfo
45
                     OPTIONS -in ${INPUTDATA}/poupees.tif
46 47 48 49
                     TESTENVOPTIONS ${TEMP}/apTvUtReadImageInfoTest.txt
                     VALID   --compare-ascii ${EPSILON_7}
                             ${BASELINE_FILES}/apTvUtReadImageInfoTest.txt
                	     ${TEMP}/apTvUtReadImageInfoTest.txt)
50

51 52
IF(OTB_DATA_USE_LARGEINPUT)

53
OTB_TEST_APPLICATION(NAME  apTvUtReadImageInfoSpot5
54
                     APP  ReadImageInfo
55
                     OPTIONS -in ${LARGEDATA}/SPOT5/TEHERAN/IMAGERY.TIF
56 57 58 59
                     TESTENVOPTIONS ${TEMP}/apTvUtReadImageInfoSpot5.txt
                     VALID   --compare-ascii ${EPSILON_7}
                             ${BASELINE_FILES}/apTvUtReadImageInfoSpot5.txt
                	     ${TEMP}/apTvUtReadImageInfoSpot5.txt)
60

61
OTB_TEST_APPLICATION(NAME  apTvUtReadImageInfoERS
62
                     APP  ReadImageInfo
63
                     OPTIONS -in ${LARGEDATA}/SAR_ERS2_SLCI_SCENE1/DAT_01.001
64 65 66 67
                     TESTENVOPTIONS ${TEMP}/apTvUtReadImageInfoERS.txt
                     VALID   --compare-ascii ${EPSILON_7}
                             ${BASELINE_FILES}/apTvUtReadImageInfoERS.txt
                	     ${TEMP}/apTvUtReadImageInfoERS.txt)
68

69
OTB_TEST_APPLICATION(NAME  apTvUtReadImageInfoRADARSAT1
70
                     APP  ReadImageInfo
71
                     OPTIONS -in ${LARGEDATA}/RADARSAT1/GOMA/SCENE01/DAT_01.001
72 73 74 75
                     TESTENVOPTIONS ${TEMP}/apTvUtReadImageInfoRADARSAT1.txt
                     VALID   --compare-ascii ${EPSILON_7}
                             ${BASELINE_FILES}/apTvUtReadImageInfoRADARSAT1.txt
                	     ${TEMP}/apTvUtReadImageInfoRADARSAT1.txt)
76 77 78 79

ENDIF(OTB_DATA_USE_LARGEINPUT)

#--- ExtractROI ---#
80 81 82

OTB_TEST_APPLICATION(NAME apTvUtExtractROIRightInputFile
                     APP  ExtractROI
83 84
                     OPTIONS -in ${INPUTDATA}/couleurs_extrait.png
                             -out ${TEMP}/apTvUtExtractROIRightInputFile.tif
85 86 87 88 89 90
                     VALID   --compare-image ${NOTOL}
                             ${INPUTDATA}/couleurs_extrait.png
                             ${TEMP}/apTvUtExtractROIRightInputFile.tif)

OTB_TEST_APPLICATION(NAME apTvUtExtractROISizeNULL
                     APP  ExtractROI
91 92 93
                     OPTIONS -in ${INPUTDATA}/couleurs_extrait.png
                 			 -out ${TEMP}/apTvUtExtractROISizeNULL.tif
                 			 -sizex 0
94 95 96
                     VALID   --compare-image ${NOTOL}
                             ${INPUTDATA}/couleurs_extrait.png
                             ${TEMP}/apTvUtExtractROISizeNULL.tif)
97

98 99
OTB_TEST_APPLICATION(NAME apTvUtExtractROISizeTooBig
                     APP  ExtractROI
100 101
                     OPTIONS -in ${INPUTDATA}/couleurs_extrait.png
                 			 -out ${TEMP}/apTvUtExtractROISizeTooBig.tif
102
                 			 -sizex 1000000
103 104 105 106
                     VALID   --compare-image ${NOTOL}
                             ${INPUTDATA}/couleurs_extrait.png
                             ${TEMP}/apTvUtExtractROISizeTooBig.tif)

107

108
#--- ConcatenateImages ---#
109 110
OTB_TEST_APPLICATION(NAME apTvUtConcatenateImages_1Image
                     APP  ConcatenateImages
111 112
                     OPTIONS -il ${INPUTDATA}/poupees_c1
                             -out ${TEMP}/apTvUtConcatenateImages_1Image.tif
113 114 115 116 117 118
                     VALID   --compare-image ${NOTOL}
                             ${INPUTDATA}/poupees_c1
                             ${TEMP}/apTvUtConcatenateImages_1Image.tif)

OTB_TEST_APPLICATION(NAME apTvUtConcatenateImages
                     APP  ConcatenateImages
119 120
                     OPTIONS -il ${INPUTDATA}/poupees_sub_c1.png
                                  ${INPUTDATA}/poupees_sub_c2.png
121
                                  ${INPUTDATA}/poupees_sub_c3.png
122
                 			 -out ${TEMP}/apTvUtConcatenateImages.png
123 124 125
                     VALID   --compare-image ${NOTOL}
                             ${INPUTDATA}/poupees_sub_3c.png
                             ${TEMP}/apTvUtConcatenateImages.png)
126 127

#--- BandMath application -----
128 129 130

OTB_TEST_APPLICATION(NAME apTvUtBandMath
                     APP  BandMath
131 132
                     OPTIONS -il ${INPUTDATA}/poupees_sub_c1.png
                                  ${INPUTDATA}/poupees_sub_c2.png
133
                                  ${INPUTDATA}/poupees_sub.png
134 135
                             -out ${TEMP}/apTvUtBandMathOutput.tif
                             -exp "cos(im1b1)+im2b1*im3b1-im3b2+ndvi(im3b3,im3b4)"
136 137
                     VALID   --compare-image ${NOTOL}
                             ${INPUTDATA}/apTvUtBandMathOutput.tif
138
                             ${TEMP}/apTvUtBandMathOutput.tif)
139

140

141
#--- Split Image application ----
142

143 144
OTB_TEST_APPLICATION(NAME apTvUtSplitImage
                     APP SplitImage
145 146
                     OPTIONS -in  ${INPUTDATA}/poupees_sub.png
                             -out ${TEMP}/apTvUtSplitImageOutput.tif
147 148 149
                     VALID   --compare-n-images ${NOTOL} 3
                             ${INPUTDATA}/poupees_sub_c1.png
                             ${TEMP}/apTvUtSplitImageOutput_0.tif
150

151 152
                             ${INPUTDATA}/poupees_sub_c2.png
                             ${TEMP}/apTvUtSplitImageOutput_1.tif
153

154 155
                             ${INPUTDATA}/poupees_sub_c3.png
                             ${TEMP}/apTvUtSplitImageOutput_2.tif)
156 157

#--- Convert ----
158
OTB_TEST_APPLICATION(NAME apTvUtConvertBasic
159
                     APP Convert
160 161
                     OPTIONS -in ${INPUTDATA}/QB_Toulouse_Ortho_XS.tif
                             -out ${TEMP}/apTvUtConvertBasicOutput.tif
162
                     VALID   --compare-image ${NOTOL}
Cyrille Valladeau's avatar
Cyrille Valladeau committed
163 164
                             ${INPUTDATA}/apTvUtConvertBasicOutput.tif
                	     ${TEMP}/apTvUtConvertBasicOutput.tif
165
)
166

167
OTB_TEST_APPLICATION(NAME apTvUtConvertWithScaling
168
                     APP Convert
169
                     OPTIONS -in ${INPUTDATA}/QB_Toulouse_Ortho_XS.tif
170
                             -out ${TEMP}/apTvUtConvertWithScalingOutput.tif uint8
171
                             -type linear
172 173 174 175
                     VALID   --compare-image ${NOTOL}
                             ${INPUTDATA}/apTvUtConvertWithScalingOutput.tif
                	     ${TEMP}/apTvUtConvertWithScalingOutput.tif
)
176

177
#--- KmzExport ----
178
OTB_TEST_APPLICATION(NAME apTvUtKmzExport
179
                     APP KmzExport
180 181 182 183
                     OPTIONS -in   ${INPUTDATA}/qb_RoadExtract.img
                             -out ${TEMP}/apTvUtKmzExport.kmz
                             -logo ${INPUTDATA}/cnes.png
                             -legend ${INPUTDATA}/otb_big.png
184
                             -elev.dem ${INPUTDATA}/DEM/srtm_directory)
185
SET_PROPERTY(TEST apTvUtKmzExport PROPERTY RESOURCE_LOCK kmz_tmp_dir)
186

Mickael Savinaud's avatar
Mickael Savinaud committed
187 188 189 190 191 192 193 194 195
OTB_TEST_APPLICATION(NAME apTvUtKmzExport1Band
                     APP KmzExport
                     OPTIONS #-in /media/otbnas/public/Data/Saterre/data/cumulLAI.tif
                             -in ${INPUTDATA}/QB_PAN_ROI_1000_100.tif
                             -out ${TEMP}/apTvUtKmzExport1Band.kmz
                             -logo ${INPUTDATA}/cnes.png
                             -legend ${INPUTDATA}/otb_big.png
                             -elev.dem ${INPUTDATA}/DEM/srtm_directory
                             -tilesize 50) # needed to see the bug mantis #773
196
SET_PROPERTY(TEST apTvUtKmzExport1Band PROPERTY RESOURCE_LOCK kmz_tmp_dir)
197

198 199
IF(OTB_DATA_USE_LARGEINPUT)
#--- OSMDownloader ---
200 201
OTB_TEST_APPLICATION(NAME apTvUtOSMDownloader
                     APP OSMDownloader
202 203 204
                     OPTIONS -support ${OTB_DATA_LARGEINPUT_ROOT}/DEMPSTER-SHAFER/ROI_QB_TOULOUSE.TIF
                             -key highway
                             -out ${TEMP}/apTvUtOSMDownloader.shp
205
                     VALID   --compare-ogr ${NOTOL}
206 207
                             ${OTBAPP_BASELINE_FILES}/otbOSMDownloaderOutput.shp
                             ${TEMP}/apTvUtOSMDownloader.shp)
208

209
#--- VectorDataTransform ---
210 211
OTB_TEST_APPLICATION(NAME apTvUtVectorDataTransform_Rotation
                     APP VectorDataTransform
212 213 214 215
                     OPTIONS -in ${OTB_DATA_LARGEINPUT_ROOT}/QUICKBIRD/TOULOUSE/000000128955_01_P001_MUL/02APR01105228-M1BS-000000128955_01_P001.TIF
                             -vd ${INPUTDATA}/ToulouseRoad-examples.shp
                             -out ${TEMP}/apTvUtVectorDataTransform_rotation.shp
                             -transform.ro 15
216
                     VALID   --compare-ogr ${NOTOL}
217 218 219 220 221
                             ${OTBAPP_BASELINE_FILES}/utTvVectorDataTransformFilter_Rotation.shp
                             ${TEMP}/apTvUtVectorDataTransform_rotation.shp)

OTB_TEST_APPLICATION(NAME apTvUtVectorDataTransform_Translation_Rotation
                     APP VectorDataTransform
222 223 224 225 226 227
                     OPTIONS -in ${OTB_DATA_LARGEINPUT_ROOT}/QUICKBIRD/TOULOUSE/000000128955_01_P001_MUL/02APR01105228-M1BS-000000128955_01_P001.TIF
                             -vd ${INPUTDATA}/ToulouseRoad-examples.shp
                             -out ${TEMP}/apTvUtVectorDataTransform_Translation_rotation.shp
                             -transform.ro 15
                             -transform.tx  5
                             -transform.ty  6
228
                     VALID   --compare-ogr ${NOTOL}
229 230 231
                             ${OTBAPP_BASELINE_FILES}/utTvVectorDataTransformFilter_Translation_rotation.shp
                             ${TEMP}/apTvUtVectorDataTransform_Translation_rotation.shp)

232 233 234
#--- VectorDataExtractROIApplication ---
OTB_TEST_APPLICATION(NAME apTvUtVectorDataExtractROIApplication
                     APP VectorDataExtractROIApplication
235 236 237
                     OPTIONS -io.in ${INPUTDATA}/QB_Toulouse_Ortho_XS.tif
                             -io.vd ${OTB_DATA_LARGEINPUT_ROOT}/VECTOR/MidiPyrenees/roads.shp
                             -io.out ${TEMP}/apTvUtVectorDataExtractROIApplicationTest.shp
238 239 240
                     VALID   --compare-ogr ${NOTOL}
                             ${BASELINE_FILES}/apTvUtVectorDataExtractROIApplicationTest.shp
                             ${TEMP}/apTvUtVectorDataExtractROIApplicationTest.shp
241 242
                     )

243 244
ENDIF(OTB_DATA_USE_LARGEINPUT)

245
#--- Concatenate VectorData ---
246
OTB_TEST_APPLICATION(NAME apTvUtConcatenateVectorData
247
                     APP ConcatenateVectorData
248
                     OPTIONS -vd   ${INPUTDATA}/waterways.shp
249
                                    ${INPUTDATA}/france_coastline.shp
250
                             -out ${TEMP}/apTvUtConcatenateVectorDataOutputTest.shp
251 252
                     VALID   --compare-ogr ${NOTOL}
                             ${OTBAPP_BASELINE_FILES}/utTvConcatenateVectorData.shp
253
                             ${TEMP}/apTvUtConcatenateVectorDataOutputTest.shp)
254 255 256 257

#--- CompareImages ---
OTB_TEST_APPLICATION(NAME apTvUtCompareImages
                     APP CompareImages
258 259 260 261 262 263 264 265
                     OPTIONS -ref.in ${INPUTDATA}/poupees.tif
                             -ref.channel 2
                             -meas.in ${INPUTDATA}/brain.png
                             -meas.channel 1
                             -roi.startx 20
                             -roi.starty 15
                             -roi.sizex 150
                             -roi.sizey 200
266
                     TESTENVOPTIONS ${TEMP}/apTvUtCompareImages.txt
267 268 269
                     VALID   --compare-ascii ${EPSILON_7}
                             ${BASELINE_FILES}/apTvUtCompareImages.txt
                	     ${TEMP}/apTvUtCompareImages.txt)
270

271 272 273 274 275 276 277 278 279
OTB_TEST_APPLICATION(NAME apTvUtCompareImagesNoROI
                     APP CompareImages
                     OPTIONS -ref.in ${INPUTDATA}/GomaAvant.png
                             -meas.in ${INPUTDATA}/GomaApres.png
                     TESTENVOPTIONS ${TEMP}/apTvUtCompareImagesNoROI.txt
                     VALID   --compare-ascii ${EPSILON_7}
                             ${BASELINE_FILES}/apTvUtCompareImagesNoROI.txt
                	           ${TEMP}/apTvUtCompareImagesNoROI.txt)

280 281 282
#--- VectorDataSetField ---
OTB_TEST_APPLICATION(NAME apTvUtVectorDataSetField
                     APP VectorDataSetField
283 284 285 286
                     OPTIONS -in ${INPUTDATA}/ToulousePoints-examples.shp
                             -out ${TEMP}/apTvUtVectorDataSetFieldTest.shp
                             -fn MyField
                             -fv MyValue
287 288 289 290
                     VALID   --compare-ogr ${NOTOL}
                             ${BASELINE_FILES}/apTvUtVectorDataSetFieldTest.shp
                             ${TEMP}/apTvUtVectorDataSetFieldTest.shp
                     )
291 292 293 294

#--- Quicklook ---
OTB_TEST_APPLICATION(NAME apTvUtQuicklookROI1Channel
                     APP Quicklook
295 296 297
                     OPTIONS -in ${INPUTDATA}/couleurs_extrait.png
                             -out ${TEMP}/apTvUtQuicklookROI1Channel.tif
                             -cl Channel1
298 299 300 301
                     VALID   --compare-image ${NOTOL}
                             ${BASELINE}/apTvUtQuicklookROI1Channel.tif
                             ${TEMP}/apTvUtQuicklookROI1Channel.tif
                     )
302 303 304 305

IF(OTB_DATA_USE_LARGEINPUT)
OTB_TEST_APPLICATION(NAME apTvUtQuicklookSpot5
                     APP Quicklook
306 307 308 309 310 311 312 313
                     OPTIONS -in ${LARGEDATA}/SPOT5/TEHERAN/IMAGERY.TIF
                             -out ${TEMP}/apTvUtQuicklookSpot5.tif
                             -cl Channel1 Channel2 Channel3
                             -rox 10
                             -roy 10
                             -rsx 100
                             -rsy 200
                             -sr 2
314 315 316 317 318
                     VALID   --compare-image ${NOTOL}
                             ${BASELINE}/apTvUtQuicklookSpot5.png
                             ${TEMP}/apTvUtQuicklookSpot5.tif
                     )
ENDIF(OTB_DATA_USE_LARGEINPUT)
319 320 321 322 323 324 325 326 327 328 329 330 331

#--- Pixel Value ---
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
                             )
332
#--- ColorMapping ---
333
OTB_TEST_APPLICATION(NAME apTvUtColorMappingLabelToColorContinuousLUTJet
334
                     APP ColorMapping
335
                     OPTIONS -in ${INPUTDATA}/QB_Toulouse_Ortho_PAN.tif
336 337
                             -method continuous
                             -method.continuous.lut jet
338
                             -method.continuous.min 100
339 340
                             -method.continuous.max 500
                             -out ${TEMP}/QB_Toulouse_Ortho_PAN_LUTJet.tif uint8
341
                     VALID --compare-image ${EPSILON_7}
342 343
                             ${BASELINE}/apTvUtColorMappingContinuousLUTJet.tif
                	         ${TEMP}/QB_Toulouse_Ortho_PAN_LUTJet.tif)
344 345


346 347 348 349 350 351 352 353 354 355 356 357
OTB_TEST_APPLICATION(NAME apTvUtColorMappingLabelToColorCustomLUTQB
                     APP ColorMapping
                     OPTIONS -in ${EXAMPLEDATA}/ROI_QB_MUL_1_SVN_CLASS_MULTI.png
                             -method custom
                             -method.custom.lut ${INPUTDATA}/ROI_QB_MUL_1_SVN_CLASS_MULTI_PNG_ColorTable.txt
                             -out ${TEMP}/apTvUtColorMappingLabelToColorCustomLUTQB.tif uint8
                     VALID   --compare-image ${NOTOL}
                	         ${BASELINE}/apTvUtColorMappingLabelToColorCustomLUTQB.tif
                	         ${TEMP}/apTvUtColorMappingLabelToColorCustomLUTQB.tif)

OTB_TEST_APPLICATION(NAME apTvUtColorMappingColorToLabelCustomLUTQB
                     APP ColorMapping
358
                     OPTIONS -in ${BASELINE}/apTvUtColorMappingLabelToColorCustomLUTQB.tif
359 360 361 362 363 364 365 366 367
                             -op colortolabel
                     		 -op.colortolabel.notfound 0
                             -method custom
                             -method.custom.lut ${INPUTDATA}/ROI_QB_MUL_1_SVN_CLASS_MULTI_PNG_ColorTable.txt
                             -out ${TEMP}/apTvUtColorMappingColorToLabelCustomLUTQB.tif uint8
                     VALID   --compare-image ${NOTOL}
                	         ${EXAMPLEDATA}/ROI_QB_MUL_1_SVN_CLASS_MULTI.png
                	         ${TEMP}/apTvUtColorMappingColorToLabelCustomLUTQB.tif)

368
#SET_TESTS_PROPERTIES(apTvUtColorMappingColorToLabelCustomLUTQB PROPERTIES DEPENDS apTvUtColorMappingLabelToColorCustomLUTQB)
369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388


OTB_TEST_APPLICATION(NAME apTvUtColorMappingLabelToColorCustomLUT
                     APP ColorMapping
                     OPTIONS -in ${INPUTDATA}/labelImage_UnsignedChar.tif
                             -method custom
                             -method.custom.lut ${INPUTDATA}/labelImage_UnsignedChar_lut.dat
                             -out ${TEMP}/apTvUtColorMappingLabelToColorCustomLUT.tif uint8
                     VALID   --compare-image ${NOTOL}
                	         ${BASELINE}/apTvUtColorMappingLabelToColorCustomLUT.tif
                	         ${TEMP}/apTvUtColorMappingLabelToColorCustomLUT.tif)

OTB_TEST_APPLICATION(NAME apTvUtColorMappingLabelToColorOptimalLUTQB
                     APP ColorMapping
                     OPTIONS -in ${EXAMPLEDATA}/ROI_QB_MUL_1_SVN_CLASS_MULTI.png
                             -method optimal
                             -out ${TEMP}/apTvUtColorMappingLabelToColorOptimalLUTQB.tif uint8
                     VALID   --compare-image ${NOTOL}
                             ${BASELINE}/apTvUtColorMappingLabelToColorOptimalLUTQB.tif
                	         ${TEMP}/apTvUtColorMappingLabelToColorOptimalLUTQB.tif)
389

390 391
OTB_TEST_APPLICATION(NAME apTvUtColorMappingColorToLabelOptimalLUTQB
                     APP ColorMapping
392
                     OPTIONS -in ${BASELINE}/apTvUtColorMappingLabelToColorOptimalLUTQB.tif
393 394 395 396 397
                             -method optimal
                             -op colortolabel
                     		 -op.colortolabel.notfound 0
                             -out ${TEMP}/apTvUtColorMappingColorToLabelOptimalLUTQB.tif uint8
                     VALID   --compare-image ${NOTOL}
398 399 400
                             ${BASELINE}/apTvUtColorMappingColorToLabelOptimalLUTQB.tif
                             ${TEMP}/apTvUtColorMappingColorToLabelOptimalLUTQB.tif)

401
#SET_TESTS_PROPERTIES(apTvUtColorMappingColorToLabelOptimalLUTQB PROPERTIES DEPENDS apTvUtColorMappingLabelToColorOptimalLUTQB)
402

403

404 405 406 407 408 409 410 411 412 413 414
OTB_TEST_APPLICATION(NAME apTvUtColorMappingLabelToColorOptimalLUT
                     APP ColorMapping
                     OPTIONS -in ${INPUTDATA}/labelImage_UnsignedChar.tif
                             -method optimal
                             -out ${TEMP}/apTvUtColorMappingLabelToColorOptimalLUT.tif uint8
                     VALID   --compare-image ${NOTOL}
                             ${BASELINE}/apTvUtColorMappingLabelToColorOptimalLUT.tif
                	         ${TEMP}/apTvUtColorMappingLabelToColorOptimalLUT.tif)

OTB_TEST_APPLICATION(NAME apTvUtColorMappingColorToLabelOptimalLUT
                     APP ColorMapping
415
                     OPTIONS -in ${BASELINE}/apTvUtColorMappingLabelToColorOptimalLUT.tif
416 417 418 419 420 421 422 423
                     		 -op colortolabel
                     		 -op.colortolabel.notfound 255
                             -method optimal
                             -out ${TEMP}/apTvUtColorMappingColorToLabelOptimalLUT.tif uint8
                     VALID   --compare-image ${NOTOL}
                             ${INPUTDATA}/labelImage_UnsignedChar.tif
                             ${TEMP}/apTvUtColorMappingColorToLabelOptimalLUT.tif)

424
#SET_TESTS_PROPERTIES(apTvUtColorMappingColorToLabelOptimalLUT PROPERTIES DEPENDS apTvUtColorMappingLabelToLabelOptimalLUT)
425

426 427 428 429 430 431 432 433
OTB_TEST_APPLICATION(NAME apTvUtColorMappingLabelToColorSupportImage
                     APP ColorMapping
                     OPTIONS -in ${EXAMPLEDATA}/ROI_QB_MUL_1_SVN_CLASS_MULTI.png
                             -method image
                             -method.image.in ${EXAMPLEDATA}/ROI_QB_MUL_1.tif
                             -out ${TEMP}/apTvUtColorMappingLabelToColorSupportImage.tif uint8
                     VALID   --compare-image ${NOTOL}
                             ${BASELINE}/apTvUtColorMappingLabelToColorSupportImage.tif
434 435
                	         ${TEMP}/apTvUtColorMappingLabelToColorSupportImage.tif)

436 437
#--- Testing Extended Filename -----

438
OTB_TEST_APPLICATION(NAME apTvUtConvertExtendedFilename_readerGEOM
439 440 441 442 443
                     APP  Convert
                     OPTIONS -in ${INPUTDATA}/ToulouseExtract_WithGeom.tif?&geom=${INPUTDATA}/ToulouseExtract_ModifiedGeom.geom
                             -out ${TEMP}/apTvUtGeomExtendedFilename.tif
                     VALID   --compare-ascii ${EPSILON_7}
                             ${INPUTDATA}/ToulouseExtract_ModifiedGeom.geom
444 445
                             ${TEMP}/apTvUtGeomExtendedFilename.geom)

446 447 448 449
OTB_TEST_APPLICATION(NAME apTuUtReadImageInfoExtendedFilename_reader
                     APP  ReadImageInfo
                     OPTIONS -in ${INPUTDATA}/ToulouseExtract_WithGeom.tif?&skipgeom=true&skipcarto=true
                     )
450

451 452 453 454
OTB_TEST_APPLICATION(NAME apTuUtConvertExtendedFilename_writer
                     APP  Convert
                     OPTIONS -in ${INPUTDATA}/ToulouseExtract_WithGeom.tif
                             -out ${TEMP}/apTvUtGeomExtendedFilename.tif?&gdal:co:TILED=YES&writegeom=false
455 456 457 458 459 460 461 462 463 464 465 466 467 468
                     )

OTB_TEST_APPLICATION(NAME apTvUtTileFusion
                     APP TileFusion
                     OPTIONS -il ${EXAMPLEDATA}/Scene_R1C1.png
                                 ${EXAMPLEDATA}/Scene_R1C2.png
                                 ${EXAMPLEDATA}/Scene_R2C1.png
                                 ${EXAMPLEDATA}/Scene_R2C2.png
                             -cols 2
                             -rows 2
                             -out ${TEMP}/apTvUtTileFusion.png uint8
                     VALID   --compare-image ${NOTOL}
                             ${EXAMPLEDATA}/Scene.png
                           ${TEMP}/apTvUtTileFusion.png)
469 470 471 472 473 474 475

#--- Testing Download SRTM tiles application ---

IF(OTB_DATA_USE_LARGEINPUT)
OTB_TEST_APPLICATION(NAME apTuUtDownloadSRTMTiles
                     APP  DownloadSRTMTiles
                     OPTIONS -il ${LARGEDATA}/QUICKBIRD/TOULOUSE/000000128955_01_P001_MUL/02APR01105228-M1BS-000000128955_01_P001.TIF
476 477
                             -mode list
                             -mode.list.indir ${INPUTDATA}/DEM/srtm_directory
478 479 480
                     )

ENDIF(OTB_DATA_USE_LARGEINPUT)