CMakeLists.txt 43.5 KB
Newer Older
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
1

Thomas Feuvrier's avatar
Thomas Feuvrier committed
2
IF( NOT OTB_DISABLE_CXX_TESTING AND BUILD_TESTING )
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier 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)
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
7
#Images de teledetection (grosses images )
8
9
10
IF(OTB_DATA_USE_LARGEINPUT)
  SET(IMAGEDATA ${OTB_DATA_LARGEINPUT_ROOT} )
ENDIF(OTB_DATA_USE_LARGEINPUT)
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
11
12
13
14
15
SET(TEMP ${OTBTesting_BINARY_DIR}/Temporary)


#Tolerance sur diff pixel image
SET(TOL 0.0)
Julien Michel's avatar
Julien Michel committed
16
SET(EPSILON 0.0000001)
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
17

18
19
20
21
22
23
SET(BASICFILTERS_TESTS1 ${CXX_TEST_PATH}/otbBasicFiltersTests1)
SET(BASICFILTERS_TESTS2 ${CXX_TEST_PATH}/otbBasicFiltersTests2)
SET(BASICFILTERS_TESTS3 ${CXX_TEST_PATH}/otbBasicFiltersTests3)
SET(BASICFILTERS_TESTS4 ${CXX_TEST_PATH}/otbBasicFiltersTests4)
SET(BASICFILTERS_TESTS5 ${CXX_TEST_PATH}/otbBasicFiltersTests5)
SET(BASICFILTERS_TESTS6 ${CXX_TEST_PATH}/otbBasicFiltersTests6)
24
SET(BASICFILTERS_TESTS7 ${CXX_TEST_PATH}/otbBasicFiltersTests7)
25
SET(BASICFILTERS_TESTS8 ${CXX_TEST_PATH}/otbBasicFiltersTests8)
26
SET(BASICFILTERS_TESTS9 ${CXX_TEST_PATH}/otbBasicFiltersTests9)
27
SET(BASICFILTERS_TESTS10 ${CXX_TEST_PATH}/otbBasicFiltersTests10)
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
28

29
30
31
32
33
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ otbBasicFiltersTests1 ~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 

ADD_TEST(bfTvFiltreLee1CanalPoupees ${BASICFILTERS_TESTS1}  
34
  --compare-image ${EPSILON}  ${BASELINE}/bfFiltreLee_05_05_04.tif
35
                          ${TEMP}/bfFiltreLee_05_05_04.tif
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
36
        otbLeeFilter
37
	${INPUTDATA}/poupees_1canal.c1.hdr
38
	${TEMP}/bfFiltreLee_05_05_04.tif
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
39
40
	05 05 4.0)

41
ADD_TEST(bfTvFiltreLee ${BASICFILTERS_TESTS1}  
42
  --compare-image ${EPSILON}  ${BASELINE}/bfFiltreLee_05_05_12.tif
43
                           ${TEMP}/bfFiltreLee_05_05_12.tif  
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
44
        otbLeeFilter
45
	${INPUTDATA}/poupees.hdr
46
	${TEMP}/bfFiltreLee_05_05_12.tif
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
47
	05 05 12.0)
Patrick Imbo's avatar
Patrick Imbo committed
48
49
50
51

#
# Filtre de FROST:
#
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
52
	
53
ADD_TEST(bfTvFiltreFrost ${BASICFILTERS_TESTS1}  
54
55
  --compare-image ${EPSILON}  ${BASELINE}/bfFiltreFrost_poupees_05_05_01.tif
                          ${TEMP}/bfFiltreFrost_poupees_05_05_01.tif
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
56
        otbFrostFilter
57
	${INPUTDATA}/poupees.hdr
58
	${TEMP}/bfFiltreFrost_poupees_05_05_01.tif
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
59
60
	05 05 0.1)

Patrick Imbo's avatar
Patrick Imbo committed
61
62
# -------            otb::PointSetSource   ------------------------------

63
ADD_TEST(bfTuImageToPointSetFilterTest ${BASICFILTERS_TESTS1} 
Patrick Imbo's avatar
Patrick Imbo committed
64
65
         otbImageToPointSetFilterTest)  

66
67
# -------            otb::OpeningClosingMorphologicalFilter   ------------------------------

68
ADD_TEST(bfTuOpeningClosingFilterNew ${BASICFILTERS_TESTS1}  
69
70
        otbOpeningClosingMorphologicalFilterNew )

71
ADD_TEST(bfTvOpeningClosingFilter ${BASICFILTERS_TESTS1}
72
   --compare-image ${TOL}  ${BASELINE}/bfFiltreOpeningClosing_1.tif
73
                           ${TEMP}/bfFiltreOpeningClosing_1.tif
74
75
        otbOpeningClosingMorphologicalFilter
        ${INPUTDATA}/ROI_IKO_PAN_LesHalles.tif
76
	${TEMP}/bfFiltreOpeningClosing_1.tif
77
78
79
80
	1)

# -------            otb::ClosingOpeningMorphologicalFilter   ------------------------------

81
ADD_TEST(bfTuClosingOpeningFilterNew ${BASICFILTERS_TESTS1}  
82
83
        otbClosingOpeningMorphologicalFilterNew )

84
ADD_TEST(bfTvClosingOpeningFilter ${BASICFILTERS_TESTS1}
85
   --compare-image ${TOL}  ${BASELINE}/bfFiltreClosingOpening_1.tif
86
                           ${TEMP}/bfFiltreClosingOpening_1.tif
87
88
        otbClosingOpeningMorphologicalFilter
        ${INPUTDATA}/ROI_IKO_PAN_LesHalles.tif
89
	${TEMP}/bfFiltreClosingOpening_1.tif
90
91
	1)

92
93
94

# -------            otb::BinaryImageMinimalBoundingRegionCalculator   ----------------------------

95
ADD_TEST(bfTuBoundingRegionCalculatorNew ${BASICFILTERS_TESTS1}  
96
97
         otbBinaryImageMinimalBoundingRegionCalculatorNew)

98
99
100


ADD_TEST(bfTvBoundingRegionCalculator ${BASICFILTERS_TESTS1}
101
102
103
104
   --compare-ascii ${TOL}
 		   ${BASELINE_FILES}/bfBoundingRegionCalculatorOutput.txt
 		   ${TEMP}/bfBoundingRegionCalculatorOutput.txt
        otbBinaryImageMinimalBoundingRegionCalculator
105
	4
106
107
108
109
110
111
112
	${TEMP}/bfBoundingRegionCalculatorOutput.txt
	${INPUTDATA}/rcc8_mire1.png
	${INPUTDATA}/rcc8_mire2.png
	${INPUTDATA}/rcc8_mire3.png
	${INPUTDATA}/rcc8_mire4.png
	)

113
114
115
116
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ otbBasicFiltersTests2 ~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 

117
118
# -------            otb::LogPolarTransform   ----------------------------

119
ADD_TEST(bfTuLogPolarTransformNew ${BASICFILTERS_TESTS2}  
120
121
         otbLogPolarTransformNew)

122
ADD_TEST(bfTvLogPolarTransform ${BASICFILTERS_TESTS2}
123
124
125
   --compare-ascii ${TOL}
 		   ${BASELINE_FILES}/bfLogPolarTransformResults.txt
 		   ${TEMP}/bfLogPolarTransformResults.txt
126
        otbLogPolarTransform
127
128
129
	1 1 
	${TEMP}/bfLogPolarTransformResults.txt
	5 0 0 0 10 45 0 3.14 3.14 18 1
130
131
	)

132
ADD_TEST(bfTvLogPolarTransformResample ${BASICFILTERS_TESTS2}  
Julien Michel's avatar
Julien Michel committed
133
  --compare-image ${EPSILON}  ${BASELINE}/bfLogPolarTransformResampleOutput.hdr
134
                          ${TEMP}/bfLogPolarTransformResampleOutput.hdr
135
        otbLogPolarTransformResample
136
        ${INPUTDATA}/circle.hdr
137
	${TEMP}/bfLogPolarTransformResampleOutput.hdr
138
139
140
141
142
)


# -------            otb::InverseLogPolarTransform   ----------------------------

143
ADD_TEST(bfTuInverseLogPolarTransformNew ${BASICFILTERS_TESTS2}  
144
145
         otbInverseLogPolarTransformNew)

