CMakeLists.txt 37.1 KB
Newer Older
1
2
3
#
# Test CLI executables
#
4
include_regular_expression("^.*$")
5

6
7
8
9
find_package(GenerateCLP REQUIRED)
if(GenerateCLP_FOUND)
  include(${GenerateCLP_USE_FILE})
endif(GenerateCLP_FOUND)
10

11
12
13
14
include_directories(${Slicer3_SOURCE_DIR}/Applications/CLI)
include_directories(${Slicer3_BINARY_DIR}/Applications/CLI)
include_directories(${ModuleDescriptionParser_SOURCE_DIR})
include_directories (${TCLAP_SOURCE_DIR}/include)
15

16
17
18
19
20
21
22
23
#-----------------------------------------------------------------------------
# Configure the default SLICER_BRAINWEB_DATA_ROOT for the location of BrainWeb Data.
# When this data is available, additional 3D tests are enabled.
find_path(SLICER_BRAINWEB_DATA_ROOT brainweb165a10f17.mha 
  DOC "Directory with data taken from http://public.kitware.com/pub/itk/Data/BrainWeb/")
mark_as_advanced(SLICER_BRAINWEB_DATA_ROOT)


24
25
26
#
# Slicer3 is needed to resolve shared libraries
#
27
set(Slicer3_EXE ${Slicer3_BINARY_DIR}/Slicer3 )
28

29
30
set(BASELINE "${Slicer3_SOURCE_DIR}/Testing/Data/Baseline/CLI")
set(TEST_DATA "${Slicer3_SOURCE_DIR}/Testing/Data/Input")
lorensen's avatar
lorensen committed
31
set(MRML_TEST_DATA "${Slicer3_SOURCE_DIR}/Libs/MRML/Testing/TestData")
32
set(TEMP "${Slicer3_BINARY_DIR}/Testing/Temporary")
33

34
set(MRML_DATA "${Slicer3_HOME}/share/MRML/Testing/TestData")
35
36

# OrientImage tests
37
add_test(OrientImageTest1 ${Slicer3_EXE} --launch OrientImageTest
38
  --compare ${BASELINE}/OrientImageTestAxial.nrrd
39
  ${TEMP}/OrientImageTestAxial.nrrd
40
  ModuleEntryPoint
41
42
43
  --orientation Axial ${MRML_DATA}/fixed.nrrd ${TEMP}/OrientImageTestAxial.nrrd
  )
add_test(OrientImageTest2 ${Slicer3_EXE} --launch OrientImageTest
44
  --compare ${BASELINE}/OrientImageTestCoronal.nrrd
45
  ${TEMP}/OrientImageTestCoronal.nrrd
46
  ModuleEntryPoint
47
48
49
  --orientation Coronal ${MRML_DATA}/fixed.nrrd ${TEMP}/OrientImageTestCoronal.nrrd
  )
add_test(OrientImageTest3 ${Slicer3_EXE} --launch OrientImageTest
50
  --compare ${BASELINE}/OrientImageTestSagittal.nrrd
51
  ${TEMP}/OrientImageTestSagittal.nrrd
52
  ModuleEntryPoint
53
54
  --orientation Sagittal ${MRML_DATA}/fixed.nrrd ${TEMP}/OrientImageTestSagittal.nrrd
  )
55

56
57
set (CLP OrientImage)
add_executable(${CLP}Test ${CLP}Test.cxx)
58
target_link_libraries(${CLP}Test ${CLP}Lib)
59

lorensen's avatar
lorensen committed
60
61
62
63
# Add tests
add_test(AddTest ${Slicer3_EXE} --launch AddTest
  --compare ${BASELINE}/AddTest.nhdr
  ${TEMP}/AddTest.nhdr
64
  ModuleEntryPoint
lorensen's avatar
lorensen committed
65
66
  ${TEST_DATA}/CTHeadAxial.nhdr ${TEST_DATA}/CTHeadAxial.nhdr ${TEMP}/AddTest.nhdr
  )
67
68
69
70
71
72
73
74
75
76
77
78
79
80
function(add_module_test pixeltype)
add_test(AddTest_${pixeltype} ${Slicer3_EXE} --launch AddTest
  --compare ${BASELINE}/AddTest_${pixeltype}.mha
  ${TEMP}/AddTest_${pixeltype}.mha
  ModuleEntryPoint
  ${TEST_DATA}/brainSlice${pixeltype}.mha ${TEST_DATA}/brainSlice${pixeltype}.mha ${TEMP}/AddTest_${pixeltype}.mha
  )
endfunction()
add_module_test( CHAR )
add_module_test( UCHAR )
add_module_test( SHORT )
add_module_test( USHORT )
add_module_test( INT )
add_module_test( UINT )
81
82
add_module_test( LONG )
add_module_test( ULONG )
83
84
add_module_test( FLOAT )
add_module_test( DOUBLE )
lorensen's avatar
lorensen committed
85
86
87

set (CLP Add)
add_executable(${CLP}Test ${CLP}Test.cxx)
88
target_link_libraries(${CLP}Test ${CLP}Lib)
89

90
91
92
93
# Mask tests
add_test(MaskTest ${Slicer3_EXE} --launch MaskTest
  --compare ${BASELINE}/MaskedVolume.nrrd
  ${TEMP}/MaskedVolume.nrrd
94
  ModuleEntryPoint --label 1
95
96
97
98
99
  ${TEST_DATA}/CTHeadAxial.nhdr ${TEST_DATA}/CTHeadAxialMask.nrrd ${TEMP}/MaskedVolume.nrrd
  )

set (CLP Mask)
add_executable(${CLP}Test ${CLP}Test.cxx)
100
target_link_libraries(${CLP}Test ${CLP}Lib)
101

102
103
104
105
# Threshold tests
add_test(ThresholdTest ${Slicer3_EXE} --launch ThresholdTest
  --compare ${BASELINE}/ThresholdTest.nhdr
  ${TEMP}/ThresholdTest.nhdr
106
  ModuleEntryPoint --upper 3800 --lower 1400 --outsidevalue 0 --thresholdtype Outside
107
108
109
110
111
  ${TEST_DATA}/CTHeadAxial.nhdr ${TEMP}/ThresholdTest.nhdr
  )

set (CLP Threshold)
add_executable(${CLP}Test ${CLP}Test.cxx)
112
target_link_libraries(${CLP}Test ${CLP}Lib)
lorensen's avatar
lorensen committed
113

