CMakeLists.txt 24.7 KB
Newer Older
1
PROJECT(ImageRegistrationExamples)
Jordi Inglada's avatar
Jordi Inglada committed
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
INCLUDE_REGULAR_EXPRESSION("^.*$")

# SET(REGISTRATION_EXAMPLES ${CXX_TEST_PATH}/RegistrationExamples)
# SET(REGISTRATION_EXAMPLESO ${CXX_TEST_PATH}/RegistrationExamplesO)
# SET(REGISTRATION_EXAMPLESO2 ${CXX_TEST_PATH}/RegistrationExamplesO2)
# SET(REGISTRATION_EXAMPLES2 ${CXX_TEST_PATH}/RegistrationExamples2)
# SET(REGISTRATION_EXAMPLES3 ${CXX_TEST_PATH}/RegistrationExamples3)
# SET(REGISTRATION_EXAMPLES4 ${CXX_TEST_PATH}/RegistrationExamples4)
# SET(REGISTRATION_EXAMPLES5 ${CXX_TEST_PATH}/RegistrationExamples5)
# SET(REGISTRATION_EXAMPLES6 ${CXX_TEST_PATH}/RegistrationExamples6)
# SET(REGISTRATION_EXAMPLES7 ${CXX_TEST_PATH}/RegistrationExamples7)
# SET(REGISTRATION_EXAMPLES8 ${CXX_TEST_PATH}/RegistrationExamples8)
# SET(REGISTRATION_EXAMPLES9 ${CXX_TEST_PATH}/RegistrationExamples9)


ADD_EXECUTABLE(ImageRegistration1 ImageRegistration1.cxx )
TARGET_LINK_LIBRARIES(ImageRegistration1 OTBCommon OTBIO ITKNumerics ITKIO)

Jordi Inglada's avatar
Jordi Inglada committed
20
21
22
ADD_EXECUTABLE(ImageRegistration2 ImageRegistration2.cxx )
TARGET_LINK_LIBRARIES(ImageRegistration2 OTBCommon OTBIO ITKNumerics ITKIO)

Jordi Inglada's avatar
Jordi Inglada committed
23
24
25
26
27
28
29
30
31
32
33
34
35

# ADD_EXECUTABLE(ImageRegistration3 ImageRegistration3.cxx )
# TARGET_LINK_LIBRARIES(ImageRegistration3 ITKNumerics ITKIO)

# ADD_EXECUTABLE(ImageRegistration4o ImageRegistration4o.cxx )
# TARGET_LINK_LIBRARIES(ImageRegistration4o ITKNumerics ITKIO)

# ADD_EXECUTABLE(ImageRegistration6 ImageRegistration6.cxx )
# TARGET_LINK_LIBRARIES(ImageRegistration6 ITKNumerics ITKIO)

# ADD_EXECUTABLE(ImageRegistration8 ImageRegistration8.cxx )
# TARGET_LINK_LIBRARIES(ImageRegistration8 ITKNumerics ITKIO)

Jordi Inglada's avatar
Jordi Inglada committed
36
37
ADD_EXECUTABLE(ImageRegistration9 ImageRegistration9.cxx )
TARGET_LINK_LIBRARIES(ImageRegistration9 OTBCommon OTBIO ITKNumerics ITKIO)
Jordi Inglada's avatar
Jordi Inglada committed
38
39


Jordi Inglada's avatar
Jordi Inglada committed
40
41
ADD_EXECUTABLE(ImageRegistration5 ImageRegistration5.cxx )
TARGET_LINK_LIBRARIES(ImageRegistration5 OTBCommon OTBIO ITKNumerics ITKIO)
Jordi Inglada's avatar
Jordi Inglada committed
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498

#   ADD_EXECUTABLE(ImageRegistration10 ImageRegistration10.cxx )
#   TARGET_LINK_LIBRARIES(ImageRegistration10 ITKNumerics ITKIO)