146
ADD_TEST(bfTvInverseLogPolarTransform ${BASICFILTERS_TESTS2}
147
148
149
     --compare-ascii ${TOL}
		     ${BASELINE_FILES}/bfInverseLogPolarTransformResults.txt
		     ${TEMP}/bfInverseLogPolarTransformResults.txt
150
        otbInverseLogPolarTransform
Cyrille Valladeau's avatar
Cyrille Valladeau committed
151
	1. 1. 
152
153
	${TEMP}/bfInverseLogPolarTransformResults.txt	
	6 0 0 10 20 45 60 3.14 3.14 1 0 0 1
154
155
	)

156
ADD_TEST(bfTvInverseLogPolarTransformResample ${BASICFILTERS_TESTS2}  
157
158
159
160
161
162
163
--compare-image ${TOL}  ${BASELINE}/bfInverseLogPolarTransformResampleOutput.hdr
                          ${TEMP}/bfInverseLogPolarTransformResampleOutput.hdr
        otbInverseLogPolarTransformResample
	${BASELINE}/bfLogPolarTransformResampleOutput.hdr
	${TEMP}/bfInverseLogPolarTransformResampleOutput.hdr
)

164
165
# -------            otb::StreamingShrinkImageFilter   ----------------------------

166
  ADD_TEST(bfTuStreamingShrinkImageFilterNew ${BASICFILTERS_TESTS2}  
167
168
         otbStreamingShrinkImageFilterNew)

169
IF(OTB_DATA_USE_LARGEINPUT)
170

171
 ADD_TEST(bfTvStreamingShrinkImageFilterQBPAN ${BASICFILTERS_TESTS2}  
172
173
174
175
176
177
178
179
180
--compare-image ${TOL}
		${BASELINE}/bfTvStreamingShrinkImageFilterQBPANOutput.hdr
		${TEMP}/bfTvStreamingShrinkImageFilterQBPANOutput.hdr
	otbStreamingShrinkImageFilter
	${IMAGEDATA}/TOULOUSE/QuickBird/000000128955_01_P001_PAN/02APR01105228-P1BS-000000128955_01_P001.TIF
	${TEMP}/bfTvStreamingShrinkImageFilterQBPANOutput.hdr
	50
)
	
181
ADD_TEST(bfTvStreamingShrinkImageFilterQBMUL ${BASICFILTERS_TESTS2}  
182
183
184
185
186
187
188
189
--compare-image ${TOL}
		${BASELINE}/bfTvStreamingShrinkImageFilterQBMULOutput.hdr
		${TEMP}/bfTvStreamingShrinkImageFilterQBMULOutput.hdr
		otbStreamingShrinkImageFilter
	${IMAGEDATA}/TOULOUSE/QuickBird/000000128955_01_P001_MUL/02APR01105228-M1BS-000000128955_01_P001.TIF
	${TEMP}/bfTvStreamingShrinkImageFilterQBMULOutput.hdr
	20
)
190
ENDIF(OTB_DATA_USE_LARGEINPUT)
191

192
193
# -------            otb::SpatialObjectToImageDrawingFilter   ----------------------------

194
  ADD_TEST(bfTuSpatialObjectToImageDrawingFilterNew ${BASICFILTERS_TESTS2}  
195
196
197
         otbSpatialObjectToImageDrawingFilterNew)


198
 ADD_TEST(bfTvSpatialObjectToImageDrawingFilterWithoutInputImage ${BASICFILTERS_TESTS2}  
199
200
201
202
203
204
205
206
207
 --compare-image ${TOL}
		${BASELINE}/bfTvSpatialObjectDrawingNoInput.png
		${TEMP}/bfTvSpatialObjectDrawingNoInput.png
	otbSpatialObjectToImageDrawingFilter
	${TEMP}/bfTvSpatialObjectDrawingNoInput.png
	100
	50
)

208
209
210
211
212
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ otbBasicFiltersTests3 ~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 


213
214
# -------            otb::ImportGeoInformationImageFilter   ----------------------------

215
  ADD_TEST(bfTuImportGeoInformationImageFilterNew ${BASICFILTERS_TESTS3}  
216
217
218
         otbImportGeoInformationImageFilterNew)


219
 ADD_TEST(bfTvImportGeoInformationImageFilter ${BASICFILTERS_TESTS3}  
220
221
222
223
224
225
226
227
 --compare-metadata ${TOL}
		    ${INPUTDATA}/HFAGeoreferenced.img
		    ${TEMP}/bfTvImportGeoInformationOutput.img
	otbImportGeoInformationImageFilter
		    ${INPUTDATA}/HFAGeoreferenced.img
	            ${TEMP}/bfTvImportGeoInformationOutput.img
)

228

229
IF(OTB_DATA_USE_LARGEINPUT)
230
 ADD_TEST(bfTvImportGeoInformationImageFilterWithKeywordList ${BASICFILTERS_TESTS3}  
Julien Michel's avatar
Julien Michel committed
231
--compare-ascii ${EPSILON}
232
233
234
235
236
237
		${BASELINE_FILES}/ioOSSIMImageQuickbirdMetaDataReader.txt
                ${TEMP}/bfTvImportGeoInformationKeywordListOutput.txt
         otbImportGeoInformationImageFilterWithKeywordList
         ${IMAGEDATA}/TOULOUSE/QuickBird/000000128955_01_P001_PAN/02APR01105228-P1BS-000000128955_01_P001.TIF
	 ${TEMP}/bfTvImportGeoInformationKeywordListOutput.txt
)
238
ENDIF(OTB_DATA_USE_LARGEINPUT)
239

240
241
# -------            otb::SpectralAngleDistanceImageFilter   ----------------------------

242
  ADD_TEST(bfTuSpectralAngleDistanceImageFilterNew ${BASICFILTERS_TESTS3}  
243
244
245
         otbSpectralAngleDistanceImageFilterNew)


246
 ADD_TEST(bfTvSpectralAngleDistanceImageFilter ${BASICFILTERS_TESTS3} 
247
		--compare-image ${EPSILON}
248
249
250
		    ${BASELINE}/bfTvSpectralAngleDistanceOutput.hdr
		    ${TEMP}/bfTvSpectralAngleDistanceOutput.hdr
		    otbSpectralAngleDistanceImageFilter
251
		    ${INPUTDATA}/qb_RoadExtract.img.hdr
252
	            ${TEMP}/bfTvSpectralAngleDistanceOutput.hdr
253
		    337 557 432 859
254
255
)

256
257
258

# -------            otb::VectorRescaleIntensityImageFilter   ----------------------------

259
ADD_TEST(bfTuVectorRescaleIntensityImageFilterNew ${BASICFILTERS_TESTS3}  
260
261
262
         otbVectorRescaleIntensityImageFilterNew)


263
ADD_TEST(bfTVectorRescaleIntensityImageFilter ${BASICFILTERS_TESTS3} 
264
265
266
267
268
269
270
271
272
		--compare-image ${EPSILON}
		    ${BASELINE}/bfTvVectorRescaleIntensityOutput.png
		    ${TEMP}/bfTvVectorRescaleIntensityOutput.png
		    otbVectorRescaleIntensityImageFilter
		    ${INPUTDATA}/qb_RoadExtract.img.hdr
	            ${TEMP}/bfTvVectorRescaleIntensityOutput.png
		    0 255
)

273
274
# -------            otb::VectorImageToImageListFilter   ----------------------------

275
ADD_TEST(bfTuVectorImageToImageListFilterNew ${BASICFILTERS_TESTS3}  
276
277
278
         otbVectorImageToImageListFilterNew)


279
ADD_TEST(bfTvVectorImageToImageListFilter ${BASICFILTERS_TESTS3} 
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
		--compare-n-images ${EPSILON} 3
		    ${BASELINE}/bfTvVectorImageToImageListFilterBand1.png
		    ${TEMP}/bfTvVectorImageToImageListFilterBand1.png
		    ${BASELINE}/bfTvVectorImageToImageListFilterBand2.png
		    ${TEMP}/bfTvVectorImageToImageListFilterBand2.png
		    ${BASELINE}/bfTvVectorImageToImageListFilterBand3.png
		    ${TEMP}/bfTvVectorImageToImageListFilterBand3.png
		    otbVectorImageToImageListFilter
		    ${INPUTDATA}/poupees.png
	            ${TEMP}/bfTvVectorImageToImageListFilterBand1.png
		    ${TEMP}/bfTvVectorImageToImageListFilterBand2.png
		    ${TEMP}/bfTvVectorImageToImageListFilterBand3.png
)