naucoin's avatar
naucoin committed
114
115
116
117
# Cast tests
add_test(CastTest ${Slicer3_EXE} --launch CastTest
  --compare ${BASELINE}/CastTest.nrrd
  ${TEMP}/CastTest.nrrd
118
  ModuleEntryPoint --type UnsignedChar
naucoin's avatar
naucoin committed
119
120
  ${TEST_DATA}/CastTest.nrrd ${TEMP}/CastTest.nrrd
  )
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
add_test(CastTestChar ${Slicer3_EXE} --launch CastTest
  --compare ${BASELINE}/CastTestChar.nrrd
  ${TEMP}/CastTestChar.nrrd
  ModuleEntryPoint --type Char
  ${TEST_DATA}/CastTest.nrrd ${TEMP}/CastTestChar.nrrd
  )
add_test(CastTestShort ${Slicer3_EXE} --launch CastTest
  --compare ${BASELINE}/CastTestShort.nrrd
  ${TEMP}/CastTestShort.nrrd
  ModuleEntryPoint --type Short
  ${TEST_DATA}/CastTest.nrrd ${TEMP}/CastTestShort.nrrd
  )
add_test(CastTestUnsignedShort ${Slicer3_EXE} --launch CastTest
  --compare ${BASELINE}/CastTestUnsignedShort.nrrd
  ${TEMP}/CastTestUnsignedShort.nrrd
  ModuleEntryPoint --type UnsignedShort
  ${TEST_DATA}/CastTest.nrrd ${TEMP}/CastTestUnsignedShort.nrrd
  )
add_test(CastTestInt ${Slicer3_EXE} --launch CastTest
  --compare ${BASELINE}/CastTestInt.nrrd
  ${TEMP}/CastTestInt.nrrd
  ModuleEntryPoint --type Int
  ${TEST_DATA}/CastTest.nrrd ${TEMP}/CastTestInt.nrrd
  )
add_test(CastTestUnsignedInt ${Slicer3_EXE} --launch CastTest
  --compare ${BASELINE}/CastTestUnsignedInt.nrrd
  ${TEMP}/CastTestUnsignedInt.nrrd
  ModuleEntryPoint --type UnsignedInt
  ${TEST_DATA}/CastTest.nrrd ${TEMP}/CastTestUnsignedInt.nrrd
  )
add_test(CastTestFloat ${Slicer3_EXE} --launch CastTest
  --compare ${BASELINE}/CastTestFloat.nrrd
  ${TEMP}/CastTestFloat.nrrd
  ModuleEntryPoint --type Float
  ${TEST_DATA}/CastTest.nrrd ${TEMP}/CastTestFloat.nrrd
  )
add_test(CastTestDouble ${Slicer3_EXE} --launch CastTest
  --compare ${BASELINE}/CastTestDouble.nrrd
  ${TEMP}/CastTestDouble.nrrd
  ModuleEntryPoint --type Double
  ${TEST_DATA}/CastTest.nrrd ${TEMP}/CastTestDouble.nrrd
  )
naucoin's avatar
naucoin committed
163
164
set (CLP Cast)
add_executable(${CLP}Test ${CLP}Test.cxx)
165
target_link_libraries(${CLP}Test ${CLP}Lib)
naucoin's avatar
naucoin committed
166
167


lorensen's avatar
lorensen committed
168
169
170
171
# CheckerBoard tests
add_test(CheckerBoardTest ${Slicer3_EXE} --launch CheckerBoardTest
  --compare ${BASELINE}/CheckerBoardTest.nhdr
  ${TEMP}/CheckerBoardTest.nhdr
172
  ModuleEntryPoint --checkerPattern 5,3,2
lorensen's avatar
lorensen committed
173
  ${TEST_DATA}/CTHeadAxial.nhdr ${TEST_DATA}/CTHeadAxialDoubled.nhdr ${TEMP}/CheckerBoardTest.nhdr
lorensen's avatar
lorensen committed
174
175
176
177
  )

set (CLP CheckerBoard)
add_executable(${CLP}Test ${CLP}Test.cxx)
178
target_link_libraries(${CLP}Test ${CLP}Lib)
lorensen's avatar
lorensen committed
179

180
# Median tests
181
add_test(MedianImageFilterTest ${Slicer3_EXE} --launch MedianImageFilterTest
182
  --compare ${BASELINE}/MedianImageFilterTest.nhdr
183
  ${TEMP}/MedianImageFilterTest.nhdr
184
  ModuleEntryPoint
185
186
  --neighborhood 1,2,3 ${TEST_DATA}/CTHeadAxial.nhdr ${TEMP}/MedianImageFilterTest.nhdr
  )
187

188
189
set (CLP MedianImageFilter)
add_executable(${CLP}Test ${CLP}Test.cxx)
190
target_link_libraries(${CLP}Test ${CLP}Lib)
191
192

# GaussianBlur tests
193
add_test(GaussianBlurImageFilterTest ${Slicer3_EXE} --launch GaussianBlurImageFilterTest
194
  --compare ${BASELINE}/GaussianBlurImageFilterTest.nhdr
195
  ${TEMP}/GaussianBlurImageFilterTest.nhdr
196
  ModuleEntryPoint
197
198
199
200
  --sigma 2.5 ${TEST_DATA}/CTHeadAxial.nhdr ${TEMP}/GaussianBlurImageFilterTest.nhdr
  )
set (CLP GaussianBlurImageFilter)
add_executable(${CLP}Test ${CLP}Test.cxx)
201
target_link_libraries(${CLP}Test ${CLP}Lib)
202

203
204
205
206
#
# LinearRegistration tests
#
add_test(LinearRegistrationTest00 ${Slicer3_EXE} --launch LinearRegistrationTest
207
  ModuleEntryPoint
208
209
  --resampledmovingfilename  ${TEMP}/LinearRegistrationTest00.nhdr
  --outputtransform ${TEMP}/LinearRegistrationTest00Transform.txt 
210
211
212
213
214
215
216
217
218
219
  --initialtransform ${TEST_DATA}/itkAffineTransform00.txt
  --spatialsamples 10000
  --histogrambins 32
  --iterations 50
  --learningrate 0.01
  --translationscale 100
  ${TEST_DATA}/CTHeadAxial.nhdr 
  ${TEST_DATA}/CTHeadAxial.nhdr 
  )
add_test(LinearRegistrationTest01 ${Slicer3_EXE} --launch LinearRegistrationTest
220
  ModuleEntryPoint
221
222
223
  --resampledmovingfilename  ${TEMP}/LinearRegistrationTest01.nhdr
  --outputtransform ${TEMP}/LinearRegistrationTest01Transform.txt 
  --spatialsamples 10000
224
  --histogrambins 100
225
  --iterations 50
226
  --learningrate 0.001
227
228
229
230
231
  --translationscale 100
  ${TEST_DATA}/CTHeadAxial.nhdr 
  ${TEST_DATA}/CTHeadAxial.nhdr 
  )