#   ADD_EXECUTABLE(DeformableRegistration4 DeformableRegistration4.cxx )
#   TARGET_LINK_LIBRARIES(DeformableRegistration4 ITKNumerics ITKIO)

#   ADD_EXECUTABLE(ImageRegistration4 ImageRegistration4.cxx )
#   TARGET_LINK_LIBRARIES(ImageRegistration4 ITKNumerics ITKIO)

#   ADD_EXECUTABLE(ImageRegistration7 ImageRegistration7.cxx )
#   TARGET_LINK_LIBRARIES(ImageRegistration7 ITKNumerics ITKIO)

#   ADD_EXECUTABLE(ImageRegistration11 ImageRegistration11.cxx )
#   TARGET_LINK_LIBRARIES(ImageRegistration11 ITKStatistics ITKNumerics ITKIO)

#   ADD_EXECUTABLE(ImageRegistration12 ImageRegistration12.cxx )
#   TARGET_LINK_LIBRARIES(ImageRegistration12 ITKStatistics ITKNumerics ITKIO)

#   ADD_EXECUTABLE(ImageRegistration13 ImageRegistration13.cxx )
#   TARGET_LINK_LIBRARIES(ImageRegistration13 ITKStatistics ITKNumerics ITKIO)

#   ADD_EXECUTABLE(ImageRegistration14 ImageRegistration14.cxx )
#   TARGET_LINK_LIBRARIES(ImageRegistration14 ITKStatistics ITKNumerics ITKIO)

#   ADD_EXECUTABLE(ImageRegistration15 ImageRegistration15.cxx )
#   TARGET_LINK_LIBRARIES(ImageRegistration15 ITKStatistics ITKNumerics ITKIO)

#   ADD_EXECUTABLE(ImageRegistration16 ImageRegistration16.cxx )
#   TARGET_LINK_LIBRARIES(ImageRegistration16 ITKStatistics ITKNumerics ITKIO)

#   ADD_EXECUTABLE(DeformableRegistration6 DeformableRegistration6.cxx )
#   TARGET_LINK_LIBRARIES(DeformableRegistration6 ITKNumerics ITKIO)

#   ADD_EXECUTABLE(DeformableRegistration7 DeformableRegistration7.cxx )
#   TARGET_LINK_LIBRARIES(DeformableRegistration7 ITKNumerics ITKIO)

#   ADD_EXECUTABLE(DeformableRegistration8 DeformableRegistration8.cxx )
#   TARGET_LINK_LIBRARIES(DeformableRegistration8 ITKNumerics ITKIO)

# IF( USE_FFTWD )
#   ADD_EXECUTABLE(DeformableRegistration9 DeformableRegistration9.cxx )
#   TARGET_LINK_LIBRARIES(DeformableRegistration9 ITKCommon
#       ITKNumerics ITKIO ITKAlgorithms ITKStatistics )

#   ADD_EXECUTABLE(DeformableRegistration10 DeformableRegistration10.cxx )
#   TARGET_LINK_LIBRARIES(DeformableRegistration10
#                         ITKCommon ITKNumerics ITKIO ITKAlgorithms ITKStatistics)
# ENDIF( USE_FFTWD )

# ADD_EXECUTABLE(MultiResImageRegistration1 MultiResImageRegistration1.cxx )
# TARGET_LINK_LIBRARIES(MultiResImageRegistration1 ITKNumerics ITKIO)

# ADD_EXECUTABLE(RegistrationExamples7 RegistrationExamples7.cxx )
# TARGET_LINK_LIBRARIES(RegistrationExamples7 ITKAlgorithms ITKFEM ITKStatistics ITKIO ITKBasicFilters ITKCommon)

# ADD_EXECUTABLE(MultiResImageRegistration2 MultiResImageRegistration2.cxx )
# TARGET_LINK_LIBRARIES(MultiResImageRegistration2 ITKNumerics ITKIO)