# -------            otb::ImageListToVectorImageFilter   ----------------------------

297
ADD_TEST(bfTuImageListToVectorImageFilterNew ${BASICFILTERS_TESTS3}  
298
299
300
         otbImageListToVectorImageFilterNew)


301
ADD_TEST(bfTvImageListToVectorImageFilter ${BASICFILTERS_TESTS3} 
302
303
304
305
306
307
308
309
310
		--compare-image ${EPSILON} 
		    ${BASELINE}/bfTvImageListToVectorImageFilter.png
		    ${TEMP}/bfTvImageListToVectorImageFilter.png
		    otbImageListToVectorImageFilter
	            ${INPUTDATA}/poupees.c1
		    ${INPUTDATA}/poupees.c2
		    ${INPUTDATA}/poupees.c3
		    ${TEMP}/bfTvImageListToVectorImageFilter.png
)
311
312


313
314
315
316
317
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ otbBasicFiltersTests4 ~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


318
319
# -------            otb::ImageListToImageListApplyFilter   ----------------------------

320
ADD_TEST(bfTuImageListToImageListApplyFilterNew ${BASICFILTERS_TESTS4}  
321
322
323
         otbImageListToImageListApplyFilterNew)


324
ADD_TEST(bfTvImageListToImageListApplyFilter ${BASICFILTERS_TESTS4} 
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
		--compare-n-images ${EPSILON} 3
		    ${BASELINE}/bfTvImageListToImageListApplyFilterBand1.png
		    ${TEMP}/bfTvImageListToImageListApplyFilterBand1.png
		    ${BASELINE}/bfTvImageListToImageListApplyFilterBand2.png
		    ${TEMP}/bfTvImageListToImageListApplyFilterBand2.png
		    ${BASELINE}/bfTvImageListToImageListApplyFilterBand3.png
		    ${TEMP}/bfTvImageListToImageListApplyFilterBand3.png
		    otbImageListToImageListApplyFilter
	            ${INPUTDATA}/poupees.c1
		    ${INPUTDATA}/poupees.c2
		    ${INPUTDATA}/poupees.c3
		    ${TEMP}/bfTvImageListToImageListApplyFilterBand1.png
		    ${TEMP}/bfTvImageListToImageListApplyFilterBand2.png
		    ${TEMP}/bfTvImageListToImageListApplyFilterBand3.png
)
340

341
342
# -------            otb::PerBandVectorImageFilter   ----------------------------

343
ADD_TEST(bfTuPerBandVectorImageFilterNew ${BASICFILTERS_TESTS4}  
344
345
         otbPerBandVectorImageFilterNew)

346
ADD_TEST(bfTvPerBandVectorImageFilterWithMeanFilter ${BASICFILTERS_TESTS4}
347
348
349
350
351
352
353
354
	--compare-image ${EPSILON}
			${BASELINE}/bfTvPerBandVectorImageFilterWithMeanFilterOutput.hdr
			${TEMP}/bfTvPerBandVectorImageFilterWithMeanFilterOutput.hdr			
	otbPerBandVectorImageFilterWithMeanFilter
			${INPUTDATA}/poupees.png
			${TEMP}/bfTvPerBandVectorImageFilterWithMeanFilterOutput.hdr
)

355
ADD_TEST(bfTvPerBandVectorImageFilterWithSobelFilter ${BASICFILTERS_TESTS4}
356
357
358
359
360
361
362
	--compare-image ${EPSILON}
			${BASELINE}/bfTvPerBandVectorImageFilterWithSobelFilterOutput.hdr
			${TEMP}/bfTvPerBandVectorImageFilterWithSobelFilterOutput.hdr			
	otbPerBandVectorImageFilterWithSobelFilter
			${INPUTDATA}/poupees.png
			${TEMP}/bfTvPerBandVectorImageFilterWithSobelFilterOutput.hdr
)
363
364


365
# -------            otb::StreamingStatisticsImageFilter   ----------------------------
366

367
ADD_TEST(bfTuStreamingStatisticsImageFilterNew ${BASICFILTERS_TESTS4}  
368
369
         otbStreamingStatisticsImageFilterNew)

370
ADD_TEST(bfTvStreamingStatisticsImageFilter ${BASICFILTERS_TESTS4}  
371
372
373
374
	--compare-ascii ${TOL}
 		   ${BASELINE_FILES}/bfStreamingStatisticsImageFilterResults.txt
 		   ${TEMP}/bfStreamingStatisticsImageFilterResults.txt
         otbStreamingStatisticsImageFilter
375
376
#		${IMAGEDATA}/TOULOUSE/QuickBird/000000128955_01_P001_PAN/02APR01105228-P1BS-000000128955_01_P001.TIF
                ${INPUTDATA}/small_poupees_1canal.hd
377
378
		${TEMP}/bfStreamingStatisticsImageFilterResults.txt)

379
380
# -------            otb::VectorImageTo3DScalarImageFilter   ----------------------------

381
ADD_TEST(bfTuVectorImageTo3DScalarImageFilterNew ${BASICFILTERS_TESTS4}  
382
383
         otbVectorImageTo3DScalarImageFilterNew)

384
ADD_TEST(bfTvVectorImageTo3DScalarImageFilter ${BASICFILTERS_TESTS4}  
385
386
387
388
389
390
391
	--compare-image ${TOL}
 		   ${BASELINE}/bfTvVectorImageTo3DScalarImageFilterOutput.png
 		   ${TEMP}/bfTvVectorImageTo3DScalarImageFilterOutput.png
         otbVectorImageTo3DScalarImageFilter
		${INPUTDATA}/poupees.png
		${TEMP}/bfTvVectorImageTo3DScalarImageFilterOutput.png
)
392

393
394
395
396
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ otbBasicFiltersTests5 ~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

397
398
# -------            otb::StreamingResampleImageFilter   ----------------------------

399
ADD_TEST(bfTuStreamingResampleImageFilterNew ${BASICFILTERS_TESTS5}  
400
401
         otbStreamingResampleImageFilterNew)
				 
402
ADD_TEST(bfTvStreamingResampleImageFilter ${BASICFILTERS_TESTS5}  
403
404
405
406
407
				otbStreamingResampleImageFilter
				${INPUTDATA}/poupees.tif
				${TEMP}/bfTvStreamingResamplePoupeesTest.tif
)

Thomas Feuvrier's avatar
Thomas Feuvrier committed
408
ADD_TEST(bfTvStreamingResampleImageFilterCompareWithITK ${BASICFILTERS_TESTS5}  
409
410
411
412
413
		--compare-image ${TOL}
					${TEMP}/bfTvStreamingResamplePoupeesTestITK.tif
					${TEMP}/bfTvStreamingResamplePoupeesTestOTB.tif		
				otbStreamingResampleImageFilterCompareWithITK
					${INPUTDATA}/poupees.tif
414
					3000 3000
415
416
417
418
					${TEMP}/bfTvStreamingResamplePoupeesTestITK.tif
					${TEMP}/bfTvStreamingResamplePoupeesTestOTB.tif
)

419
#ADD_TEST(StreamingResampleImageFilterCompareWithITK ${BASICFILTERS_TESTS5}  
420
421
422
423
424
425
426
427
428
429
430
#		--compare-image ${TOL}
#					${TEMP}/bfTvStreamingResampleSPOT5TestITK.tif
#					${TEMP}/bfTvStreamingResampleSPOT5TestOTB.tif		
#				otbStreamingResampleImageFilterCompareWithITK
#					${INPUTDATA}/spot5SubWithGcps.tif
#					1100 1100
#					${TEMP}/bfTvStreamingResampleSPOT5TestITK.tif
#					${TEMP}/bfTvStreamingResampleSPOT5TestOTB.tif
#)


431
432
433

# -------            otb::StreamingStatisticsVectorImageFilter   ----------------------------

434
ADD_TEST(bfTuStreamingStatisticsVectorImageFilterNew ${BASICFILTERS_TESTS5}  
435
436
         otbStreamingStatisticsVectorImageFilterNew)

