CMakeLists.txt 23.7 KB
Newer Older
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
1
 
Thomas Feuvrier's avatar
Thomas Feuvrier committed
2
IF( NOT OTB_DISABLE_CXX_TESTING AND BUILD_TESTING )
OTB Bot's avatar
OTB Bot committed
3

4
5
6
SET(BASELINE ${OTB_DATA_ROOT}/Baseline/OTB/Images)
SET(BASELINE_FILES ${OTB_DATA_ROOT}/Baseline/OTB/Files)
SET(INPUTDATA ${OTB_DATA_ROOT}/Input)
OTB Bot's avatar
OTB Bot committed
7
SET(TEMP ${OTBTesting_BINARY_DIR}/Temporary)
8

Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
9
#Tolerance sur diff pixel image
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
10
SET(TOL 0.0)
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
11

12
13
#Tolerance sur la difference des valeurs numeriques dans le --compare-ascii
SET(EPS 0.001)
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
14

15
16
17
18
19
20
21
22
23
24
25
SET(COMMON_TESTS1 ${CXX_TEST_PATH}/otbCommonTests1)
SET(COMMON_TESTS2 ${CXX_TEST_PATH}/otbCommonTests2)
SET(COMMON_TESTS3 ${CXX_TEST_PATH}/otbCommonTests3)
SET(COMMON_TESTS4 ${CXX_TEST_PATH}/otbCommonTests4)
SET(COMMON_TESTS5 ${CXX_TEST_PATH}/otbCommonTests5)
SET(COMMON_TESTS6 ${CXX_TEST_PATH}/otbCommonTests6)
SET(COMMON_TESTS7 ${CXX_TEST_PATH}/otbCommonTests7)

# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ otbCommonTests1 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
OTB Bot's avatar
OTB Bot committed
26

27
# -------            otb::System  -------------
28
ADD_TEST(coTuSystemTests_IsA_Methods ${COMMON_TESTS1}  
29
30
31
32
33
34
        otbSystemTest
        ${OTB_DATA_ROOT}/OTBData.readme
        ${OTB_DATA_ROOT}
        )


Patrick Imbo's avatar
Patrick Imbo committed
35
# -------            otb::CommandLibneArgumentParser  -------------
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
36

37
ADD_TEST(coTuCmdLineArgParserHelpWithArg ${COMMON_TESTS1}  
Patrick Imbo's avatar
Patrick Imbo committed
38
        otbTestCommandLineArgumentParserHelp
39
        --help -image image.png)
Patrick Imbo's avatar
Patrick Imbo committed
40

41
ADD_TEST(coTuCmdLineArgParserHelpWithoutArg ${COMMON_TESTS1}  
Patrick Imbo's avatar
Patrick Imbo committed
42
        otbTestCommandLineArgumentParserHelp
43
        --help)
Patrick Imbo's avatar
Patrick Imbo committed
44

45
ADD_TEST(coTuCmdLineArgParserDeuxEntiers_ExactNumberArg ${COMMON_TESTS1}  
Patrick Imbo's avatar
Patrick Imbo committed
46
47
48
        otbTestCommandLineArgumentParser
        -image image.png -entier 150 -double 12.25 -deuxentiers 78 56 )

49
ADD_TEST(coTuCmdLineArgParserDeuxEntier_LessArg ${COMMON_TESTS1}  
Patrick Imbo's avatar
Patrick Imbo committed
50
        otbTestCommandLineArgumentParserWithError
Patrick Imbo's avatar
Patrick Imbo committed
51
52
        -image image.png -entier 150 -double 12.25 -deuxentiers 78 )

53
ADD_TEST(coTuCmdLineArgParserDeuxEntier_MoreArg ${COMMON_TESTS1}  
Patrick Imbo's avatar
Patrick Imbo committed
54
        otbTestCommandLineArgumentParserWithError
Patrick Imbo's avatar
Patrick Imbo committed
55
56
        -image image.png -entier 150 -double 12.25 -deuxentiers 78 56 32)

57
ADD_TEST(coTuCmdLineArgParser_MissingObligatoryArg ${COMMON_TESTS1}  
Patrick Imbo's avatar
Patrick Imbo committed
58
        otbTestCommandLineArgumentParserWithError
Patrick Imbo's avatar
Patrick Imbo committed
59
        -entier 150 -double 12.25 -deuxentiers 78 56 32)
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
60

61
ADD_TEST(coTuCmdLineArgParser_EmptyList ${COMMON_TESTS1}  
Patrick Imbo's avatar
Patrick Imbo committed
62
63
64
        otbTestCommandLineArgumentParserList
        -image image.png -entier 150 -double 12.25 -deuxentiers 78 56 -doubles)