# ADD_EXECUTABLE(DeformableRegistration1 DeformableRegistration1.cxx )
# TARGET_LINK_LIBRARIES(DeformableRegistration1 ITKNumerics ITKFEM ITKIO
#                                               ITKStatistics)

# ADD_EXECUTABLE(DeformableRegistration2 DeformableRegistration2.cxx )
# TARGET_LINK_LIBRARIES(DeformableRegistration2 ITKNumerics ITKIO ITKStatistics)

# ADD_EXECUTABLE(DeformableRegistration3 DeformableRegistration3.cxx )
# TARGET_LINK_LIBRARIES(DeformableRegistration3 ITKNumerics ITKIO ITKStatistics)

# ADD_EXECUTABLE(DeformableRegistration5 DeformableRegistration5.cxx )
# TARGET_LINK_LIBRARIES(DeformableRegistration5 ITKNumerics ITKIO ITKStatistics)

# ADD_EXECUTABLE(DeformableRegistration11 DeformableRegistration11.cxx )
# TARGET_LINK_LIBRARIES(DeformableRegistration11 ITKNumerics ITKFEM ITKIO
#                                               ITKStatistics)

# ADD_EXECUTABLE(DeformationFieldInitialization DeformationFieldInitialization.cxx )
# TARGET_LINK_LIBRARIES(DeformationFieldInitialization ITKNumerics ITKIO)

# ADD_EXECUTABLE(DeformationFieldJacobian DeformationFieldJacobian.cxx )
# TARGET_LINK_LIBRARIES(DeformationFieldJacobian ITKNumerics ITKIO)

# ADD_EXECUTABLE(LandmarkWarping2 LandmarkWarping2.cxx )
# TARGET_LINK_LIBRARIES(LandmarkWarping2 ITKNumerics ITKIO)

# ADD_EXECUTABLE(BSplineWarping1 BSplineWarping1.cxx )
# TARGET_LINK_LIBRARIES(BSplineWarping1 ITKNumerics ITKIO)

# ADD_EXECUTABLE(ModelToImageRegistration1 ModelToImageRegistration1.cxx )
# TARGET_LINK_LIBRARIES(ModelToImageRegistration1 ITKStatistics ITKNumerics ITKIO)

# ADD_EXECUTABLE(ModelToImageRegistration2 ModelToImageRegistration2.cxx )
# TARGET_LINK_LIBRARIES(ModelToImageRegistration2 ITKStatistics ITKNumerics ITKIO)

# IF( NOT ITK_DISABLE_CXX_TESTING )

# ADD_TEST(ImageRegistration1oTest ${REGISTRATION_EXAMPLESO}
#   --compare ${BASELINE}/ImageRegistration1Test.png
#             ${TEMP}/ImageRegistration1Test.png
#   ImageRegistration1oTest
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceShifted13x17y.png
#         ${TEMP}/ImageRegistration1Test.png
#         ${TEMP}/ImageRegistration1DifferenceAfterTest.png
#         ${TEMP}/ImageRegistration1DifferenceBeforeTest.png
# )

# ADD_TEST(ImageRegistration2oTest ${REGISTRATION_EXAMPLESO}
#   ImageRegistration2oTest
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainT1SliceBorder20.png
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceShifted13x17y.png
#         ${TEMP}/ImageRegistration2Test.png
# )

# ADD_TEST(ImageRegistration3oTest ${REGISTRATION_EXAMPLESO}
#   --compare ${BASELINE}/ImageRegistration3Test.png
#             ${TEMP}/ImageRegistration3Test.png
#   ImageRegistration3oTest
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceShifted13x17y.png
#         ${TEMP}/ImageRegistration3Test.png
# )