437
ADD_TEST(bfTvStreamingStatisticsVectorImageFilter ${BASICFILTERS_TESTS5}  
438
	--compare-ascii ${TOL}
439
 		   ${BASELINE_FILES}/bfTvStreamingStatisticsVectorImageFilterResults.txt
440
441
442
443
444
445
446
447
448
449
 		   ${TEMP}/bfTvStreamingStatisticsVectorImageFilterResults.txt
         otbStreamingStatisticsVectorImageFilter
		#${IMAGEDATA}/SPOT5_SCENE01/IMAGERY.TIF
		${INPUTDATA}/sbuv.png
		${TEMP}/bfTvStreamingStatisticsVectorImageFilterResults.txt
		)
		

# -------            otb::MatrixTransposeMatrixImageFilter   ----------------------------

450
ADD_TEST(bfTuMatrixTransposeMatrixImageFilterNew ${BASICFILTERS_TESTS5}  
451
452
         otbMatrixTransposeMatrixImageFilterNew)

453
ADD_TEST(bfTvMatrixTransposeMatrixImageFilter ${BASICFILTERS_TESTS5}  
454
455
	--compare-ascii ${TOL}
 		   ${BASELINE_FILES}/bfTvMatrixTransposeMatrixImageFilterResults.txt
456
 		   ${TEMP}/bfTvMatrixTransposeMatrixImageFilterResults.txt
457
458
459
460
461
462
463
         otbMatrixTransposeMatrixImageFilter
		${INPUTDATA}/multiSpect.tif
		${INPUTDATA}/multiSpectInterp.tif
		${TEMP}/bfTvMatrixTransposeMatrixImageFilterResults.txt
		)


464
465
# -------            otb::UnaryImageFunctorWithVectorImageFilter   ----------------------------

466
ADD_TEST(bfTuUnaryImageFunctorWithVectorImageFilterNew ${BASICFILTERS_TESTS5}  
467
468
         otbUnaryImageFunctorWithVectorImageFilterNew)

469
ADD_TEST(bfTvUnaryImageFunctorWithVectorImageFilter ${BASICFILTERS_TESTS5}  
470
471
472
473
474
475
476
477
     --compare-image ${TOL}
     		     ${BASELINE}/bfTvUnaryImageFunctorWithVectorImageFilter.tif
		     ${TEMP}/bfTvUnaryImageFunctorWithVectorImageFilter.tif
         otbUnaryImageFunctorWithVectorImageFilter
		${INPUTDATA}/poupees_sub.png
		${TEMP}/bfTvUnaryImageFunctorWithVectorImageFilter.tif
		)

478
# -------            otb::PrintableImageFilter   ------------------------------
479

480
ADD_TEST(bfTuPrintableImageFilterNew ${BASICFILTERS_TESTS5}  
481
482
         otbPrintableImageFilterNew)
         
483
ADD_TEST(bfTvPrintableImageFilter ${BASICFILTERS_TESTS5}  
484
485
486
487
488
489
490
     --compare-image ${TOL}
     		     ${BASELINE}/bfTvPrintableImageFilter.png
		     ${TEMP}/bfTvPrintableImageFilter.png
         otbPrintableImageFilter
		${INPUTDATA}/QB_Toulouse_Ortho_XS.tif
		${TEMP}/bfTvPrintableImageFilter.png
		)
491

492
493
494
495
496
497


# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ otbBasicFiltersTests6 ~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Julien Michel's avatar
Julien Michel committed
498
499
500
501
502
503
# -------            otb::BSplineDecompositionImageFilter  ------------------------------

ADD_TEST(bfTuBSplineDecompositionImageFilterNew ${BASICFILTERS_TESTS6}  
         otbBSplineDecompositionImageFilterNew)
         
ADD_TEST(bfTvBSplineDecompositionImageFilter ${BASICFILTERS_TESTS6}  
Julien Michel's avatar
Julien Michel committed
504
     --compare-image ${EPSILON}
Julien Michel's avatar
Julien Michel committed
505
506
507
508
509
510
511
512
513
514
515
516
517
     		     ${BASELINE}/bfBSplineDecompositionImageFilterOutput.tif
		     ${TEMP}/bfBSplineDecompositionImageFilterOutput.tif
         otbBSplineDecompositionImageFilter
		${INPUTDATA}/poupees.tif
		${TEMP}/bfBSplineDecompositionImageFilterOutput.tif
		)

# -------            otb::BSplineInterpolateImageFunction  ------------------------------

ADD_TEST(bfTuBSplineInterpolateImageFunctionNew ${BASICFILTERS_TESTS6}  
         otbBSplineInterpolateImageFunctionNew)
 
ADD_TEST(bfTvBSplineInterpolateImageFunction ${BASICFILTERS_TESTS6}  
Julien Michel's avatar
Julien Michel committed
518
     --compare-ascii ${EPSILON}
Julien Michel's avatar
Julien Michel committed
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
     		     ${BASELINE_FILES}/bfBSplineInterpolateImageFunctionOutput.txt
		     ${TEMP}/bfBSplineInterpolateImageFunctionOutput.txt
        otbBSplineInterpolateImageFunction
		${INPUTDATA}/poupees.tif
		${TEMP}/bfBSplineInterpolateImageFunctionOutput.txt
		0.5 0.5
		127.33 44.9
		259.67 21.43
		12.13 61.79
		89.5 11
		128 128
		127.255 128.73
		-1 -1
		)
        
534
535
536
537
538
539
540
541
542
543
544
545
# -------            otb::ProlateInterpolateImageFunction  ------------------------------

ADD_TEST(bfTuProlateInterpolateImageFunctionNew ${BASICFILTERS_TESTS6}  
         otbProlateInterpolateImageFunctionNew)

ADD_TEST(bfTvProlateInterpolateImageFunction ${BASICFILTERS_TESTS6}  
     --compare-ascii ${TOL}
     		     ${BASELINE_FILES}/bfProlateInterpolateImageFunctionOutput.txt
		     ${TEMP}/bfProlateInterpolateImageFunctionOutput.txt
        otbProlateInterpolateImageFunction
		${INPUTDATA}/poupees.tif
		${TEMP}/bfProlateInterpolateImageFunctionOutput.txt
546
547
548
		${TEMP}/bfProlateInterpolateImageFunctionCosOutput.tif
		${TEMP}/bfProlateInterpolateImageFunctionITKCosOutput.tif
		${TEMP}/bfProlateInterpolateImageFunctionProOutput.tif
549
550
551
552
553
554
555
556
557
558
559
		3 # radius
		0.5 0.5
		127.33 44.9
		259.67 21.43
		12.13 61.79
		89.5 11
		128 128
		127.255 128.73
		-1 -1
		)

560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
# -------            otb::WindowedSincInterpolateImageFunctionBase  ------------------------------
ADD_TEST(bfTuWindowedSincInterpolateImageFunctionBaseNew ${BASICFILTERS_TESTS6}  
         otbWindowedSincInterpolateImageFunctionBaseNew)

# -------            otb::WindowedSincInterpolateImageGaussianFunction  ------------------------------
 ADD_TEST(bfTuWindowedSincInterpolateImageGaussianFunctionNew ${BASICFILTERS_TESTS6}  
         otbWindowedSincInterpolateImageGaussianFunctionNew)

ADD_TEST(bfTvWindowedSincInterpolateImageGaussianFunction ${BASICFILTERS_TESTS6}  
     --compare-ascii ${TOL}
     		     ${BASELINE_FILES}/bfWindowedSincInterpolateImageGaussianFunctionOutput.txt
		     ${TEMP}/bfWindowedSincInterpolateImageGaussianFunctionOutput.txt
        otbWindowedSincInterpolateImageGaussianFunction
		${INPUTDATA}/poupees.tif
		${TEMP}/bfWindowedSincInterpolateImageGaussianFunctionOutput.txt
		3 # radius
		0.5 0.5
		127.33 44.9
		259.67 21.43
		12.13 61.79
		89.5 11
		128 128
		127.255 128.73
		-1 -1
		)

586

587
588
589
# -------            otb::WindowedSincInterpolateImageHammingFunction  ------------------------------
 ADD_TEST(bfTuWindowedSincInterpolateImageHammingFunctionNew ${BASICFILTERS_TESTS6}  
         otbWindowedSincInterpolateImageHammingFunctionNew)
590