65
ADD_TEST(coTuCmdLineArgParser_List1Arg ${COMMON_TESTS1}  
Patrick Imbo's avatar
Patrick Imbo committed
66
67
68
        otbTestCommandLineArgumentParserList
        -image image.png -entier 150 -double 12.25 -deuxentiers 78 56 -doubles 1.0)

69
ADD_TEST(coTuCmdLineArgParser_List2Arg ${COMMON_TESTS1}  
Patrick Imbo's avatar
Patrick Imbo committed
70
71
72
        otbTestCommandLineArgumentParserList
        -image image.png -entier 150 -double 12.25 -deuxentiers 78 56 -doubles 1.0 2.0)

73
ADD_TEST(coTuCmdLineArgParser_List2ArgBis ${COMMON_TESTS1}  
Patrick Imbo's avatar
Patrick Imbo committed
74
75
76
        otbTestCommandLineArgumentParserList
        -image image.png -entier 150 -double 12.25 -doubles 1.0 2.0 -deuxentiers 78 56 )

77
#ADD_TEST(coTuCmdLineArgParserGUIDeuxEntiers_ExactNumberArg ${COMMON_TESTS1}  
Julien Michel's avatar
Julien Michel committed
78
79
#        otbTestCommandLineArgumentParserGUI
#        -image image.png -entier 150 -double 12.25 -deuxentiers 78 56 )
80
81


82
83
84
85
86
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ otbCommonTests2 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 

ADD_TEST(coTuLineSpatialObjectList ${COMMON_TESTS2}  
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
87
88
89
90
        otbLineSpatialObjectList
        )


Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
91
92
# -------            otb::ExtractROI   ------------------------------

93
ADD_TEST(coTuExtractROINew ${COMMON_TESTS2}
Patrick Imbo's avatar
Patrick Imbo committed
94
95
	otbExtractROINew)
	
96
ADD_TEST(coTvExtractROI ${COMMON_TESTS2}  
Julien Michel's avatar
Julien Michel committed
97
98
  --compare-image ${TOL}   ${BASELINE}/coExtractROI_cthead1_26_97_209_100.png
                    ${TEMP}/coExtractROI_cthead1_26_97_209_100.png
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
99
100
101
102
        otbExtractROI
        ${INPUTDATA}/cthead1.png 
        ${TEMP}/coExtractROI_cthead1_26_97_209_100.png 
        26 97 209 100 )
103
104
105
106
107
108
109
110
ADD_TEST(coTvExtractROI2 ${COMMON_TESTS2}  
  --compare-image ${TOL}   ${BASELINE}/coExtractROI_cthead1_26_97_209_100.png
                    ${TEMP}/coExtractROI2_cthead1_26_97_209_100.png
        otbExtractROI2
        ${INPUTDATA}/cthead1.png 
        ${TEMP}/coExtractROI2_cthead1_26_97_209_100.png 
        26 97 209 100 )        
        
111
ADD_TEST(coTvExtractROI_RGB ${COMMON_TESTS2}  
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
112
113
114
115
116
117
  --compare-image ${TOL}   ${BASELINE}/coExtractROI_RGB_sbuv_700_60_77_489.png
                    ${TEMP}/coExtractROI_RGB_sbuv_700_60_77_489.png
        otbExtractROI_RGB
        ${INPUTDATA}/sbuv.png 
        ${TEMP}/coExtractROI_RGB_sbuv_700_60_77_489.png 
        700 60 77 489 )
118
ADD_TEST(coTvExtractROI_RGB2 ${COMMON_TESTS2}  
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
119
120
121
122
123
124
125
126
127
128
  --compare-image ${TOL}   ${BASELINE}/coExtractROI_RGB_poupees_302_1_134_330.jpg
                    ${TEMP}/coExtractROI_RGB_poupees_302_1_134_330.jpg
        otbExtractROI_RGB
        ${INPUTDATA}/poupees.jpg 
        ${TEMP}/coExtractROI_RGB_poupees_302_1_134_330.jpg 
        303 2 134 330 )


# -------            otb::MultiChannelExtractROI   ------------------------------

129
ADD_TEST(coTuMultiChannelROINew ${COMMON_TESTS2}   
Patrick Imbo's avatar
Patrick Imbo committed
130
131
         otbMultiChannelExtractROINew)

132
ADD_TEST(coTvMultiChannelROI_RGB2RGB_PNG ${COMMON_TESTS2}   
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
133
134
135
  --compare-image ${TOL}   ${INPUTDATA}/sbuv.png
                           ${TEMP}/coMultiChannelExtractROI_RGB2RGB_PNG_sbuv.png
         otbMultiChannelExtractROI 
136
         ${INPUTDATA}/sbuv.png 
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
137
         ${TEMP}/coMultiChannelExtractROI_RGB2RGB_PNG_sbuv.png
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
138
         -channels 1 2 3 )
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
139
#         -sizeX 800 -sizeY 600 )
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
140