# ADD_TEST(ImageRegistration4oTest ${REGISTRATION_EXAMPLESO}
#   --compare ${BASELINE}/ImageRegistration4Test.png
#             ${TEMP}/ImageRegistration4Test.png
#   ImageRegistration4oTest
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainT1SliceBorder20.png
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceShifted13x17y.png
#         ${TEMP}/ImageRegistration4Test.png 0
#         ${TEMP}/ImageRegistration4BeforeTest.png
#         ${TEMP}/ImageRegistration4AfterTest.png
# )

# ADD_TEST(ImageRegistration5oTest1 ${REGISTRATION_EXAMPLESO2}
#   --compare ${BASELINE}/ImageRegistration5Test1.png
#             ${TEMP}/ImageRegistration5Test1.png
#   ImageRegistration5oTest
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceRotated10.png
#         ${TEMP}/ImageRegistration5Test1.png
# )

# ADD_TEST(ImageRegistration5oTest2 ${REGISTRATION_EXAMPLESO2}
#   --compare ${BASELINE}/ImageRegistration5Test2.png
#             ${TEMP}/ImageRegistration5Test2.png
#   ImageRegistration5oTest
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceR10X13Y17.png
#         ${TEMP}/ImageRegistration5Test2.png
# )

# ADD_TEST(ImageRegistration6oTest ${REGISTRATION_EXAMPLESO2}
#   --compare ${BASELINE}/ImageRegistration6Test.png
#             ${TEMP}/ImageRegistration6Test.png
#   ImageRegistration6oTest
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceR10X13Y17.png
#         ${TEMP}/ImageRegistration6Test.png
# )

# ADD_TEST(ImageRegistration1Test ${REGISTRATION_EXAMPLES}
#   --compare ${BASELINE}/ImageRegistration1Test.png
#             ${TEMP}/ImageRegistration1Test.png
#   ImageRegistration1Test
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceShifted13x17y.png
#         ${TEMP}/ImageRegistration1Test.png
#         ${TEMP}/ImageRegistration1DifferenceAfterTest.png
#         ${TEMP}/ImageRegistration1DifferenceBeforeTest.png
# )

# ADD_TEST(ImageRegistration2Test ${REGISTRATION_EXAMPLES}
#   ImageRegistration2Test
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainT1SliceBorder20.png
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceShifted13x17y.png
#         ${TEMP}/ImageRegistration2Test.png
#         ${TEMP}/ImageRegistration2BeforeTest.png
#         ${TEMP}/ImageRegistration2AfterTest.png
# )

# ADD_TEST(ImageRegistration3Test ${REGISTRATION_EXAMPLES}
#   --compare ${BASELINE}/ImageRegistration3Test.png
#             ${TEMP}/ImageRegistration3Test.png
#   ImageRegistration3Test
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceShifted13x17y.png
#         ${TEMP}/ImageRegistration3Test.png
# )

# ADD_TEST(ImageRegistration4Test ${REGISTRATION_EXAMPLES}
#   --compare ${BASELINE}/ImageRegistration4Test.png
#             ${TEMP}/ImageRegistration4Test.png
#   ImageRegistration4Test
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainT1SliceBorder20.png
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceShifted13x17y.png
#         ${TEMP}/ImageRegistration4Test.png 0
#         ${TEMP}/ImageRegistration4BeforeTest.png
#         ${TEMP}/ImageRegistration4AfterTest.png
# )

# ADD_TEST(ImageRegistration5Test1 ${REGISTRATION_EXAMPLES9}
#   --compare ${BASELINE}/ImageRegistration5Test1.png
#             ${TEMP}/ImageRegistration5Test1.png
#   ImageRegistration5Test
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceRotated10.png
#         ${TEMP}/ImageRegistration5Test1.png
# )

# ADD_TEST(ImageRegistration5Test2 ${REGISTRATION_EXAMPLES9}
#   --compare ${BASELINE}/ImageRegistration5Test2.png
#             ${TEMP}/ImageRegistration5Test2.png
#   ImageRegistration5Test
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceR10X13Y17.png
#         ${TEMP}/ImageRegistration5Test2.png
# )