591
ADD_TEST(bfTvWindowedSincInterpolateImageHammingFunction ${BASICFILTERS_TESTS6}  
592
     --compare-ascii ${TOL}
593
594
595
     		     ${BASELINE_FILES}/bfWindowedSincInterpolateImageHammingFunctionOutput.txt
		     ${TEMP}/bfWindowedSincInterpolateImageHammingFunctionOutput.txt
        otbWindowedSincInterpolateImageHammingFunction
596
		${INPUTDATA}/poupees.tif
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
		${TEMP}/bfWindowedSincInterpolateImageHammingFunctionOutput.txt
		3 # radius
		0.5 0.5
		127.33 44.9
		259.67 21.43
		12.13 61.79
		89.5 11
		128 128
		127.255 128.73
		-1 -1
		)

# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ otbBasicFiltersTests7 ~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

# -------            otb::WindowedSincInterpolateImageCosineFunction  ------------------------------
 ADD_TEST(bfTuWindowedSincInterpolateImageCosineFunctionNew ${BASICFILTERS_TESTS7}  
         otbWindowedSincInterpolateImageCosineFunctionNew)

ADD_TEST(bfTvWindowedSincInterpolateImageCosineFunction ${BASICFILTERS_TESTS7}  
     --compare-ascii ${TOL}
     		     ${BASELINE_FILES}/bfWindowedSincInterpolateImageCosineFunctionOutput.txt
		     ${TEMP}/bfWindowedSincInterpolateImageCosineFunctionOutput.txt
        otbWindowedSincInterpolateImageCosineFunction
		${INPUTDATA}/poupees.tif
		${TEMP}/bfWindowedSincInterpolateImageCosineFunctionOutput.txt
		3 # radius
		0.5 0.5
		127.33 44.9
		259.67 21.43
		12.13 61.79
		89.5 11
		128 128
		127.255 128.73
		-1 -1
		)

# -------            otb::WindowedSincInterpolateImageWelchFunction  ------------------------------
 ADD_TEST(bfTuWindowedSincInterpolateImageWelchFunctionNew ${BASICFILTERS_TESTS7}  
         otbWindowedSincInterpolateImageWelchFunctionNew)

ADD_TEST(bfTvWindowedSincInterpolateImageWelchFunction ${BASICFILTERS_TESTS7}  
     --compare-ascii ${TOL}
     		     ${BASELINE_FILES}/bfWindowedSincInterpolateImageWelchFunctionOutput.txt
		     ${TEMP}/bfWindowedSincInterpolateImageWelchFunctionOutput.txt
        otbWindowedSincInterpolateImageWelchFunction
		${INPUTDATA}/poupees.tif
		${TEMP}/bfWindowedSincInterpolateImageWelchFunctionOutput.txt
		3 # radius
		0.5 0.5
		127.33 44.9
		259.67 21.43
		12.13 61.79
		89.5 11
		128 128
		127.255 128.73
		-1 -1
		)
# -------            otb::WindowedSincInterpolateImageLanczosFunction  ------------------------------
 ADD_TEST(bfTuWindowedSincInterpolateImageLanczosFunctionNew ${BASICFILTERS_TESTS7}  
         otbWindowedSincInterpolateImageLanczosFunctionNew)

ADD_TEST(bfTvWindowedSincInterpolateImageLanczosFunction ${BASICFILTERS_TESTS7}  
     --compare-ascii ${TOL}
     		     ${BASELINE_FILES}/bfWindowedSincInterpolateImageLanczosFunctionOutput.txt
		     ${TEMP}/bfWindowedSincInterpolateImageLanczosFunctionOutput.txt
        otbWindowedSincInterpolateImageLanczosFunction
		${INPUTDATA}/poupees.tif
		${TEMP}/bfWindowedSincInterpolateImageLanczosFunctionOutput.txt
		3 # radius
		0.5 0.5
		127.33 44.9
		259.67 21.43
		12.13 61.79
		89.5 11
		128 128
		127.255 128.73
		-1 -1
		)
# -------            otb::WindowedSincInterpolateImageBlackmanFunction  ------------------------------
 ADD_TEST(bfTuWindowedSincInterpolateImageBlackmanFunctionNew ${BASICFILTERS_TESTS7}  
         otbWindowedSincInterpolateImageBlackmanFunctionNew)

ADD_TEST(bfTvWindowedSincInterpolateImageBlackmanFunction ${BASICFILTERS_TESTS7}  
     --compare-ascii ${TOL}
     		     ${BASELINE_FILES}/bfWindowedSincInterpolateImageBlackmanFunctionOutput.txt
		     ${TEMP}/bfWindowedSincInterpolateImageBlackmanFunctionOutput.txt
        otbWindowedSincInterpolateImageBlackmanFunction
		${INPUTDATA}/poupees.tif
		${TEMP}/bfWindowedSincInterpolateImageBlackmanFunctionOutput.txt
688
689
690
691
692
693
694
695
696
697
		3 # radius
		0.5 0.5
		127.33 44.9
		259.67 21.43
		12.13 61.79
		89.5 11
		128 128
		127.255 128.73
		-1 -1
		)
Julien Michel's avatar
Julien Michel committed
698

Thomas Feuvrier's avatar
Thomas Feuvrier committed
699
ADD_TEST(bfTvProlateValidationTest ${BASICFILTERS_TESTS7}  
700
701
702
  --compare-image ${EPSILON}
     		  ${BASELINE}/bfTvProlateValidationTest.tif
		  ${TEMP}/bfTvProlateValidationTest.tif
703
704
        otbProlateValidationTest
		${INPUTDATA}/poupees.tif
705
		${TEMP}/bfTvProlateValidationTest.tif
706
		3 # radius
Thomas Feuvrier's avatar
Thomas Feuvrier committed
707
		0.5 # factor
708
		512 # size	
709
		${TEMP}/defaultprolatevalidationtest.tif # nearest neighborhood interpolator : NOT GENERATE IN THE TEST
710
711
712
		)


713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
# -------            otb::VectorImageToAmplitudeImageFilter  ------------------------------

ADD_TEST(bfTuVectorImageToAmplitudeImageFilterNew ${BASICFILTERS_TESTS7}
otbVectorImageToAmplitudeImageFilterNew)

ADD_TEST(bfTvVectorImageToAmplitudeImageFilter ${BASICFILTERS_TESTS7}
 --compare-image ${EPSILON}
     		  ${BASELINE}/bfTvVectorImageToAmplitudeImageFilterOutput.tif
		  ${TEMP}/bfTvVectorImageToAmplitudeImageFilterOutput.tif
otbVectorImageToAmplitudeImageFilter
${INPUTDATA}/poupees.tif
${TEMP}/bfTvVectorImageToAmplitudeImageFilterOutput.tif
)


728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
# -------            otb::VectorImageToAmplitudeImageFilter  ------------------------------

ADD_TEST(bfTuVectorImageToAmplitudeImageFilterNew ${BASICFILTERS_TESTS7}
otbVectorImageToAmplitudeImageFilterNew)

ADD_TEST(bfTvVectorImageToAmplitudeImageFilter ${BASICFILTERS_TESTS7}
 --compare-image ${EPSILON}
     		  ${BASELINE}/bfTvVectorImageToAmplitudeImageFilterOutput.tif
		  ${TEMP}/bfTvVectorImageToAmplitudeImageFilterOutput.tif
otbVectorImageToAmplitudeImageFilter
${INPUTDATA}/poupees.tif
${TEMP}/bfTvVectorImageToAmplitudeImageFilterOutput.tif
)


# -------    otb::RationalQuotientResampleImageFilter  --------------------------

ADD_TEST(bfTuRationalQuotientResampleImageFilterNew ${BASICFILTERS_TESTS7}
         otbRationalQuotientResampleImageFilterNew)

ADD_TEST(bfTvRationalQuotientResampleImageFilter ${BASICFILTERS_TESTS7}
	--compare-image ${EPSILON}
			${BASELINE}/bfTvRationalQuotientResampleImageFilterOutput.tif
			${TEMP}/bfTvRationalQuotientResampleImageFilterOutput.tif
        otbRationalQuotientResampleImageFilter
		${INPUTDATA}/ROI_IKO_PAN_LesHalles.tif
		${TEMP}/bfTvRationalQuotientResampleImageFilterOutput.tif
		2 3
)
757