141
ADD_TEST(coTvMultiChannelROI_RGB2RGB_PNG2 ${COMMON_TESTS2}   
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
142
143
144
  --compare-image ${TOL}   ${BASELINE}/coMultiChannelExtractROI_RGB2RGB_PNG_sbuv_700_60_77_489_channels_123.png
                           ${TEMP}/coMultiChannelExtractROI_RGB2RGB_PNG_sbuv_700_60_77_489_channels_123.png
         otbMultiChannelExtractROI 
145
146
         -uchar ${INPUTDATA}/sbuv.png 
         -uchar ${TEMP}/coMultiChannelExtractROI_RGB2RGB_PNG_sbuv_700_60_77_489_channels_123.png
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
147
148
         -startX 700 -startY 60 -sizeX 77 -sizeY 489 -channels 1 2 3  )
         
149
ADD_TEST(coTvMultiChannelROI_RGB2RGB_PNG3 ${COMMON_TESTS2}   
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
150
151
152
153
154
155
  --compare-image ${TOL}  ${BASELINE}/coMultiChannelExtractROI_RGB2RGB_PNG_sbuv_700_60_77_489_channels_321.png
                    ${TEMP}/coMultiChannelExtractROI_RGB2RGB_PNG_sbuv_700_60_77_489_channels_321.png
         otbMultiChannelExtractROI 
         ${INPUTDATA}/sbuv.png 
         ${TEMP}/coMultiChannelExtractROI_RGB2RGB_PNG_sbuv_700_60_77_489_channels_321.png
         -startX 700 -startY 60 -sizeX 77 -sizeY 489 -channels 3 2 1  )
156
ADD_TEST(coTvMultiChannelROI_RGB2NG_PNG1 ${COMMON_TESTS2}   
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
157
158
159
  --compare-image ${TOL}  ${BASELINE}/coMultiChannelExtractROI_RGB2NG_PNG_sbuv_700_60_77_489_channel_1.png
                    ${TEMP}/coMultiChannelExtractROI_RGB2NG_PNG_sbuv_700_60_77_489_channel_1.png
         otbMultiChannelExtractROI 
160
         ${INPUTDATA}/sbuv.png 
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
161
162
         ${TEMP}/coMultiChannelExtractROI_RGB2NG_PNG_sbuv_700_60_77_489_channel_1.png
         -startX 700 -startY 60 -sizeX 77 -sizeY 489 -channels 1 )
163
164
165


ADD_TEST(coTvMultiChannelROI_RGB2NG_PNG2 ${COMMON_TESTS2}   
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
166
167
168
  --compare-image ${TOL}  ${BASELINE}/coMultiChannelExtractROI_RGB2NG_PNG_sbuv_700_60_77_489_channel_2.png
                    ${TEMP}/coMultiChannelExtractROI_RGB2NG_PNG_sbuv_700_60_77_489_channel_2.png
         otbMultiChannelExtractROI 
169
         ${INPUTDATA}/sbuv.png 
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
170
171
         ${TEMP}/coMultiChannelExtractROI_RGB2NG_PNG_sbuv_700_60_77_489_channel_2.png
         -startX 700 -startY 60 -sizeX 77 -sizeY 489 -channels 2 )
172
ADD_TEST(coTvMultiChannelROI_RGB2NG_PNG3 ${COMMON_TESTS2}   
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
173
174
175
  --compare-image ${TOL}  ${BASELINE}/coMultiChannelExtractROI_RGB2NG_PNG_sbuv_700_60_77_489_channel_3.png
                    ${TEMP}/coMultiChannelExtractROI_RGB2NG_PNG_sbuv_700_60_77_489_channel_3.png
         otbMultiChannelExtractROI 
176
         ${INPUTDATA}/sbuv.png 
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
177
178
179
         ${TEMP}/coMultiChannelExtractROI_RGB2NG_PNG_sbuv_700_60_77_489_channel_3.png
         -startX 700 -startY 60 -sizeX 77 -sizeY 489 -channels 3 )

180
ADD_TEST(coTvMultiChannelROI_5c_BSQ ${COMMON_TESTS2}   
181
182
#  --compare-binary  ${BASELINE}/coMultiChannelExtractROI_RGB2NG_PNG_poupees_303_2_134_330_channels_12321.c1
#                    ${TEMP}/coMultiChannelExtractROI_RGB2NG_PNG_poupees_303_2_134_330_channels_12321.c1
183
184
  --compare-image ${TOL} ${BASELINE}/coMultiChannelExtractROI_RGB_ENVI_poupees_303_2_134_330_channels_12321.hdr
                    ${TEMP}/coMultiChannelExtractROI_RGB_ENVI_poupees_303_2_134_330_channels_12321.hdr
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
185
         otbMultiChannelExtractROI 
186
         ${INPUTDATA}/poupees.hdr 
187
         ${TEMP}/coMultiChannelExtractROI_RGB_ENVI_poupees_303_2_134_330_channels_12321.hdr
Patrick Imbo's avatar
nomsg    
Patrick Imbo committed
188
         -startX 303 -startY 2 -sizeX 134  -sizeY 330 -channels 1 2 3 2 1 )
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
189