# ADD_TEST(ImageRegistration6Test ${REGISTRATION_EXAMPLES9}
#   --compare ${BASELINE}/ImageRegistration6Test.png
#             ${TEMP}/ImageRegistration6Test.png
#   ImageRegistration6Test
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceR10X13Y17.png
#         ${TEMP}/ImageRegistration6Test.png
# )

# ADD_TEST(ImageRegistration7Test ${REGISTRATION_EXAMPLES9}
#   --compare ${BASELINE}/ImageRegistration7Test.png
#             ${TEMP}/ImageRegistration7Test.png
#   ImageRegistration7Test
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceR10X13Y17S12.png
#         ${TEMP}/ImageRegistration7Test.png 
#         ${TEMP}/ImageRegistration7BeforeTest.png
#         ${TEMP}/ImageRegistration7AfterTest.png
#         1.0   1.0  0.0
# )

# ADD_TEST(ImageRegistration9Test ${REGISTRATION_EXAMPLES3}
#   --compare ${BASELINE}/ImageRegistration9Test.png
#             ${TEMP}/ImageRegistration9Test.png
#   ImageRegistration9Test
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceR10X13Y17.png
#         ${TEMP}/ImageRegistration9Test.png
# )

# ADD_TEST(ImageRegistration10Test ${REGISTRATION_EXAMPLES8}
#   --compare ${BASELINE}/ImageRegistration10Test.png
#             ${TEMP}/ImageRegistration10Test.png
#   ImageRegistration10Test
#         ${ITK_SOURCE_DIR}/Testing/Data/Baseline/Segmentation/WatershedSegmentation1Test1.png
#         ${ITK_SOURCE_DIR}/Testing/Data/Baseline/Segmentation/WatershedSegmentation1Test2.png
#         ${TEMP}/ImageRegistration10Test.png
#         ${TEMP}/ImageRegistration10DifferenceTest.png
#         -11 -13
# )

# IF(NOT BORLAND)
#   ADD_EXECUTABLE(ImageRegistration2 ImageRegistration2.cxx )
#   TARGET_LINK_LIBRARIES(ImageRegistration2 ITKNumerics ITKIO)

#   ADD_EXECUTABLE(ImageRegistration17 ImageRegistration17.cxx )
#   TARGET_LINK_LIBRARIES(ImageRegistration17 ITKStatistics ITKNumerics ITKIO)

#   ADD_EXECUTABLE(ImageRegistrationHistogramPlotter ImageRegistrationHistogramPlotter.cxx )
#   TARGET_LINK_LIBRARIES(ImageRegistrationHistogramPlotter 
#                         ITKNumerics ITKIO ITKCommon ITKStatistics)

#   ADD_EXECUTABLE(MeanSquaresImageMetric1  MeanSquaresImageMetric1.cxx )
#   TARGET_LINK_LIBRARIES(MeanSquaresImageMetric1 ITKAlgorithms ITKIO ITKBasicFilters ITKCommon)

# ENDIF(NOT BORLAND)

# ADD_TEST(ImageRegistration13Test ${REGISTRATION_EXAMPLES7}
#   --compare ${BASELINE}/ImageRegistration13Test.png
#             ${TEMP}/ImageRegistration13Test.png
#   ImageRegistration13Test
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceR10X13Y17.png
#         ${TEMP}/ImageRegistration13Test.png
# )

# ADD_TEST(ImageRegistration14Test ${REGISTRATION_EXAMPLES8}
#   --compare ${BASELINE}/ImageRegistration14Test.png
#             ${TEMP}/ImageRegistration14Test.png
#   ImageRegistration14Test
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceR10X13Y17.png
#         ${TEMP}/ImageRegistration14Test.png 32 0.01 0.1  0.15  10.0  14.0
# )