758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
# -------            otb::VectorImageToIntensityImageFilter   ----------------------------

  ADD_TEST(bfTuVectorImageToIntensityImageFilterNew ${BASICFILTERS_TESTS7}  
         otbVectorImageToIntensityImageFilterNew)


 ADD_TEST(bfTvVectorImageToIntensityImageFilter ${BASICFILTERS_TESTS7} 
		--compare-image ${EPSILON}
		    ${BASELINE}/bfTvVectorImageToIntensityImageOutput.tif
		    ${TEMP}/bfTvVectorImageToIntensityImageOutput.tif
		    otbVectorImageToIntensityImageFilter
		    ${INPUTDATA}/QB_Toulouse_Ortho_XS.tif
	            ${TEMP}/bfTvVectorImageToIntensityImageOutput.tif
)

773
# -------            otb::LabelizeConnectedThresholdImageFilter   ----------------------------
774

775
776
  ADD_TEST(bfTuLabelizeConnectedThresholdImageFilterNew ${BASICFILTERS_TESTS8}
         otbLabelizeConnectedThresholdImageFilterNew)
777

778
  ADD_TEST(bfTvLabelizeConnectedThresholdImageFilter ${BASICFILTERS_TESTS8} 
779
		--compare-image ${EPSILON}
780
781
782
		    ${BASELINE}/bfTvLabelizeConnectedThresholdImageFilterOutput.png
		    ${TEMP}/bfTvLabelizeConnectedThresholdImageFilterOutput.png
		    otbLabelizeConnectedThresholdImageFilter
783
		    ${INPUTDATA}/QB_Suburb.png
784
	            ${TEMP}/bfTvLabelizeConnectedThresholdImageFilterOutput.png
785
		    170 170
786
787
788
		    80 80
)

Julien Michel's avatar
Julien Michel committed
789
790
791
792
793
794
795
796
797
# -------            otb::EuclideanDistanceWithMissingValue   ----------------------------

  ADD_TEST(bfTuEuclideanDistanceWithMissingValueNew ${BASICFILTERS_TESTS8}
         otbEuclideanDistanceWithMissingValueNew)

ADD_TEST(bfTvEuclideanDistanceWithMissingValue ${BASICFILTERS_TESTS8}
         otbEuclideanDistanceWithMissingValue)


798
799
800
801
802
803
804
805
806
807
808
809
# -------            otb::LabelizeNeighborhoodConnectedImageFilter   ----------------------------

  ADD_TEST(bfTuLabelizeNeighborhoodConnectedImageFilterNew ${BASICFILTERS_TESTS8}
         otbLabelizeNeighborhoodConnectedImageFilterNew)

  ADD_TEST(bfTvLabelizeNeighborhoodConnectedImageFilter ${BASICFILTERS_TESTS8}
		--compare-image ${EPSILON}
		    ${BASELINE}/bfTvLabelizeNeighborhoodConnectedImageFilterOutput.png
		    ${TEMP}/bfTvLabelizeNeighborhoodConnectedImageFilterOutput.png
		    otbLabelizeNeighborhoodConnectedImageFilter
		    ${INPUTDATA}/QB_Suburb.png
	            ${TEMP}/bfTvLabelizeNeighborhoodConnectedImageFilterOutput.png
810
		    170 170
811
		    80 80
812
)
813

814
815
816
817
818
819
820
821
822
823
824
# -------            otb::LabelizeConfidenceConnectedImageFilter   ----------------------------

  ADD_TEST(bfTuLabelizeConfidenceConnectedImageFilterNew ${BASICFILTERS_TESTS8}
         otbLabelizeConfidenceConnectedImageFilterNew)

  ADD_TEST(bfTvLabelizeConfidenceConnectedImageFilter ${BASICFILTERS_TESTS8}
		--compare-image ${EPSILON}
		    ${BASELINE}/bfTvLabelizeConfidenceConnectedImageFilterOutput.png
		    ${TEMP}/bfTvLabelizeConfidenceConnectedImageFilterOutput.png
		    otbLabelizeConfidenceConnectedImageFilter
		    ${INPUTDATA}/QB_Suburb.png
825
826
		    ${TEMP}/bfTvLabelizeConfidenceConnectedImageFilterOutput.png
		    127 127 2 3 1
827
828
)

829
830
831
832
833
# -------            otb::ConvolutionImageFilter   ----------------------------

  ADD_TEST(bfTuConvolutionImageFilterNew ${BASICFILTERS_TESTS8}
         otbConvolutionImageFilterNew)

834
  ADD_TEST(bfTvConvolutionImageFilter ${BASICFILTERS_TESTS8}
835
		--compare-image ${EPSILON}
836
837
		    ${BASELINE}/bfTvConvolutionImageFilter.tif
		    ${TEMP}/bfTvConvolutionImageFilter.tif
838
839
		    otbConvolutionImageFilter
		    ${INPUTDATA}/QB_Suburb.png
840
		    ${TEMP}/bfTvConvolutionImageFilter.tif
841
842
843
)


844
845
846
847
848
849
850
851
852
853
854
855
856
857
# -------            otb::ScalarToRainbowRGBPixelFunctor  -----------------

  ADD_TEST(bfTuScalarToRainbowRGBPixelFunctorNew ${BASICFILTERS_TESTS8}
         otbConvolutionImageFilterNew)

  ADD_TEST(bfTvScalarToRainbowRGBPixelFunctor ${BASICFILTERS_TESTS8}
		--compare-image ${EPSILON}
		    ${BASELINE}/bfTvScalarToRainbowRGBPixelFunctor.png
		    ${TEMP}/bfTvScalarToRainbowRGBPixelFunctor.png
		    otbScalarToRainbowRGBPixelFunctor
		    ${INPUTDATA}/QB_Suburb.png
		    ${TEMP}/bfTvScalarToRainbowRGBPixelFunctor.png
)

858
859
860
861
862


# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ otbBasicFiltersTests9 ~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
863
ADD_TEST(bfTuChangeLabelImageFilterNew ${BASICFILTERS_TESTS9}
864
865
866
	otbChangeLabelImageFilterNew
)

867
ADD_TEST(bfTuChangeLabelImageFilter ${BASICFILTERS_TESTS9}
868
869
870
871
	otbChangeLabelImageFilterTest
)


872
ADD_TEST(bfTuContinuousMinimumMaximumImageCalculatorNew ${BASICFILTERS_TESTS9}
873
        otbContinuousMinimumMaximumImageCalculatorNew
874
875
)

876
ADD_TEST(bfTvContinuousMinimumMaximumImageCalculatorTest ${BASICFILTERS_TESTS9}
877
        otbContinuousMinimumMaximumImageCalculatorTest
878
        ${INPUTDATA}/QB_Suburb.png )
879

880
881
882
883
884
885
886
887
888
889
890
891
892
ADD_TEST(bfTuMeanShiftImageFilterNew ${BASICFILTERS_TESTS9}
        otbMeanShiftImageFilterNew )

ADD_TEST(bfTvMeanShiftImageFilter ${BASICFILTERS_TESTS9}
--compare-image ${EPSILON}
		${BASELINE}/bfMeanShiftImageFilterOutput.tif
		${TEMP}/bfMeanShiftImageFilterOutput.tif
        otbMeanShiftImageFilter 
	${INPUTDATA}/QB_Suburb.png
	${TEMP}/bfMeanShiftImageFilterOutput.tif
	3 15 20 0 0.0001
	)

893
894
895
896
ADD_TEST(bfTuMeanShiftVectorImageFilterNew ${BASICFILTERS_TESTS9}
        otbMeanShiftVectorImageFilterNew )

ADD_TEST(bfTvMeanShiftVectorImageFilter ${BASICFILTERS_TESTS9}
897
898
899
--compare-image ${EPSILON}
		${BASELINE}/bfMeanShiftVectorImageFilterOutput.tif
		${TEMP}/bfMeanShiftVectorImageFilterOutput.tif
900
901
        otbMeanShiftVectorImageFilter 
	${INPUTDATA}/qb_RoadExtract2sub200x200.tif
902
	${TEMP}/bfMeanShiftVectorImageFilterOutput.tif
903
904
	3 15 20 0 0.0001
	)
905

906
907
908
909
910
911
912
913
914
915
ADD_TEST(bfTvMeanShiftVectorImageFilterUsingImageSpacing ${BASICFILTERS_TESTS9}
--compare-image ${EPSILON}
		${BASELINE}/bfMeanShiftVectorImageFilterOutputUsingImageSpacing.tif
		${TEMP}/bfMeanShiftVectorImageFilterOutputUsingImageSpacing.tif
        otbMeanShiftVectorImageFilter 
	${INPUTDATA}/qb_RoadExtract2sub200x200.tif
	${TEMP}/bfMeanShiftVectorImageFilterOutputUsingImageSpacing.tif
	3 15 20 1 0.0001
	)