190
ADD_TEST(coTvMultiChannelROI_3c_BSQ ${COMMON_TESTS2}   
191
192
#  --compare-binary  ${BASELINE}/coMultiChannelExtractROI_RGB2NG_PNG_poupees_303_2_134_330_channels_345.c1
#                    ${TEMP}/coMultiChannelExtractROI_RGB2NG_PNG_poupees_303_2_134_330_channels_345.c1
193
194
  --compare-image  ${TOL}  ${BASELINE}/coMultiChannelExtractROI_RGB_ENVI_poupees_303_2_134_330_channels_345.hdr
                    ${TEMP}/coMultiChannelExtractROI_RGB_ENVI_poupees_303_2_134_330_channels_345.hdr
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
195
         otbMultiChannelExtractROI 
196
197
         ${TEMP}/coMultiChannelExtractROI_RGB_ENVI_poupees_303_2_134_330_channels_12321.hdr
         ${TEMP}/coMultiChannelExtractROI_RGB_ENVI_poupees_303_2_134_330_channels_345.hdr
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
198
199
200
         -startX 0 -startY 0 -sizeX 134  -sizeY 330 -channels 3 4 5 )


201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
ADD_TEST(coTvTestMultiExtractMultiUpdate ${COMMON_TESTS2}
--compare-image  ${TOL}
		 ${BASELINE}/coTvMultiExtractMultiUpdate.tif
                 ${TEMP}/coTvMultiExtractMultiUpdate.tif
     otbTestMultiExtractMultiUpdate
      ${INPUTDATA}/poupees.tif 
      ${TEMP}/coTvMultiExtractMultiUpdate.tif
      70 # startX
      60 # startY 
      50 #sizeX 
      50 #sizeY
      1 # first channel
      3 # last channel
)

216
217
218
219
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ otbCommonTests3 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 

Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
220
# -------            otb::MultiToMonoChannelExtractROI   ------------------------------
221

222
ADD_TEST(coTuMultiToMonoROINew ${COMMON_TESTS3}   
Patrick Imbo's avatar
Patrick Imbo committed
223
224
         otbMultiToMonoChannelExtractROINew) 

225
ADD_TEST(coTvMultiToMonoROI_RGB2NG_PNG ${COMMON_TESTS3}   
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
226
227
228
229
230
231
  --compare-image ${TOL}   ${BASELINE}/coMultiToMonoChannelExtractROI_RGB2NG_PNG_sbuv_700_60_77_489_channel_1.png
                           ${TEMP}/coMultiToMonoChannelExtractROI_RGB2NG_PNG_sbuv_700_60_77_489_channel_1.png
         otbMultiToMonoChannelExtractROI 
         ${INPUTDATA}/sbuv.png 
         ${TEMP}/coMultiToMonoChannelExtractROI_RGB2NG_PNG_sbuv_700_60_77_489_channel_1.png
         -startX 700 -startY 60 -sizeX 77 -sizeY 489 -channel 1 )
232
233


Patrick Imbo's avatar
Patrick Imbo committed
234
# -------            otb::PointSetSource   ------------------------------
235

236
ADD_TEST(coTuPointSetSource ${COMMON_TESTS3} 
Patrick Imbo's avatar
Patrick Imbo committed
237
         otbPointSetSourceTest)  
238

Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
239
240
# -------            otb::DrawLineSpatialObjectImageFilter   ------------------------------

241
ADD_TEST(coTuDrawLineSpatialObjectNew ${COMMON_TESTS3} 
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
242
243
         otbDrawLineSpatialObjectNew)
         
244
ADD_TEST(coTuDrawLineSpatialObject ${COMMON_TESTS3} 
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
245
246
247
248
249
250
         otbDrawLineSpatialObject
         ${INPUTDATA}/ImageLineDir.bsq
         ${TEMP}/coFiltreDrawLine_ImageLineDir.png 10. 22. 38. 42.)
         
# -------            otb::DrawLineSpatialObjectListImageFilter   ------------------------------

251
ADD_TEST(coTuDrawLineSpatialObjectListNew ${COMMON_TESTS3} 
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
252
253
         otbDrawLineSpatialObjectListNew)

254
ADD_TEST(coTuDrawLineSpatialObjectList ${COMMON_TESTS3} 
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
255
256
         otbDrawLineSpatialObjectList
         ${INPUTDATA}/ImageLineDir.bsq
257
258
         ${TEMP}/coFiltreDrawLineList_ImageLineDir.png )  