# ADD_TEST(ImageRegistration15Test ${REGISTRATION_EXAMPLES8}
#   --compare ${BASELINE}/ImageRegistration15Test.png
#             ${TEMP}/ImageRegistration15Test.png
#   ImageRegistration15Test
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceShifted13x17y.png
#         ${TEMP}/ImageRegistration15Test.png 32 0.1 0.05  0.0 0.0
# )

# ADD_TEST(ImageRegistration16Test ${REGISTRATION_EXAMPLES8}
#   --compare ${BASELINE}/ImageRegistration16Test.png
#             ${TEMP}/ImageRegistration16Test.png
#   ImageRegistration16Test
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceShifted13x17y.png
#         ${TEMP}/ImageRegistration16Test.png 0.0 0.0
# )


# ADD_TEST(ImageRegistration17Test ${REGISTRATION_EXAMPLES8}
#   --compare ${BASELINE}/ImageRegistration17Test.png
#             ${TEMP}/ImageRegistration17Test.png
#   ImageRegistration17Test
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceShifted13x17y.png
#         ${TEMP}/ImageRegistration17Test.png 0.0 0.0
# )


# ADD_TEST(MultiResImageRegistration1Test ${REGISTRATION_EXAMPLES2}
#   --compare ${BASELINE}/MultiResImageRegistration1Test.png
#             ${TEMP}/MultiResImageRegistration1Test.png
#   MultiResImageRegistration1Test
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainT1SliceBorder20.png
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceShifted13x17y.png
#         ${TEMP}/MultiResImageRegistration1Test.png
# )

# ADD_TEST(MultiResImageRegistration2Test ${REGISTRATION_EXAMPLES2}
#   --compare ${BASELINE}/MultiResImageRegistration2Test.png
#             ${TEMP}/MultiResImageRegistration2Test.png
#   --compareNumberOfPixelsTolerance 100
#   MultiResImageRegistration2Test
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainT1SliceBorder20.png
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceShifted13x17y.png
#         ${TEMP}/MultiResImageRegistration2Test.png  0
# )

# ADD_TEST(DeformableRegistration2Test ${REGISTRATION_EXAMPLES5}
#   --compare ${BASELINE}/DeformableRegistration2Test.png
#             ${TEMP}/DeformableRegistration2Test.png
#   DeformableRegistration2Test
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBSplined10.png
#         ${TEMP}/DeformableRegistration2Test.png
# )

# ADD_TEST(DeformableRegistration3Test ${REGISTRATION_EXAMPLES5}
#   --compare ${BASELINE}/DeformableRegistration3Test.png
#             ${TEMP}/DeformableRegistration3Test.png
#   --compareNumberOfPixelsTolerance 100
#   DeformableRegistration3Test
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBSplined10.png
#         ${TEMP}/DeformableRegistration3Test.png
# )

# ADD_TEST(DeformableRegistration4Test ${REGISTRATION_EXAMPLES6}
#   --compare ${BASELINE}/DeformableRegistration4Test.png
#             ${TEMP}/DeformableRegistration4Test.png
#   DeformableRegistration4Test
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBSplined10.png
#         ${TEMP}/DeformableRegistration4Test.png
# )

# ADD_TEST(DeformableRegistration5Test ${REGISTRATION_EXAMPLES5}
#   --compare ${BASELINE}/DeformableRegistration5Test.png
#             ${TEMP}/DeformableRegistration5Test.png
#   DeformableRegistration5Test
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBSplined10.png
#         ${TEMP}/DeformableRegistration5Test.png
# )

# ADD_TEST(DeformableRegistration6Test ${REGISTRATION_EXAMPLES6}
#   --compare ${BASELINE}/DeformableRegistration6Test.png
#             ${TEMP}/DeformableRegistration6Test.png
#   DeformableRegistration6Test
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBSplined10.png
#         ${TEMP}/DeformableRegistration6Test.png
# )