add_test(LinearRegistrationTest02 ${Slicer3_EXE} --launch LinearRegistrationTest
232
  ModuleEntryPoint
233
234
235
236
237
238
239
240
241
242
243
  --resampledmovingfilename  ${TEMP}/LinearRegistrationTest02.nhdr
  --outputtransform ${TEMP}/LinearRegistrationTest02Transform.txt 
  --spatialsamples 10000
  --histogrambins 32
  --iterations 50
  --learningrate 0.01
  --translationscale 100
  ${TEST_DATA}/CTHeadAxial.nhdr 
  ${TEST_DATA}/CTHeadAxial.nhdr 
  )
add_test(LinearRegistrationTest03 ${Slicer3_EXE} --launch LinearRegistrationTest
244
  ModuleEntryPoint
245
246
247
248
249
250
251
252
253
254
255
  --resampledmovingfilename  ${TEMP}/LinearRegistrationTest03.nhdr
  --outputtransform ${TEMP}/LinearRegistrationTest03Transform.txt 
  --spatialsamples 10000
  --histogrambins 32
  --iterations 50
  --learningrate 0.01
  --translationscale 100
  ${TEST_DATA}/CTHeadAxial.nhdr 
  ${TEST_DATA}/CTHeadAxial.nhdr 
  )
add_test(LinearRegistrationTest04 ${Slicer3_EXE} --launch LinearRegistrationTest
256
  ModuleEntryPoint
257
258
  --resampledmovingfilename  ${TEMP}/LinearRegistrationTest04.nhdr
  --outputtransform ${TEMP}/LinearRegistrationTest04Transform.txt 
259
260
261
262
263
  --spatialsamples 10000
  --histogrambins 32
  --iterations 50
  --learningrate 0.01
  --translationscale 100
264
265
266
267
268
  ${TEST_DATA}/CTHeadAxial.nhdr 
  ${TEST_DATA}/CTHeadAxial.nhdr 
  )
set (CLP LinearRegistration)
add_executable(${CLP}Test ${CLP}Test.cxx)
269
target_link_libraries(${CLP}Test ${CLP}Lib)
270
271

if(SLICER_BRAINWEB_DATA_ROOT)
272
add_test(LinearRegistrationTest05 ${Slicer3_EXE} --launch LinearRegistrationTest
273
  ModuleEntryPoint
274
275
  --resampledmovingfilename  ${TEMP}/LinearRegistrationTest05.nhdr
  --outputtransform ${TEMP}/LinearRegistrationTest05Transform.txt 
276
277
278
279
280
281
282
283
284
  --spatialsamples 10000
  --histogrambins 32
  --iterations 50
  --learningrate 0.01
  --translationscale 100
  ${SLICER_BRAINWEB_DATA_ROOT}/brainweb165a10f17.mha
  ${SLICER_BRAINWEB_DATA_ROOT}/brainweb165a10f17Rot10Tx15.mha
  )

285
add_test(LinearRegistrationTest06 ${Slicer3_EXE} --launch LinearRegistrationTest
286
  ModuleEntryPoint
287
288
  --resampledmovingfilename  ${TEMP}/LinearRegistrationTest06.nhdr
  --outputtransform ${TEMP}/LinearRegistrationTest06Transform.txt 
289
290
291
292
293
  --spatialsamples 50000
  --histogrambins 50
  --iterations 100
  --learningrate 0.01
  --translationscale 100
294
295
296
297
  ${SLICER_BRAINWEB_DATA_ROOT}/brainweb165a10f17.mha
  ${SLICER_BRAINWEB_DATA_ROOT}/brainweb165a10f17Rot10Tx15.mha
  )

298
add_test(LinearRegistrationTest07 ${Slicer3_EXE} --launch LinearRegistrationTest
299
  ModuleEntryPoint
300
301
302
303
304
305
306
307
308
309
310
311
312
  --resampledmovingfilename  ${TEMP}/LinearRegistrationTest07.nhdr
  --outputtransform ${TEMP}/LinearRegistrationTest07Transform.txt 
  --initialtransform ${TEST_DATA}/itkAffineTransform01.txt
  --spatialsamples 10000
  --histogrambins 32
  --iterations 50
  --learningrate 0.01
  --translationscale 100
  ${SLICER_BRAINWEB_DATA_ROOT}/brainweb165a10f17.mha
  ${SLICER_BRAINWEB_DATA_ROOT}/brainweb165a10f17.mha
  )

add_test(LinearRegistrationTest08 ${Slicer3_EXE} --launch LinearRegistrationTest
313
  ModuleEntryPoint
314
315
316
317
318
319
320
321
322
323
324
325
326
  --resampledmovingfilename  ${TEMP}/LinearRegistrationTest08.nhdr
  --outputtransform ${TEMP}/LinearRegistrationTest08Transform.txt 
  --initialtransform ${TEST_DATA}/itkAffineTransform02.txt
  --spatialsamples 10000
  --histogrambins 32
  --iterations 50
  --learningrate 0.01
  --translationscale 100
  ${SLICER_BRAINWEB_DATA_ROOT}/brainweb165a10f17.mha
  ${SLICER_BRAINWEB_DATA_ROOT}/brainweb165a10f17.mha
  )

add_test(LinearRegistrationTest09 ${Slicer3_EXE} --launch LinearRegistrationTest
327
  ModuleEntryPoint
328
329
330
331
332
333
334
335
336
337
338
339
  --resampledmovingfilename  ${TEMP}/LinearRegistrationTest09.nhdr
  --outputtransform ${TEMP}/LinearRegistrationTest09Transform.txt 
  --initialtransform ${TEST_DATA}/itkAffineTransform03.txt
  --spatialsamples 10000
  --histogrambins 32
  --iterations 50
  --learningrate 0.01
  --translationscale 100
  ${SLICER_BRAINWEB_DATA_ROOT}/brainweb165a10f17.mha
  ${SLICER_BRAINWEB_DATA_ROOT}/brainweb165a10f17.mha
  )

340
341
endif(SLICER_BRAINWEB_DATA_ROOT)