259

Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
260
261
# -------            otb::ImageToLineSpatialObjectListImageFilter   ------------------------------

262
ADD_TEST(coTuImageToLineSpatialObjectListNew ${COMMON_TESTS3} 
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
263
         otbImageToLineSpatialObjectListNew)
Patrick Imbo's avatar
Patrick Imbo committed
264
	 
265
266
# -------            otb::PathListToHistogramGenerator   ---------------------------

267
ADD_TEST(coTuPathListToHistogramGeneratorNew ${COMMON_TESTS3} 
268
269
         otbPathListToHistogramGeneratorNew)  

270
ADD_TEST(coTuPathListToHistogramGenerator ${COMMON_TESTS3} 
271
         otbPathListToHistogramGenerator 100 2)  
272

273
274
275
276
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ otbCommonTests4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 

277
278
# -------            otb::HistogramStatisticFunction   ---------------------------

279
ADD_TEST(coTuHistogramStatisticsFunction ${COMMON_TESTS4} 
280
         otbHistogramStatisticsFunction 100)  
281

282
283
# -------            otb::ObjectList   -------------------------------------------

284
ADD_TEST(coTuObjectListNew ${COMMON_TESTS4} 
285
286
         otbObjectListNew)  

287
ADD_TEST(coTvObjectList ${COMMON_TESTS4}   
288
289
290
291
292
         otbObjectList 
         ${INPUTDATA}/couleurs.jpg 
	 ${INPUTDATA}/poupees.png
	 ${INPUTDATA}/sbuv.png
 )
293
ADD_TEST(coTuListNew ${COMMON_TESTS4} 
Thomas Feuvrier's avatar
Thomas Feuvrier committed
294
295
         otbListNew)  

296
ADD_TEST(coTvList ${COMMON_TESTS4}   
Thomas Feuvrier's avatar
Thomas Feuvrier committed
297
298
299
300
301
         otbList 
         ${INPUTDATA}/couleurs.jpg 
	 ${INPUTDATA}/poupees.png
	 ${INPUTDATA}/sbuv.png
 )
302
303
304

# -------            otb::ImageList   -------------------------------------------

305
ADD_TEST(coTuImageListNew ${COMMON_TESTS4} 
306
307
         otbImageListNew)  

308
ADD_TEST(coTvImageList ${COMMON_TESTS4}  
309
	--compare-image ${TOL}   ${INPUTDATA}/amst.png
310
				 ${TEMP}/amst.png
311
312
         otbImageList 
	 ${INPUTDATA}/amst.png
313
         ${TEMP}/amst.png
314
)
315
 
316
317
# -------            otb::ImageListSource   -------------------------------------------

318
ADD_TEST(coTuImageListSourceNew ${COMMON_TESTS4} 
319
320
321
322
         otbImageListSourceNew)  

# -------            otb::ImageToImageListFilter   -------------------------------------------

323
ADD_TEST(coTuImageToImageListFilterNew ${COMMON_TESTS4} 
324
325
         otbImageToImageListFilterNew) 

326
327
# -------            otb::ImageListToImageFilter   -------------------------------------------

328
ADD_TEST(coTuImageListToImageFilterNew ${COMMON_TESTS4} 
329
330
         otbImageListToImageFilterNew) 

331
332
333
334
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ otbCommonTests5 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

335
336
# -------            otb::ImageListToImageListFilter   -------------------------------------------

337
ADD_TEST(coTvImageListToImageListFilterNew ${COMMON_TESTS5} 
338
339
         otbImageListToImageListFilterNew) 

340
# -------            otb::ConcatenateVectorImageFilter  -------------------------------------------
341

342
ADD_TEST(coTuConcatenateVectorImageFilterNew ${COMMON_TESTS5} 
343
344
         otbConcatenateVectorImageFilterNew)  

345
ADD_TEST(coTvConcatenateVectorImageFilter ${COMMON_TESTS5}
346
347
348
349
350
351
352
353
354
         --compare-image ${TOL}
	 ${BASELINE}/coConcatenateVectorImageFilterOutput1.hdr
         ${TEMP}/coConcatenateVectorImageFilterOutput1.hdr
	 otbConcatenateVectorImageFilter 
	 ${INPUTDATA}/poupees.png
         ${INPUTDATA}/poupees.png
	 ${TEMP}/coConcatenateVectorImageFilterOutput1.hdr
)

355
356
#------------    otbImageToVectorImageCastFilter --------------------------------

357
ADD_TEST(coTuImageToVectorImageCastFilter ${COMMON_TESTS5}
358
359
	otbImageToVectorImageCastFilterNew)

360
ADD_TEST(coTvImageToVectorImageCastFilter ${COMMON_TESTS5}
361
--compare-image ${TOL}
362
		${BASELINE}/coImageToVectorImageCastFilterOutput.tif
363
		${TEMP}/coImageToVectorImageCastFilterOutput.tif
364
365
		otbImageToVectorImageCastFilter
		${INPUTDATA}/poupees.hdr
366
		${TEMP}/coImageToVectorImageCastFilterOutput.tif
367
)
368