# ADD_TEST(BSplineWarping1Test ${REGISTRATION_EXAMPLES6}
#   --compare ${BASELINE}/BSplineWarping1Test.png
#             ${TEMP}/BSplineWarping1Test.png
#   BSplineWarping1Test
#         ${ITK_SOURCE_DIR}/Examples/Data/BSplineDisplacements1.txt
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png
#         ${TEMP}/BSplineWarping1Test.png
# )

# ADD_TEST(LandmarkWarping2Test ${REGISTRATION_EXAMPLES6}
#   --compare ${BASELINE}/LandmarkWarping2Test.png
#             ${TEMP}/LandmarkWarping2Test.png
#   LandmarkWarping2Test
#         ${ITK_SOURCE_DIR}/Examples/Data/LandmarkWarping2Landmarks1.txt
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png
#         ${TEMP}/LandmarkWarping2Test.png
# )

# ADD_TEST(ImageRegistration12Test ${REGISTRATION_EXAMPLES4}
#   --compare ${BASELINE}/ImageRegistration12Test.png
#             ${TEMP}/ImageRegistration12Test.png
#   ImageRegistration12Test
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20.png
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceR10X13Y17.png
#         ${ITK_SOURCE_DIR}/Examples/Data/BrainProtonDensitySliceBorder20Mask.png
#         ${TEMP}/ImageRegistration12Test.png
# )


# ADD_TEST(ModelToImageRegistration2Test ${REGISTRATION_EXAMPLES9}
#   ModelToImageRegistration2Test
#         ${ITK_SOURCE_DIR}/Testing/Data/Input/cake_easy.png  12 12
# )



# ADD_EXECUTABLE(RegistrationExamples RegistrationExamples.cxx )
# TARGET_LINK_LIBRARIES(RegistrationExamples ITKAlgorithms ITKIO ITKBasicFilters ITKCommon)

# ADD_EXECUTABLE(RegistrationExamplesO RegistrationExamplesO.cxx )
# TARGET_LINK_LIBRARIES(RegistrationExamplesO ITKAlgorithms ITKIO ITKBasicFilters ITKCommon)

# ADD_EXECUTABLE(RegistrationExamplesO2 RegistrationExamplesO2.cxx )
# TARGET_LINK_LIBRARIES(RegistrationExamplesO2 ITKAlgorithms ITKIO ITKBasicFilters ITKCommon)

# ADD_EXECUTABLE(RegistrationExamples2 RegistrationExamples2.cxx )
# TARGET_LINK_LIBRARIES(RegistrationExamples2 ITKAlgorithms ITKFEM ITKStatistics ITKIO ITKBasicFilters ITKCommon)

# ADD_EXECUTABLE(RegistrationExamples3 RegistrationExamples3.cxx )
# TARGET_LINK_LIBRARIES(RegistrationExamples3 ITKAlgorithms ITKFEM ITKStatistics ITKIO ITKBasicFilters ITKCommon)

# ADD_EXECUTABLE(RegistrationExamples4 RegistrationExamples4.cxx )
# TARGET_LINK_LIBRARIES(RegistrationExamples4 ITKAlgorithms ITKFEM ITKStatistics ITKIO ITKBasicFilters ITKCommon)

# ADD_EXECUTABLE(RegistrationExamples5 RegistrationExamples5.cxx )
# TARGET_LINK_LIBRARIES(RegistrationExamples5 ITKAlgorithms ITKFEM ITKStatistics ITKIO ITKBasicFilters ITKCommon)

# ADD_EXECUTABLE(RegistrationExamples6 RegistrationExamples6.cxx )
# TARGET_LINK_LIBRARIES(RegistrationExamples6 ITKAlgorithms ITKFEM ITKStatistics ITKIO ITKBasicFilters ITKCommon)

# ADD_EXECUTABLE(RegistrationExamples8 RegistrationExamples8.cxx )
# TARGET_LINK_LIBRARIES(RegistrationExamples8 ITKAlgorithms ITKFEM ITKStatistics ITKIO ITKBasicFilters ITKCommon)