342
343
344
345
#
# BSplineDeformableRegistration tests
#
add_test(BSplineRegistrationTest00 ${Slicer3_EXE} --launch BSplineDeformableRegistrationTest
346
  ModuleEntryPoint
347
348
349
350
351
352
353
354
355
356
357
358
359
360
  --resampledmovingfilename  ${TEMP}/BSplineDeformableRegistrationTest00.nhdr
  --outputtransform ${TEMP}/BSplineDeformableRegistrationTest00Transform.txt 
  --default 0
  --maximumDeformation 1.0
  --constrain
  --spatialsamples 10000
  --histogrambins 32
  --gridSize 5
  --iterations 50
  ${TEST_DATA}/CTHeadAxial.nhdr 
  ${TEST_DATA}/CTHeadAxial.nhdr 
  )
set (CLP BSplineDeformableRegistration)
add_executable(${CLP}Test ${CLP}Test.cxx)
361
target_link_libraries(${CLP}Test ${CLP}Lib)
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376

if(SLICER_BRAINWEB_DATA_ROOT)

add_executable(BSplineWarping3DTest BSplineWarping3DTest.cxx)
target_link_libraries(BSplineWarping3DTest ITKIO ITKNumerics)

add_test(BSplineWarping3DTest00 
  ${Slicer3_BINARY_DIR}/bin/BSplineWarping3DTest
  ${TEST_DATA}/BSplineDisplacements3D_00.txt
  ${SLICER_BRAINWEB_DATA_ROOT}/brainweb1e1a10f20.mha
  ${SLICER_BRAINWEB_DATA_ROOT}/brainweb1e1a10f20.mha
  ${TEMP}/BSplineWarping3DTest00.mhd
)

add_test(BSplineRegistrationTest01 ${Slicer3_EXE} --launch BSplineDeformableRegistrationTest
377
  ModuleEntryPoint
378
379
380
381
382
383
384
385
386
387
388
389
390
391
  --resampledmovingfilename  ${TEMP}/BSplineDeformableRegistrationTest01.nhdr
  --outputtransform ${TEMP}/BSplineDeformableRegistrationTest01Transform.txt 
  --default 0
  --maximumDeformation 1.0
  --constrain
  --spatialsamples 10000
  --histogrambins 32
  --gridSize 5
  --iterations 50
  ${SLICER_BRAINWEB_DATA_ROOT}/brainweb165a10f17.mha
  ${TEMP}/BSplineWarping3DTest00.mhd
  )

add_test(BSplineRegistrationTest02 ${Slicer3_EXE} --launch BSplineDeformableRegistrationTest
392
  ModuleEntryPoint
393
394
395
396
397
398
399
400
401
402
403
404
405
406
  --resampledmovingfilename  ${TEMP}/BSplineDeformableRegistrationTest02.nhdr
  --outputtransform ${TEMP}/BSplineDeformableRegistrationTest02Transform.txt 
  --default 0
  --maximumDeformation 1.0
  --constrain
  --spatialsamples 10000
  --histogrambins 32
  --gridSize 20
  --iterations 500
  ${SLICER_BRAINWEB_DATA_ROOT}/brainweb165a10f17.mha
  ${TEMP}/BSplineWarping3DTest00.mhd
  )

add_test(BSplineRegistrationTest03 ${Slicer3_EXE} --launch BSplineDeformableRegistrationTest
407
  ModuleEntryPoint
408
409
410
411
412
413
414
415
416
417
418
419
420
421
  --resampledmovingfilename  ${TEMP}/BSplineDeformableRegistrationTest03.nhdr
  --outputtransform ${TEMP}/BSplineDeformableRegistrationTest03Transform.txt 
  --default 0
  --maximumDeformation 5.0
  --constrain
  --spatialsamples 20000
  --histogrambins 32
  --gridSize 5
  --iterations 500
  ${SLICER_BRAINWEB_DATA_ROOT}/brainweb165a10f17.mha
  ${TEMP}/BSplineWarping3DTest00.mhd
  )

add_test(BSplineRegistrationTest04 ${Slicer3_EXE} --launch BSplineDeformableRegistrationTest
422
  ModuleEntryPoint
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
  --resampledmovingfilename  ${TEMP}/BSplineDeformableRegistrationTest04.nhdr
  --outputtransform ${TEMP}/BSplineDeformableRegistrationTest04Transform.txt 
  --default 0
  --maximumDeformation 5.0
  --constrain
  --spatialsamples 40000
  --histogrambins 32
  --gridSize 5
  --iterations 500
  ${SLICER_BRAINWEB_DATA_ROOT}/brainweb165a10f17.mha
  ${TEMP}/BSplineWarping3DTest00.mhd
  )


endif(SLICER_BRAINWEB_DATA_ROOT)
438
439

# TestGridTransformRegistration tests
440
add_test(TestGridTransformRegistrationTest00 ${Slicer3_EXE} --launch TestGridTransformRegistrationTest
441
  ModuleEntryPoint
442
443
  --gridSize 5 
  --outputtransform ${TEMP}/TestGridTransformRegistrationTest00Transform.txt 
444
445
  ${TEST_DATA}/CTHeadAxial.nhdr 
  ${TEST_DATA}/CTHeadAxial.nhdr 
446
447
448
  )
set (CLP TestGridTransformRegistration)
add_executable(${CLP}Test ${CLP}Test.cxx)
449
target_link_libraries(${CLP}Test ${CLP}Lib)
450