369
# -------            otb::ImageToPathFilterNew  -------------------------------------------
370
ADD_TEST(coTuImageToPathFilterNew ${COMMON_TESTS5} 
371
372
         otbImageToPathFilterNew)  

373
# -------            otb::SpatialObjectSource  -------------------------------------------
374
ADD_TEST(coTuSpatialObjectSourceNew ${COMMON_TESTS5} 
375
376
         otbSpatialObjectSourceNew)  

377
# -------            otb::LineSpatialObject  -------------------------------------------
378
ADD_TEST(coTuLineSpatialObjectNew ${COMMON_TESTS5} 
379
380
381
         otbLineSpatialObjectNew)  

# -------            otb::ArcSpatialObject -------------------------------------------
382
ADD_TEST(coTuArcSpatialObjectNew ${COMMON_TESTS5} 
383
384
         otbArcSpatialObjectNew)  

385
# -------  otb::PathListToPathListFilter -------------------------------------------
386
ADD_TEST(coTuPathListToPathListFilterNew ${COMMON_TESTS5} 
387
         otbPathListToPathListFilterNew)  
388

389
390
391
392
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ otbCommonTests6 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 

393
# -------  otb::PolyLineParametricPathWithValue -------------------------------------------
394
ADD_TEST(coTuPolyLineParametricPathWithValueNew ${COMMON_TESTS6} 
395
396
         otbPolyLineParametricPathWithValueNew)  

397

398
# -------  otb::Polygon -------------------------------------------
399
ADD_TEST(coTuPolygonNew ${COMMON_TESTS6} 
400
401
         otbPolygonNew)
  
402
ADD_TEST(coTuPolygon ${COMMON_TESTS6} 
403
404
405
406
407
408
--compare-ascii ${EPS}  
		${BASELINE_FILES}/otbPolygonTest.txt
                ${TEMP}/otbPolygonTest.txt
         otbPolygon
	        ${TEMP}/otbPolygonTest.txt	
		2 10 7 10 7 9 5 9 5 8 7 8 7 6 9 6 9 5 7 5 7 3 2 3 
409
		next 6 10 11 10 11 2 4 2 3 4 8 4 8 7 6 7
410
411
)

412
413
#-------- otb::PolyLineImageIterator -----------------------------------------

414
 ADD_TEST(coTuPolyLineImageIterator ${COMMON_TESTS6} 
415
416
417
418
419
420
421
422
423
--compare-image ${TOL}
		${BASELINE}/coTvPolyLineImageIterator.png
		${TEMP}/coTvPolyLineImageIterator.png
         otbPolyLineImageIterator
		512 512 20
		${TEMP}/coTvPolyLineImageIterator.png
)


424
425
# -------  otb::DrawPathListFilter -------------------------------------------

426
ADD_TEST(coTuDrawPathListFilterNew ${COMMON_TESTS6} 
427
428
         otbDrawPathListFilterNew)  

429
ADD_TEST(coTvDrawPathListFilter ${COMMON_TESTS6}
430
431
432
433
434
435
436
437
--compare-image ${TOL}
		${BASELINE}/coTvDrawPathListFilterOutput.png
		${TEMP}/coTvDrawPathListFilterOutput.png
		otbDrawPathListFilter
		512 512 20
		${TEMP}/coTvDrawPathListFilterOutput.png
)

438
ADD_TEST(coTvDrawPathListFilterWithValue ${COMMON_TESTS6}
439
440
441
442
443
444
445
446
--compare-image ${TOL}
		${BASELINE}/coTvDrawPathListFilterWithValueOutput.png
		${TEMP}/coTvDrawPathListFilterWithValueOutput.png
		otbDrawPathListFilterWithValue
		512 512 20	
		${TEMP}/coTvDrawPathListFilterWithValueOutput.png
)

447

448
# -------  otb::DrawPathFilter -------------------------------------------
Julien Michel's avatar
Julien Michel committed
449

450
ADD_TEST(coTuDrawPatFilterNew ${COMMON_TESTS6}
Julien Michel's avatar
Julien Michel committed
451
452
453
otbDrawPathFilterNew
)

454
ADD_TEST(coTvDrawPatFilter ${COMMON_TESTS6}
Julien Michel's avatar
Julien Michel committed
455
456
457
458
459
460
461
--compare-image ${TOL}
		${BASELINE}/coTvDrawPathFilterOutput.png
		${TEMP}/coTvDrawPathFilterOutput.png
		otbDrawPathFilter
		512 512 20	
		${TEMP}/coTvDrawPathFilterOutput.png
)
462