916
917
918
919
920
921
922
923
924
925
926
927
928
ADD_TEST(bfTvFunctionToImageFilterNew ${BASICFILTERS_TESTS9}
        otbFunctionToImageFilterNew
)

ADD_TEST(bfTuFunctionToImageFilterTest ${BASICFILTERS_TESTS9}
	--compare-image ${EPSILON}
	    ${BASELINE}/bfTuFunctionToImageFilterTest.tif
	    ${TEMP}/bfTuFunctionToImageFilterTest.tif
        otbFunctionToImageFilter
	    ${INPUTDATA}/poupees_1canal.hd
	    ${TEMP}/bfTuFunctionToImageFilterTest.tif
	    2 # radius
)
929

930
931
932
933
934
935
936



# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ otbBasicFiltersTests10 ~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
ADD_TEST(bfTuScalarImageTextureFunctorNew ${BASICFILTERS_TESTS10}
937
        otbScalarImageTextureFunctorNew )
938
ADD_TEST(bfTvScalarImageTextureFunctor ${BASICFILTERS_TESTS10}
939
        --compare-image ${TOL}
940
941
            ${BASELINE}/bfScalarImageTextureFunctorTest.tif
            ${TEMP}/bfScalarImageTextureFunctorTest.tif
942
        otbScalarImageTextureFunctor 
943
	    ${INPUTDATA}/small_poupees_1canal.hd
944
945
946
947
	    ${TEMP}/bfScalarImageTextureFunctorTest.tif
	    2 # radius
            0 # index feature
)		   
948
ADD_TEST(bfTuScalarVectorImageTextureFunctorNew ${BASICFILTERS_TESTS10}
949
950
        otbScalarVectorImageTextureFunctorNew )

951
ADD_TEST(bfTvScalarVectorImageTextureFunctor ${BASICFILTERS_TESTS10}
952
        --compare-image ${TOL}
953
954
            ${BASELINE}/bfScalarImageTextureFunctorTest.tif # It the same of  bfTvScalarImageTextureFunctor test
            ${TEMP}/bfScalarVectorImageTextureFunctorTest.tif
955
        otbScalarVectorImageTextureFunctor 
956
	    ${INPUTDATA}/small_poupees_1canal.hd
957
958
959
	    ${TEMP}/bfScalarVectorImageTextureFunctorTest.tif
	    2 # radius
)
960

961

962
963
# -------            otb::GaborFilterGenerator   ----------------------------

964
ADD_TEST(bfTuGaborFilterGeneratorNew ${BASICFILTERS_TESTS10}
965
966
967
	otbGaborFilterGeneratorNew
	 )

968
ADD_TEST(bfTvGaborFilterGenerator ${BASICFILTERS_TESTS10}
969
970
971
972
973
974
975
976
977
978
979
980
	--compare-image ${TOL}
	    ${BASELINE}/bfGaborFilterGeneratorTest.tif
	    ${TEMP}/bfGaborFilterGeneratorTest.tif
	 otbGaborFilterGenerator
	 ${TEMP}/bfGaborFilterGeneratorTest.tif
	 64 64 #Radius
	 0.02 0.025 # a b
	 -45 # theta
	 0.0125 0.0125 #u0 v0
	 0
)

981
982
983
984
# -------            otb::OverlapSaveConvolutionImageFilter   ----------------------------

IF(USE_FFTWD)

985
  ADD_TEST(bfTuOverlapSaveConvolutionImageFilterNew ${BASICFILTERS_TESTS10}
986
987
         otbOverlapSaveConvolutionImageFilterNew)

988
  ADD_TEST(bfTvOverlapSaveConvolutionImageFilter ${BASICFILTERS_TESTS10}
989
990
991
992
993
994
995
996
		--compare-image ${EPSILON}
		    ${BASELINE}/bfTvConvolutionImageFilter.tif
		    ${TEMP}/bfTvOverlapSaveConvolutionImageFilter.tif
		    otbOverlapSaveConvolutionImageFilter
		    ${INPUTDATA}/QB_Suburb.png
		    ${TEMP}/bfTvOverlapSaveConvolutionImageFilter.tif
)

997
 ADD_TEST(bfTvCompareOverlapSaveAndClassicalConvolutionWithGaborFilter ${BASICFILTERS_TESTS10}
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
		--compare-image ${EPSILON}
		    ${TEMP}/bfTvCompareConvolutionOutput.tif
		    ${TEMP}/bfTvCompareOSConvolutionoutput.tif
		    otbCompareOverlapSaveAndClassicalConvolutionWithGaborFilter	
		    ${INPUTDATA}/ROI_IKO_PAN_LesHalles_sub.tif
		    ${TEMP}/bfTvCompareConvolutionOutput.tif
		    ${TEMP}/bfTvCompareOSConvolutionoutput.tif
		    64 64 #Radius
		    0.02 0.025 # a b
		    -45 # theta
		    0.0125 0.0125 #u0 v0
		    0
)

ENDIF(USE_FFTWD)

Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
1014
# A enrichir
1015
SET(BasicFilters_SRCS1
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
1016
otbLeeFilter.cxx
1017
1018
otbFrostFilterTest.cxx
otbFrostFilterNew.cxx
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
1019
otbFrostFilter.cxx
Patrick Imbo's avatar
Patrick Imbo committed
1020
otbImageToPointSetFilterTest.cxx
1021
1022
1023
1024
otbOpeningClosingMorphologicalFilterNew.cxx
otbOpeningClosingMorphologicalFilter.cxx
otbClosingOpeningMorphologicalFilterNew.cxx
otbClosingOpeningMorphologicalFilter.cxx
1025
1026
otbBinaryImageMinimalBoundingRegionCalculatorNew.cxx
otbBinaryImageMinimalBoundingRegionCalculator.cxx
1027
1028
1029
1030
)

# A enrichir
SET(BasicFilters_SRCS2
1031
1032
1033
1034
1035
otbLogPolarTransformNew.cxx
otbLogPolarTransform.cxx
otbLogPolarTransformResample.cxx
otbInverseLogPolarTransformNew.cxx
otbInverseLogPolarTransform.cxx
1036
otbInverseLogPolarTransformResample.cxx
1037
1038
otbStreamingShrinkImageFilterNew.cxx
otbStreamingShrinkImageFilter.cxx
1039
1040
otbSpatialObjectToImageDrawingFilterNew.cxx
otbSpatialObjectToImageDrawingFilter.cxx
1041
1042
1043
1044
)

# A enrichir
SET(BasicFilters_SRCS3
1045
1046
otbImportGeoInformationImageFilterNew.cxx
otbImportGeoInformationImageFilter.cxx
Mathieu Deltorre's avatar
Mathieu Deltorre committed
1047
otbImportGeoInformationImageFilterWithKeywordList.cxx
1048
1049
otbSpectralAngleDistanceImageFilterNew.cxx
otbSpectralAngleDistanceImageFilter.cxx
1050
1051
otbVectorRescaleIntensityImageFilterNew.cxx
otbVectorRescaleIntensityImageFilter.cxx
1052
1053
otbVectorImageToImageListFilterNew.cxx
otbVectorImageToImageListFilter.cxx
1054
1055
otbImageListToVectorImageFilterNew.cxx
otbImageListToVectorImageFilter.cxx
1056
)
1057

1058
1059
# A enrichir
SET(BasicFilters_SRCS4
1060
1061
otbImageListToImageListApplyFilterNew.cxx
otbImageListToImageListApplyFilter.cxx
1062
1063
1064
otbPerBandVectorImageFilterNew.cxx
otbPerBandVectorImageFilterWithMeanFilter.cxx
otbPerBandVectorImageFilterWithSobelFilter.cxx
1065
1066
otbStreamingStatisticsImageFilterNew.cxx
otbStreamingStatisticsImageFilter.cxx
1067
1068
otbVectorImageTo3DScalarImageFilterNew.cxx
otbVectorImageTo3DScalarImageFilter.cxx
1069
1070
1071
1072
)