451
452
##################################
# AffineRegistration tests
millerjv's avatar
millerjv committed
453
add_test(AffineRegistrationTest000 ${Slicer3_EXE} --launch AffineRegistrationTest
454
  ModuleEntryPoint  --help
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
add_test(AffineRegistrationTest00 ${Slicer3_EXE} --launch AffineRegistrationTest
  ModuleEntryPoint
  --resampledmovingfilename  ${TEMP}/AffineRegistrationTest00.nhdr
  --outputtransform ${TEMP}/AffineRegistrationTest00Transform.txt 
  --initialtransform ${TEST_DATA}/itkAffineTransform00.txt
  --spatialsamples 10000
  --histogrambins 32
  --iterations 50
 --translationscale 100
  ${TEST_DATA}/CTHeadAxial.nhdr 
  ${TEST_DATA}/CTHeadAxial.nhdr 
  )
add_test(AffineRegistrationTest01 ${Slicer3_EXE} --launch AffineRegistrationTest
  ModuleEntryPoint
  --resampledmovingfilename  ${TEMP}/AffineRegistrationTest01.nhdr
  --outputtransform ${TEMP}/AffineRegistrationTest01Transform.txt 
  --spatialsamples 10000
  --histogrambins 100
  --iterations 50
 --translationscale 100
  ${TEST_DATA}/CTHeadAxial.nhdr 
  ${TEST_DATA}/CTHeadAxial.nhdr 
  )
add_test(AffineRegistrationTest02 ${Slicer3_EXE} --launch AffineRegistrationTest
  ModuleEntryPoint
  --resampledmovingfilename  ${TEMP}/AffineRegistrationTest02.nhdr
  --outputtransform ${TEMP}/AffineRegistrationTest02Transform.txt 
  --spatialsamples 10000
  --histogrambins 32
  --iterations 50
 --translationscale 100
  ${TEST_DATA}/CTHeadAxial.nhdr 
  ${TEST_DATA}/CTHeadAxial.nhdr 
  )
490
491
set (CLP AffineRegistration)
add_executable(${CLP}Test ${CLP}Test.cxx)
492
target_link_libraries(${CLP}Test ${CLP}Lib)
493
494
495
496

##################################
# ConfidenceConnected tests
add_test(ConfidenceConnectedTest ${Slicer3_EXE} --launch ConfidenceConnectedTest
497
  --compare ${BASELINE}/ConfidenceConnectedTest.nhdr
498
            ${TEMP}/ConfidenceConnectedTest.nhdr
499
    ModuleEntryPoint
500
501
502
503
504
505
506
507
508
    --smoothingIterations 1
    --timestep 0.0625
    --iterations 5
    --multiplier 2.5
    --neighborhood 1
    --labelvalue 2
    --seed 9.71622,-8.1,14.2189 --seed -12.9459,-8.1,18.577
    ${TEST_DATA}/MRHeadResampled.nhdr
    ${TEMP}/ConfidenceConnectedTest.nhdr
509
510
511
512
  )

set (CLP ConfidenceConnected)
add_executable(${CLP}Test ${CLP}Test.cxx)
513
target_link_libraries(${CLP}Test ${CLP}Lib)
514
515
516

##################################
# CurvatureAnisotropicDiffusion tests
517
518
set (CLP CurvatureAnisotropicDiffusion)
add_executable(${CLP}Test ${CLP}Test.cxx)
519
target_link_libraries(${CLP}Test ${CLP}Lib)
520
521
522
523

add_test(${CLP}Test ${Slicer3_EXE} --launch ${CLP}Test
  --compare ${BASELINE}/${CLP}Test.nhdr
            ${TEMP}/${CLP}Test.nhdr
524
    ModuleEntryPoint
525
526
527
528
    --conductance 2
    --timeStep 0.0625
    --iterations 2
    ${TEST_DATA}/MRHeadResampled.nhdr
529
    ${TEMP}/${CLP}Test.nhdr
530
531
532
533
534
  )

##################################
# DiffusionTensorEstimation tests
add_test(DiffusionTensorEstimationTest ${Slicer3_EXE} --launch DiffusionTensorEstimationTest
535
536
537
538
539
540
  DiffusionTensorEstimationTest
    --otsuomegathreshold 0.5
    ${MRML_TEST_DATA}/helix-DWI.nhdr
    ${TEMP}/DiffusionTensorEstimationTest_dti.nhdr
    ${TEMP}/DiffusionTensorEstimationTest_baseline.nhdr
    ${TEMP}/DiffusionTensorEstimationTest_otsu.nhdr  )
541
542
543
544

set (CLP DiffusionTensorEstimation)
add_executable(${CLP}Test ${CLP}Test.cxx)
add_dependencies(${CLP}Test ${CLP})
545
target_link_libraries (${CLP}Test MRML vtkTeem SlicerBaseLogic)
546
547
548
549
550
551
552
553
554
include_directories(
  ${vtkITK_SOURCE_DIR} 
  ${vtkITK_BINARY_DIR} 
  ${MRML_SOURCE_DIR} ${MRML_BINARY_DIR} 
  ${vtkTeem_SOURCE_DIR}  ${vtkTeem_BINARY_DIR})

##################################
# DiffusionTensorMathematics tests
add_test(DiffusionTensorMathematicsTest ${Slicer3_EXE} --launch DiffusionTensorMathematicsTest
555
556
  DiffusionTensorMathematicsTest
    --enumeration FractionalAnisotropy
557
    ${MRML_TEST_DATA}/helix-DTI.nhdr
558
    ${TEMP}/DiffusionTensorMathematicsTest.nhdr
559
560
561
562
563
  )

set (CLP DiffusionTensorMathematics)
add_executable(${CLP}Test ${CLP}Test.cxx)
add_dependencies(${CLP}Test ${CLP})
564
target_link_libraries (${CLP}Test MRML vtkTeem SlicerBaseLogic)
565
566
567

##################################
# DiffusionTensorTest tests
lorensen's avatar
lorensen committed
568
569
set (CLP DiffusionTensorTest)
add_test(${CLP}Test ${Slicer3_EXE} --launch ${CLP}Test
570
  ModuleEntryPoint
lorensen's avatar
lorensen committed
571
572
    ${MRML_TEST_DATA}/helix-DTI.nhdr
    ${TEMP}/DiffusionTensorTestTest.nhdr
573
574
575
)

add_executable(${CLP}Test ${CLP}Test.cxx)
576
target_link_libraries(${CLP}Test ${CLP}Lib)
577

578
579
580
##################################
# DiffusionWeightedTest tests
add_test(DiffusionWeightedTestTest ${Slicer3_EXE} --launch DiffusionWeightedTestTest
581
  ModuleEntryPoint
lorensen's avatar
lorensen committed
582
583
    ${MRML_TEST_DATA}/helix-DWI.nhdr
    ${TEMP}/DiffusionWeightedTestTest.nhdr
584
585
586
587
  )

set (CLP DiffusionWeightedTest)
add_executable(${CLP}Test ${CLP}Test.cxx)
588
target_link_libraries(${CLP}Test ${CLP}Lib)
589
590
591

##################################
# DWIDicomLoad tests
naucoin's avatar
naucoin committed
592
593
594
595
596
597
598
599
# add_test(DWIDicomLoadTest ${Slicer3_EXE} --launch DWIDicomLoadTest
#  DWIDicomLoadTest --help
#  )

# set (CLP DWIDicomLoad)
# add_executable(${CLP}Test ${CLP}Test.cxx)
# add_dependencies(${CLP}Test ${CLP})
# target_link_libraries(${CLP}Test ITKIO)
600
601
602
603

##################################
# ExecutionModelTour tests
add_test(ExecutionModelTourTest ${Slicer3_EXE} --launch ExecutionModelTourTest
604
605
606
607
608
609
610
611
612
613
614
  ExecutionModelTourTest
    --integer 30
    --double 30
    -f 1.3,2,-14
    --string_vector foo,bar,foobar
    --enumeration Bill
    --boolean1
    --transform1 ${TEST_DATA}/ExecutionModelTourTest.mrml\#vtkMRMLLinearTransformNode1
    --transform2 ${TEST_DATA}/ExecutionModelTourTest.mrml\#vtkMRMLLinearTransformNode2
    ${TEST_DATA}/MRHeadResampled.nhdr
    ${TEST_DATA}/CTHeadAxial.nhdr
615
616
617
618
619
  )

set (CLP ExecutionModelTour)
add_executable(${CLP}Test ${CLP}Test.cxx)
add_dependencies(${CLP}Test ${CLP})
620
target_link_libraries(${CLP}Test MRML)
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635

##################################
# FreesurferSurfaceSectionExtraction tests
add_test(FreesurferSurfaceSectionExtractionTest ${Slicer3_EXE} --launch FreesurferSurfaceSectionExtractionTest
  FreesurferSurfaceSectionExtractionTest --help
  )

set (CLP FreesurferSurfaceSectionExtraction)
add_executable(${CLP}Test ${CLP}Test.cxx)
add_dependencies(${CLP}Test ${CLP})
target_link_libraries(${CLP}Test ITKIO)

##################################
# GradientAnisotropicDiffusion tests
add_test(GradientAnisotropicDiffusionTest ${Slicer3_EXE} --launch GradientAnisotropicDiffusionTest
lorensen's avatar
lorensen committed
636
637
  --compare ${BASELINE}/GradientAnisotropicDiffusionTest.nhdr
            ${TEMP}/GradientAnisotropicDiffusionTest.nhdr
638
  ModuleEntryPoint
lorensen's avatar
lorensen committed
639
640
641
642
643
    --conductance 2
    --timeStep 0.0625
    --iterations 2
    ${TEST_DATA}/MRHeadResampled.nhdr
    ${TEMP}/GradientAnisotropicDiffusionTest.nhdr
644
645
646
647
  )

set (CLP GradientAnisotropicDiffusion)
add_executable(${CLP}Test ${CLP}Test.cxx)
648
target_link_libraries(${CLP}Test ${CLP}Lib)
649
650
651
652

##################################
# GrayscaleFillHoleImageFilter tests
add_test(GrayscaleFillHoleImageFilterTest ${Slicer3_EXE} --launch GrayscaleFillHoleImageFilterTest
lorensen's avatar
lorensen committed
653
654
  --compare ${BASELINE}/GrayscaleFillHoleTest.nhdr
            ${TEMP}/GrayscaleFillHoleTest.nhdr
655
  ModuleEntryPoint
lorensen's avatar
lorensen committed
656
657
    ${TEST_DATA}/MRHeadResampled.nhdr
    ${TEMP}/GrayscaleFillHoleTest.nhdr
658
659
660
661
  )

set (CLP GrayscaleFillHoleImageFilter)
add_executable(${CLP}Test ${CLP}Test.cxx)
662
target_link_libraries(${CLP}Test ${CLP}Lib)
663
664
665
666

##################################
# GrayscaleGrindPeakImageFilter tests
add_test(GrayscaleGrindPeakImageFilterTest ${Slicer3_EXE} --launch GrayscaleGrindPeakImageFilterTest
lorensen's avatar
lorensen committed
667
668
  --compare ${BASELINE}/GrayscaleGrindPeakTest.nhdr
            ${TEMP}/GrayscaleGrindPeakTest.nhdr
669
  ModuleEntryPoint
lorensen's avatar
lorensen committed
670
671
    ${TEST_DATA}/MRHeadResampled.nhdr
    ${TEMP}/GrayscaleGrindPeakTest.nhdr
672
673
674
675
  )

set (CLP GrayscaleGrindPeakImageFilter)
add_executable(${CLP}Test ${CLP}Test.cxx)
676
target_link_libraries(${CLP}Test ${CLP}Lib)
677
678
679
680

##################################
# GrayscaleModelMaker tests
add_test(GrayscaleModelMakerTest ${Slicer3_EXE} --launch GrayscaleModelMakerTest
lorensen's avatar
lorensen committed
681
682
683
684
685
686
687
688
689
  GrayscaleModelMakerTest
    --threshold 300
    --name CTFace
    --smooth 15
    --decimate 0.95
    --splitnormals
    --pointnormals
    ${TEST_DATA}/CTHeadAxial.nhdr
    ${TEMP}GrayscaleModelMakerTest.vtp
690
691
692
693
694
695
  )

set (CLP GrayscaleModelMaker)
add_executable(${CLP}Test ${CLP}Test.cxx)
add_dependencies(${CLP}Test ${CLP})
target_link_libraries(${CLP}Test
696
  vtkITK
697
698
699
  ITKIO
  ModuleDescriptionParser
  SlicerBaseCLI
700
  vtkHybrid
701
)
702

703
704
705
##################################
# HistogramMatching tests
add_test(HistogramMatchingTest ${Slicer3_EXE} --launch HistogramMatchingTest
lorensen's avatar
lorensen committed
706
707
  --compare ${BASELINE}/HistogramMatchingTest.nhdr
            ${TEMP}/HistogramMatchingTest.nhdr
708
  ModuleEntryPoint
lorensen's avatar
lorensen committed
709
710
711
712
713
    --numberOfHistogramLevels 64
    --numberOfMatchPoints 10
    ${TEST_DATA}/CTHeadAxial.nhdr
    ${TEST_DATA}/MRHeadResampled.nhdr
    ${TEMP}/HistogramMatchingTest.nhdr
714
715
716
717
  )

set (CLP HistogramMatching)
add_executable(${CLP}Test ${CLP}Test.cxx)
718
target_link_libraries(${CLP}Test ${CLP}Lib)
719
720
721
722
723
724
725
726
727
728

##################################
# ImageLabelCombine tests
add_test(ImageLabelCombineTest ${Slicer3_EXE} --launch ImageLabelCombineTest
  ImageLabelCombineTest --help
  )

set (CLP ImageLabelCombine)
add_executable(${CLP}Test ${CLP}Test.cxx)
add_dependencies(${CLP}Test ${CLP})
729
target_link_libraries(${CLP}Test  ITKIO ITKBasicFilters)
730
731
732
733

##################################
# ImageReadDicomWrite tests
add_test(ImageReadDicomWriteTest ${Slicer3_EXE} --launch ImageReadDicomWriteTest
lorensen's avatar
lorensen committed
734
735
  --compare ${BASELINE}/ImageReadDicomWriteTest.dcm
            ${TEMP}/CTHeadAxialDicom40.dcm
736
  ModuleEntryPoint
lorensen's avatar
lorensen committed
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
    --patientName Austrialian
    --patientID 8775070
    --patientComments "A volunteer"
    --studyID 123456
    --studyDate 20090102
    --studyComments Resampled
    --studyDescription None
    --modality CT
    --manufacturer "GE Medical Systems"
    --model CT8800
    --seriesNumber 123456
    --seriesDescription None
    --dicomDirectory ${TEMP}
    --dicomPrefix CTHeadAxialDicom
    ${TEST_DATA}/CTHeadAxial.nhdr
752
753
754
755
  )

set (CLP ImageReadDicomWrite)
add_executable(${CLP}Test ${CLP}Test.cxx)
756
target_link_libraries(${CLP}Test ${CLP}Lib)
757
758
759
760

##################################
# LabelMapSmoothing tests
add_test(LabelMapSmoothingTest ${Slicer3_EXE} --launch LabelMapSmoothingTest
lorensen's avatar
lorensen committed
761
762
  --compare ${BASELINE}/LabelMapSmoothingTest.nhdr
            ${TEMP}/LabelMapSmoothingTest.nhdr
763
  ModuleEntryPoint
lorensen's avatar
lorensen committed
764
765
766
767
768
769
    --labelToSmooth 1
    --numberOfIterations 50
    --maxRMSError 0.01
    --gaussianSigma 3
   ${TEST_DATA}/CTHeadResampledOtsuSegmented.nhdr
   ${TEMP}/LabelMapSmoothingTest.nhdr
770
771
772
773
  )

set (CLP LabelMapSmoothing)
add_executable(${CLP}Test ${CLP}Test.cxx)
774
target_link_libraries(${CLP}Test ${CLP}Lib)
775
776
777

##################################
# ModelMaker tests
lorensen's avatar
lorensen committed
778
779
780

CONFIGURE_FILE(${TEST_DATA}/ModelMakerTest.mrml
    ${TEMP}/ModelMakerTest.mrml IMMEDIATE) 
781
add_test(ModelMakerTest ${Slicer3_EXE} --launch ModelMakerTest
lorensen's avatar
lorensen committed
782
783
784
785
  ModelMakerTest
    --labels 2
    --modelSceneFile ${TEMP}/ModelMakerTest.mrml\#vtkMRMLModelHierarchyNode1
    ${MRML_TEST_DATA}/helix-roi-lable2.nrrd
786
  )
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
add_test(ModelMakerGenerateAllOneLabelTest ${Slicer3_EXE} --launch ModelMakerTest
  ModelMakerTest
    --generateAll
    --modelSceneFile ${TEMP}/ModelMakerTest.mrml\#vtkMRMLModelHierarchyNode1
    ${MRML_TEST_DATA}/helix-roi-lable2.nrrd
  )
add_test(ModelMakerGenerateAllThreeLabelsTest ${Slicer3_EXE} --launch ModelMakerTest
  ModelMakerTest
    --generateAll
    --modelSceneFile ${TEMP}/ModelMakerTest.mrml\#vtkMRMLModelHierarchyNode1
    ${MRML_TEST_DATA}/helixMask3Labels.nrrd
  )
add_test(ModelMakerStartEndTest ${Slicer3_EXE} --launch ModelMakerTest
  ModelMakerTest
    --start 1 --end 5
    --modelSceneFile ${TEMP}/ModelMakerTest.mrml\#vtkMRMLModelHierarchyNode1
    ${MRML_TEST_DATA}/helixMask3Labels.nrrd
  )
add_test(ModelMakerLabelsTest ${Slicer3_EXE} --launch ModelMakerTest
  ModelMakerTest
    --labels 3,1,5
    --modelSceneFile ${TEMP}/ModelMakerTest.mrml\#vtkMRMLModelHierarchyNode1
    ${MRML_TEST_DATA}/helixMask3Labels.nrrd
  )
811
812
813
814
set (CLP ModelMaker)
add_executable(${CLP}Test ${CLP}Test.cxx)
add_dependencies(${CLP}Test ${CLP})
target_link_libraries(${CLP}Test
815
  vtkITK
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
  ModuleDescriptionParser
  MRML
  SlicerBaseLogic
  SlicerBaseCLI
  )

##################################
# MultipleModelsExample tests
add_test(MultipleModelsExampleTest ${Slicer3_EXE} --launch MultipleModelsExampleTest
  MultipleModelsExampleTest --help
  )

set (CLP MultipleModelsExample)
add_executable(${CLP}Test ${CLP}Test.cxx)
add_dependencies(${CLP}Test ${CLP})
target_link_libraries(${CLP}Test
832
  vtkITK
833
834
835
836
837
838
839
840
841
  ModuleDescriptionParser
  MRML
  SlicerBaseLogic
  SlicerBaseCLI
  )

##################################
# OtsuThresholdImageFilter tests
add_test(OtsuThresholdImageFilterTest ${Slicer3_EXE} --launch OtsuThresholdImageFilterTest
842
843
  --compare ${BASELINE}/OtsuThresholdImageFilterTest.nhdr 
            ${TEMP}/OtsuThresholdImageFilterTest.nhdr 
844
   ModuleEntryPoint
845
846
847
848
849
    --insideValue 0
    --outsideValue 255
    --numberOfBins 128 
   ${TEST_DATA}/CTHeadResampled.nhdr
   ${TEMP}/OtsuThresholdImageFilterTest.nhdr 
850
851
852
853
854
  )

set (CLP OtsuThresholdImageFilter)
add_executable(${CLP}Test ${CLP}Test.cxx)
add_dependencies(${CLP}Test ${CLP})
855
target_link_libraries(${CLP}Test ${CLP}Lib)
856
857
858
859

##################################
# OtsuThresholdSegmentation tests
add_test(OtsuThresholdSegmentationTest ${Slicer3_EXE} --launch OtsuThresholdSegmentationTest
860
861
  --compare ${BASELINE}/OtsuThresholdSegmentationTest.nhdr 
            ${TEMP}/OtsuThresholdSegmentationTest.nhdr 
862
  ModuleEntryPoint
lorensen's avatar
lorensen committed
863
864
865
866
867
    --brightObjects
    --numberOfBins 128
    --faceConnected
    --minimumObjectSize 1000
   ${TEST_DATA}/CTHeadResampled.nhdr
868
   ${TEMP}/OtsuThresholdSegmentationTest.nhdr 
869
870
871
872
873
)

set (CLP OtsuThresholdSegmentation)
add_executable(${CLP}Test ${CLP}Test.cxx)
add_dependencies(${CLP}Test ${CLP})
874
target_link_libraries(${CLP}Test ${CLP}Lib)
875
876
877
878

##################################
# ResampleVolume2 tests
add_test(ResampleVolume2Test ${Slicer3_EXE} --launch ResampleVolume2Test
lorensen's avatar
lorensen committed
879
880
881
  --compare 
    ${TEST_DATA}/MRHeadResampled.nhdr
    ${TEMP}/ResampleVolume2Test.nhdr
882
  ModuleEntryPoint
lorensen's avatar
lorensen committed
883
884
885
886
887
888
889
890
891
892
893
894
895
    --Reference ${TEST_DATA}/MRHeadResampled.nhdr
    --number_of_thread 0
    --transform_matrix 1,0,0,0,1,0,0,0,1,0,0,0
    --transform rt
    --space LPS
    --interpolation linear
    --window_function c
    --spline_order 3
    --spacing 0,0,0
    --size 0,0,0
    --direction_matrix 0,0,0,0,0,0,0,0,0
    ${TEST_DATA}/MRHeadResampled.nhdr
    ${TEMP}/ResampleVolume2Test.nhdr
896
897
898
899
  )

set (CLP ResampleVolume2)
add_executable(${CLP}Test ${CLP}Test.cxx)
900
target_link_libraries(${CLP}Test ${CLP}Lib)
901
902
903
904

##################################
# ResampleVolume tests
add_test(ResampleVolumeTest ${Slicer3_EXE} --launch ResampleVolumeTest
lorensen's avatar
lorensen committed
905
906
  --compare ${BASELINE}/ResampleVolumeTest.nhdr
            ${TEMP}/ResampleVolumeTest.nhdr
907
  ModuleEntryPoint
lorensen's avatar
lorensen committed
908
909
910
911
    --spacing 5,5,5
    --interpolation linear
   ${TEST_DATA}/MRHeadResampled.nhdr 
   ${TEMP}/ResampleVolumeTest.nhdr
912
913
914
915
  )

set (CLP ResampleVolume)
add_executable(${CLP}Test ${CLP}Test.cxx)
916
target_link_libraries(${CLP}Test ${CLP}Lib)
917
918
919

##################################
# RigidRegistration tests
millerjv's avatar
millerjv committed
920
add_test(RigidRegistrationTest000 ${Slicer3_EXE} --launch RigidRegistrationTest
921
  ModuleEntryPoint --help
922
  )
millerjv's avatar
millerjv committed
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
add_test(RigidRegistrationTest00 ${Slicer3_EXE} --launch RigidRegistrationTest
  ModuleEntryPoint
  --resampledmovingfilename  ${TEMP}/RigidRegistrationTest00.nhdr
  --outputtransform ${TEMP}/RigidRegistrationTest00Transform.txt 
  --initialtransform ${TEST_DATA}/itkAffineTransform00.txt
  --spatialsamples 10000
  --histogrambins 32
  --iterations 50
  --learningrate 0.01
  --translationscale 100
  ${TEST_DATA}/CTHeadAxial.nhdr 
  ${TEST_DATA}/CTHeadAxial.nhdr 
  )
add_test(RigidRegistrationTest01 ${Slicer3_EXE} --launch RigidRegistrationTest
  ModuleEntryPoint
  --resampledmovingfilename  ${TEMP}/RigidRegistrationTest01.nhdr
  --outputtransform ${TEMP}/RigidRegistrationTest01Transform.txt 
  --spatialsamples 10000
  --histogrambins 100
  --iterations 50
  --learningrate 0.001
  --translationscale 100
  ${TEST_DATA}/CTHeadAxial.nhdr 
  ${TEST_DATA}/CTHeadAxial.nhdr 
  )
add_test(RigidRegistrationTest02 ${Slicer3_EXE} --launch RigidRegistrationTest
  ModuleEntryPoint
  --resampledmovingfilename  ${TEMP}/RigidRegistrationTest02.nhdr
  --outputtransform ${TEMP}/RigidRegistrationTest02Transform.txt 
  --spatialsamples 10000
  --histogrambins 32
  --iterations 50
  --learningrate 0.01
  --translationscale 100
  ${TEST_DATA}/CTHeadAxial.nhdr 
  ${TEST_DATA}/CTHeadAxial.nhdr 
  )
add_test(RigidRegistrationTest03 ${Slicer3_EXE} --launch RigidRegistrationTest
  ModuleEntryPoint
  --resampledmovingfilename  ${TEMP}/RigidRegistrationTest03.nhdr
  --outputtransform ${TEMP}/RigidRegistrationTest03Transform.txt 
  --spatialsamples 10000
  --histogrambins 32
  --iterations 50
  --learningrate 0.01
  --translationscale 100
  ${TEST_DATA}/CTHeadAxial.nhdr 
  ${TEST_DATA}/CTHeadAxial.nhdr 
  )
add_test(RigidRegistrationTest04 ${Slicer3_EXE} --launch RigidRegistrationTest
  ModuleEntryPoint
  --resampledmovingfilename  ${TEMP}/RigidRegistrationTest04.nhdr
  --outputtransform ${TEMP}/RigidRegistrationTest04Transform.txt 
  --spatialsamples 10000
  --histogrambins 32
  --iterations 50
  --learningrate 0.01
  --translationscale 100
  ${TEST_DATA}/CTHeadAxial.nhdr 
  ${TEST_DATA}/CTHeadAxial.nhdr 
  )
984

985
986
987
# This test reproduces exactly the registration step on
# the meningioma growth detection (tutorial) data for ChangeTracker
# Setting parameters explicitly, because default values are not passed to CLI
988
989
990
# In testing mode, this test is supposed to fail if the error at the image
# corner (as compared to the transform passed with --initialtransform) exceeds
# 0.1
fedorov's avatar
fedorov committed
991
#add_test(RigidRegistrationTest02 ${Slicer3_EXE} --launch RigidRegistrationTest
992
993
#  --compare ${BASELINE}/RigidRegistrationTest02.nrrd
#   ${TEMP}/RigidRegistrationTest02.nrrd
fedorov's avatar
fedorov committed
994
995
996
997
998
999
1000
#  RigidRegistrationTest
#  --testingmode
#  --initialtransform ${TEST_DATA}/MRMeningioma01.tfm
#  --resampledmovingfilename  ${TEMP}/RigidRegistrationTest02.nrrd
#  --outputtransform ${TEMP}/RigidRegistrationTest02Transform.txt
#  --iterations 100,100,50,20
#  --fixedsmoothingfactor 0
For faster browsing, not all history is shown. View entire blame