Julien Michel's avatar
Julien Michel committed
463
464
465
# -------  otb::UnaryFunctorNeighborhoodImageFilter ----------------------
ADD_TEST(coTuUnaryFunctorNeighborhoodImageFilterNew ${COMMON_TESTS6}
otbUnaryFunctorNeighborhoodImageFilterNew
466
467
)

Julien Michel's avatar
Julien Michel committed
468
ADD_TEST(coTvUnaryFunctorNeighborhoodImageFilter ${COMMON_TESTS6}
469
--compare-image ${TOL}
470
471
		${BASELINE}/coTvUnaryFunctorNeighborhoodImageFilter.png
		${TEMP}/coTvUnaryFunctorNeighborhoodImageFilter.png
Julien Michel's avatar
Julien Michel committed
472
    otbUnaryFunctorNeighborhoodImageFilter
473
474
        ${INPUTDATA}/amst.png
	${TEMP}/coTvUnaryFunctorNeighborhoodImageFilter.png
475
476
	3
)
477

478
479
480
481
482
483


# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ otbCommonTests7 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 

484
485
486
487
488
# -------------  otb::GenericInterpolateImageFunction ----------------------------
ADD_TEST(coTuGenericInterpolateImageFunctionNew ${COMMON_TESTS7}
otbGenericInterpolateImageFunctionNew
)

Julien Michel's avatar
Julien Michel committed
489
490
491
492
493
494
# -------------  otb::MirrorBoundaryCondition ----------------------------
ADD_TEST(coTvMirrorBoundaryCondition ${COMMON_TESTS7}
     otbMirrorBoundaryConditionTest
     ${INPUTDATA}/qb_RoadExtract.img
     10
)
495
496
497
498
499
500
501

# -------------  otb::StandardFilterWatcherNew ----------------------------
ADD_TEST(coTuStandardFilterWatcherNew ${COMMON_TESTS7}
     otbStandardFilterWatcherNew
     ${INPUTDATA}/qb_RoadExtract.img
)

Julien Michel's avatar
Julien Michel committed
502
503
504
505
506
507
508
509
510
511
512
513
514
515

# -------------  otb::DataNode ----------------------------
ADD_TEST(coTvDataNode ${COMMON_TESTS7}
     otbDataNodeTest
)
# -------------  otb::VectorData ----------------------------
ADD_TEST(coTuVectorData ${COMMON_TESTS7}
     otbVectorDataNew
)

ADD_TEST(coTvVectorData ${COMMON_TESTS7}
     otbVectorData
)

516
517
518
519
520
521
522
523
524
525
526
527
ADD_TEST(coTuShiftScaleImageAdaptorNew ${COMMON_TESTS7}
     otbShiftScaleImageAdaptorNew
)

ADD_TEST(coTvShiftScaleImageAdaptor ${COMMON_TESTS7}
  --compare-image ${TOL}
	          ${BASELINE}/coTvShiftScaleImageAdaptor.tif    # copie the input image
		  ${TEMP}/coTvShiftScaleImageAdaptor.tif
     otbShiftScaleImageAdaptor
        ${INPUTDATA}/ROI_IKO_PAN_LesHalles.tif
	${TEMP}/coTvShiftScaleImageAdaptor.tif
)
528