# A enrichir
SET(BasicFilters_SRCS5
1073
1074
1075
otbStreamingResampleImageFilterNew.cxx
otbStreamingResampleImageFilter.cxx
otbStreamingResampleImageFilterCompareWithITK.cxx
1076
1077
1078
1079
otbStreamingStatisticsVectorImageFilterNew.cxx
otbStreamingStatisticsVectorImageFilter.cxx
otbMatrixTransposeMatrixImageFilterNew.cxx
otbMatrixTransposeMatrixImageFilter.cxx
1080
1081
otbUnaryImageFunctorWithVectorImageFilterNew.cxx
otbUnaryImageFunctorWithVectorImageFilter.cxx
1082
1083
otbPrintableImageFilterNew.cxx
otbPrintableImageFilter.cxx
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
1084
1085
)

1086
1087
# A enrichir
SET(BasicFilters_SRCS6
Julien Michel's avatar
Julien Michel committed
1088
1089
1090
1091
otbBSplineDecompositionImageFilterNew.cxx
otbBSplineDecompositionImageFilter.cxx
otbBSplineInterpolateImageFunctionNew.cxx
otbBSplineInterpolateImageFunction.cxx
1092
1093
otbProlateInterpolateImageFunctionNew.cxx
otbProlateInterpolateImageFunction.cxx
1094
1095
1096
1097
1098
otbWindowedSincInterpolateImageFunctionBaseNew.cxx
otbWindowedSincInterpolateImageGaussianFunctionNew.cxx
otbWindowedSincInterpolateImageGaussianFunction.cxx
otbWindowedSincInterpolateImageHammingFunctionNew.cxx
otbWindowedSincInterpolateImageHammingFunction.cxx
1099
)
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
1100

1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
# A enrichir
SET(BasicFilters_SRCS7
otbWindowedSincInterpolateImageCosineFunctionNew.cxx
otbWindowedSincInterpolateImageCosineFunction.cxx
otbWindowedSincInterpolateImageWelchFunctionNew.cxx
otbWindowedSincInterpolateImageWelchFunction.cxx
otbWindowedSincInterpolateImageLanczosFunctionNew.cxx
otbWindowedSincInterpolateImageLanczosFunction.cxx
otbWindowedSincInterpolateImageBlackmanFunctionNew.cxx
otbWindowedSincInterpolateImageBlackmanFunction.cxx
1111
otbProlateValidationTest.cxx
1112
1113
otbVectorImageToAmplitudeImageFilterNew.cxx
otbVectorImageToAmplitudeImageFilter.cxx
1114
1115
otbRationalQuotientResampleImageFilterNew.cxx
otbRationalQuotientResampleImageFilter.cxx
1116
1117
otbVectorImageToIntensityImageFilterNew.cxx
otbVectorImageToIntensityImageFilter.cxx
1118
1119
)

1120
1121
# A enrichir
SET(BasicFilters_SRCS8
1122
1123
otbLabelizeConnectedThresholdImageFilterNew.cxx
otbLabelizeConnectedThresholdImageFilter.cxx
1124
1125
1126
1127
otbLabelizeNeighborhoodConnectedImageFilterNew.cxx
otbLabelizeNeighborhoodConnectedImageFilter.cxx
otbLabelizeConfidenceConnectedImageFilterNew.cxx
otbLabelizeConfidenceConnectedImageFilter.cxx
Julien Michel's avatar
Julien Michel committed
1128
1129
otbEuclideanDistanceWithMissingValueNew.cxx
otbEuclideanDistanceWithMissingValue.cxx
1130
1131
otbConvolutionImageFilterNew.cxx
otbConvolutionImageFilter.cxx
1132
1133
otbScalarToRainbowRGBPixelFunctorNew.cxx
otbScalarToRainbowRGBPixelFunctor.cxx
1134
)
1135

1136
1137
1138
1139
# A enrichir
SET(BasicFilters_SRCS9
otbChangeLabelImageFilterNew.cxx
otbChangeLabelImageFilter.cxx
1140
1141
otbContinuousMinimumMaximumImageCalculatorNew.cxx
otbContinuousMinimumMaximumImageCalculatorTest.cxx
1142
1143
otbMeanShiftImageFilterNew.cxx
otbMeanShiftImageFilter.cxx
1144
1145
otbMeanShiftVectorImageFilterNew.cxx
otbMeanShiftVectorImageFilter.cxx
1146
1147
otbFunctionToImageFilterNew.cxx
otbFunctionToImageFilter.cxx
1148
1149
1150
1151
)

# A enrichir
SET(BasicFilters_SRCS10
1152
1153
otbScalarImageTextureFunctorNew.cxx
otbScalarImageTextureFunctor.cxx
1154
1155
otbScalarVectorImageTextureFunctorNew.cxx
otbScalarVectorImageTextureFunctor.cxx
1156
1157
otbGaborFilterGeneratorNew.cxx
otbGaborFilterGenerator.cxx
1158
1159
)

1160

1161
IF(USE_FFTWD)
1162
1163
SET(BasicFilters_SRCS10
${BasicFilters_SRCS10}
1164
1165
1166
1167
1168
otbOverlapSaveConvolutionImageFilterNew.cxx
otbOverlapSaveConvolutionImageFilter.cxx
otbCompareOverlapSaveAndClassicalConvolutionWithGaborFilter.cxx
)
ENDIF(USE_FFTWD)
1169

1170
1171


Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
1172
1173
INCLUDE_DIRECTORIES("${OTBTesting_BINARY_DIR}")

1174
ADD_EXECUTABLE(otbBasicFiltersTests1 otbBasicFiltersTests1.cxx ${BasicFilters_SRCS1})
1175
TARGET_LINK_LIBRARIES(otbBasicFiltersTests1  OTBBasicFilters OTBIO)
1176
1177

ADD_EXECUTABLE(otbBasicFiltersTests2 otbBasicFiltersTests2.cxx ${BasicFilters_SRCS2})
1178
TARGET_LINK_LIBRARIES(otbBasicFiltersTests2  OTBBasicFilters  OTBIO )
1179
1180

ADD_EXECUTABLE(otbBasicFiltersTests3 otbBasicFiltersTests3.cxx ${BasicFilters_SRCS3})
1181
TARGET_LINK_LIBRARIES(otbBasicFiltersTests3  OTBBasicFilters otbossim  OTBIO )
1182
1183

ADD_EXECUTABLE(otbBasicFiltersTests4 otbBasicFiltersTests4.cxx ${BasicFilters_SRCS4})
1184
TARGET_LINK_LIBRARIES(otbBasicFiltersTests4  OTBBasicFilters  OTBIO )
1185
1186

ADD_EXECUTABLE(otbBasicFiltersTests5 otbBasicFiltersTests5.cxx ${BasicFilters_SRCS5})
1187
TARGET_LINK_LIBRARIES(otbBasicFiltersTests5  OTBBasicFilters  OTBIO )
1188
1189

ADD_EXECUTABLE(otbBasicFiltersTests6 otbBasicFiltersTests6.cxx ${BasicFilters_SRCS6})
1190
TARGET_LINK_LIBRARIES(otbBasicFiltersTests6  OTBBasicFilters  OTBIO )
1191

1192
ADD_EXECUTABLE(otbBasicFiltersTests7 otbBasicFiltersTests7.cxx ${BasicFilters_SRCS7})
1193
TARGET_LINK_LIBRARIES(otbBasicFiltersTests7  OTBBasicFilters  OTBIO )
Thomas Feuvrier's avatar
nomsg    
Thomas Feuvrier committed
1194

1195
ADD_EXECUTABLE(otbBasicFiltersTests8 otbBasicFiltersTests8.cxx ${BasicFilters_SRCS8})
1196
TARGET_LINK_LIBRARIES(otbBasicFiltersTests8  OTBBasicFilters  OTBIO )
1197

1198
ADD_EXECUTABLE(otbBasicFiltersTests9 otbBasicFiltersTests9.cxx ${BasicFilters_SRCS9})
1199
TARGET_LINK_LIBRARIES(otbBasicFiltersTests9  OTBBasicFilters  OTBIO )
1200

1201
ADD_EXECUTABLE(otbBasicFiltersTests10 otbBasicFiltersTests10.cxx ${BasicFilters_SRCS10})
1202
TARGET_LINK_LIBRARIES(otbBasicFiltersTests10  OTBBasicFilters  OTBIO ) 
1203

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