# ADD_EXECUTABLE(RegistrationExamples9 RegistrationExamples9.cxx )
# TARGET_LINK_LIBRARIES(RegistrationExamples9 ITKAlgorithms ITKFEM ITKStatistics ITKIO ITKBasicFilters ITKCommon)


499

500
IF( NOT OTB_DISABLE_CXX_TESTING AND BUILD_TESTING )
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561

SET(BASELINE ${OTB_DATA_ROOT}/Baseline/Examples/Registration)

SET(INPUTDATA ${OTB_SOURCE_DIR}/Examples/Data)
SET(TEMP ${OTB_BINARY_DIR}/Testing/Temporary)

SET(EXE_TESTS ${CXX_TEST_PATH}/otbRegistrationExamplesTests)

SET(TOL 0.0)

ADD_TEST(ImageRegistration1ExampleTest ${EXE_TESTS}
        --compare-image ${TOL}
        ${BASELINE}/ImageRegistration1Output.png
        ${TEMP}/ImageRegistration1Output.png
	ImageRegistration1ExampleTest
	${INPUTDATA}/QB_Suburb.png
        ${INPUTDATA}/QB_Suburb13x17y.png
	${TEMP}/ImageRegistration1Output.png
	${TEMP}/ImageRegistration1DifferenceAfter.png
        ${TEMP}/ImageRegistration1DifferenceBefore.png
)

ADD_TEST(ImageRegistration2ExampleTest ${EXE_TESTS}
        --compare-image ${TOL} 
        ${BASELINE}/ImageRegistration2Output.png
        ${TEMP}/ImageRegistration2Output.png
	ImageRegistration2ExampleTest
	${INPUTDATA}/RamsesROISmall.png
        ${INPUTDATA}/ADS40RoiSmall.png
	${TEMP}/ImageRegistration2Output.png
	${TEMP}/ImageRegistration2CheckerboardBefore.png
        ${TEMP}/ImageRegistration2CheckerboardAfter.png
)

ADD_TEST(ImageRegistration5Cas1ExampleTest ${EXE_TESTS}
        --compare-image ${TOL}
        ${BASELINE}/ImageRegistration5Output1.png
        ${TEMP}/ImageRegistration5Output1.png
	ImageRegistration5ExampleTest
	${INPUTDATA}/QB_Suburb.png
        ${INPUTDATA}/QB_SuburbRotated10.png
	${TEMP}/ImageRegistration5Output1.png
	${TEMP}/ImageRegistration5DifferenceAfter1.png
        ${TEMP}/ImageRegistration5DifferenceBefore1.png
)
ADD_TEST(ImageRegistration5Cas2ExampleTest ${EXE_TESTS}
        --compare-image ${TOL}
        ${BASELINE}/ImageRegistration5Output2.png
        ${TEMP}/ImageRegistration5Output2.png
	ImageRegistration5ExampleTest
	${INPUTDATA}/QB_Suburb.png
        ${INPUTDATA}/QB_SuburbR10X13Y17.png
	${TEMP}/ImageRegistration5Output2.png
	${TEMP}/ImageRegistration5DifferenceAfter2.png
        ${TEMP}/ImageRegistration5DifferenceBefore2.png
)


ADD_EXECUTABLE(otbRegistrationExamplesTests otbRegistrationExamplesTests.cxx)
TARGET_LINK_LIBRARIES(otbRegistrationExamplesTests gdal ITKIO ITKAlgorithms ITKStatistics ITKNumerics ITKCommon OTBBasicFilters OTBCommon OTBDisparityMap OTBIO OTBSpatialReasoning OTBChangeDetection OTBFeatureExtraction  OTBLearning  OTBMultiScale)

562
ENDIF( NOT OTB_DISABLE_CXX_TESTING AND BUILD_TESTING )