529
# -------       Fichiers sources CXX -----------------------------------
530
SET(BasicCommon_SRCS1
531
otbSystemTest.cxx
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
532
otbTestCommandLineArgumentParser.cxx
Julien Michel's avatar
Julien Michel committed
533
#otbTestCommandLineArgumentParserGUI.cxx
Patrick Imbo's avatar
Patrick Imbo committed
534
otbTestCommandLineArgumentParserHelp.cxx
Patrick Imbo's avatar
Patrick Imbo committed
535
otbTestCommandLineArgumentParserList.cxx
Patrick Imbo's avatar
Patrick Imbo committed
536
otbTestCommandLineArgumentParserWithError.cxx
537
538
539
)
SET(BasicCommon_SRCS2
otbLineSpatialObjectList.cxx
Patrick Imbo's avatar
Patrick Imbo committed
540
otbExtractROINew.cxx
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
541
otbExtractROI.cxx
542
otbExtractROI2.cxx
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
543
otbExtractROI_RGB.cxx
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
544
otbMultiChannelExtractROI.cxx
Patrick Imbo's avatar
Patrick Imbo committed
545
otbMultiChannelExtractROINew.cxx
546
otbTestMultiExtractMultiUpdate.cxx
547
548
)
SET(BasicCommon_SRCS3
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
549
otbMultiToMonoChannelExtractROI.cxx
Patrick Imbo's avatar
Patrick Imbo committed
550
otbMultiToMonoChannelExtractROINew.cxx
Patrick Imbo's avatar
Patrick Imbo committed
551
otbPointSetSourceTest.cxx
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
552
553
554
555
otbDrawLineSpatialObjectNew.cxx
otbDrawLineSpatialObject.cxx
otbDrawLineSpatialObjectListNew.cxx
otbDrawLineSpatialObjectList.cxx
Caroline Ruffel's avatar
nomsg    
Caroline Ruffel committed
556
otbImageToLineSpatialObjectListNew.cxx
557
558
otbPathListToHistogramGeneratorNew.cxx
otbPathListToHistogramGenerator.cxx
559
560
)
SET(BasicCommon_SRCS4
561
otbHistogramStatisticsFunction.cxx
562
563
otbListNew.cxx
otbList.cxx
564
565
otbObjectListNew.cxx
otbObjectList.cxx
566
567
otbImageListNew.cxx
otbImageList.cxx
568
569
otbImageListSourceNew.cxx
otbImageToImageListFilterNew.cxx
570
otbImageListToImageFilterNew.cxx
571
572
)
SET(BasicCommon_SRCS5
573
otbImageListToImageListFilterNew.cxx
574
575
otbConcatenateVectorImageFilterNew.cxx
otbConcatenateVectorImageFilter.cxx
576
577
otbImageToVectorImageCastFilterNew.cxx
otbImageToVectorImageCastFilter.cxx
578
otbImageToPathFilterNew.cxx
579
otbSpatialObjectSourceNew.cxx
580
581
otbLineSpatialObjectNew.cxx
otbArcSpatialObjectNew.cxx
582
otbPathListToPathListFilterNew.cxx
583
584
)
SET(BasicCommon_SRCS6
585
otbPolyLineImageIterator.cxx
Julien Michel's avatar
Julien Michel committed
586
587
otbDrawPathFilterNew.cxx
otbDrawPathFilter.cxx
588
589
590
591
otbDrawPathListFilterNew.cxx
otbDrawPathListFilter.cxx
otbDrawPathListFilterWithValue.cxx
otbPolyLineParametricPathWithValueNew.cxx
592
593
otbPolygonNew.cxx
otbPolygon.cxx
Julien Michel's avatar
Julien Michel committed
594
595
otbUnaryFunctorNeighborhoodImageFilterNew.cxx
otbUnaryFunctorNeighborhoodImageFilter.cxx
OTB Bot's avatar
OTB Bot committed
596
)
597

598
SET(BasicCommon_SRCS7
599
otbGenericInterpolateImageFunctionNew.cxx
Julien Michel's avatar
Julien Michel committed
600
otbMirrorBoundaryConditionTest.cxx
601
otbStandardFilterWatcherNew.cxx
Julien Michel's avatar
Julien Michel committed
602
603
604
otbDataNodeTest.cxx
otbVectorDataNew.cxx
otbVectorData.cxx
605
606
otbShiftScaleImageAdaptorNew.cxx
otbShiftScaleImageAdaptor.cxx
607
)
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
608

609
INCLUDE_DIRECTORIES("${OTBTesting_BINARY_DIR}")
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
610

611
# ${TIFF_LIBRARY}
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
612

613
ADD_EXECUTABLE(otbCommonTests1 otbCommonTests1.cxx ${BasicCommon_SRCS1})
614
TARGET_LINK_LIBRARIES(otbCommonTests1 OTBIO)
615
616

ADD_EXECUTABLE(otbCommonTests2 otbCommonTests2.cxx ${BasicCommon_SRCS2})
617
TARGET_LINK_LIBRARIES(otbCommonTests2 OTBIO)
618
619

ADD_EXECUTABLE(otbCommonTests3 otbCommonTests3.cxx ${BasicCommon_SRCS3})
620
TARGET_LINK_LIBRARIES(otbCommonTests3 OTBIO)
621
622

ADD_EXECUTABLE(otbCommonTests4 otbCommonTests4.cxx ${BasicCommon_SRCS4})
623
TARGET_LINK_LIBRARIES(otbCommonTests4 OTBIO)
624
625

ADD_EXECUTABLE(otbCommonTests5 otbCommonTests5.cxx ${BasicCommon_SRCS5})
626
TARGET_LINK_LIBRARIES(otbCommonTests5 OTBIO)
627
628

ADD_EXECUTABLE(otbCommonTests6 otbCommonTests6.cxx ${BasicCommon_SRCS6})
629
TARGET_LINK_LIBRARIES(otbCommonTests6 OTBIO)
630
631

ADD_EXECUTABLE(otbCommonTests7 otbCommonTests7.cxx ${BasicCommon_SRCS7})
632
TARGET_LINK_LIBRARIES(otbCommonTests7 OTBIO)
633

OTB Bot's avatar
OTB Bot committed
634

Thomas Feuvrier's avatar
Thomas Feuvrier committed
635
ENDIF( NOT OTB_DISABLE_CXX_TESTING AND BUILD_TESTING )