CMakeLists.txt 24.3 KB
Newer Older
1 2 3 4 5 6 7 8
###  This is the test suite for the BRAINSDemonWarp program.
###  It is intended to test a wide set of image types and image
###  physical space descriptions to ensure that all ITK
###  images are treated properly.


### All test have been pushed to this sub-directory to keep the primary build clean.

9 10
if(WIN32)
  set(BRAINSWARP_ITK_LIBS "")
11
  set(BUILD_SUBDIR ${CMAKE_BUILD_TYPE}/)
12
else(WIN32)
13
  set(BRAINSWARP_ITK_LIBS ${ITK_LIBRARIES})
14 15
endif(WIN32)

16
add_executable( BRAINSDemonWarpCLPTests BRAINSDemonWarpCLPTests.cxx ${BRAINSDemonWarp_SOURCE_DIR}/BRAINSDemonWarpPrimary.cxx)
17
target_link_libraries(BRAINSDemonWarpCLPTests BRAINSDemonWarpCommonLib ${BRAINSWARP_ITK_LIBS} ${OPTIONAL_DEBUG_LINK_LIBRARIES})
18
set_target_properties(BRAINSDemonWarpCLPTests PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${BRAINSDemonWarp_BINARY_DIR})
19
set(BRAINS_Demon_Warp_TESTS ${Slicer_LAUNCH_COMMAND} $<TARGET_FILE:BRAINSDemonWarpCLPTests> )
20

21
add_executable( VBRAINSDemonWarpCLPTests VBRAINSDemonWarpCLPTests.cxx ${BRAINSDemonWarp_SOURCE_DIR}/VBRAINSDemonWarpPrimary.cxx)
22
target_link_libraries(VBRAINSDemonWarpCLPTests BRAINSDemonWarpCommonLib ${BRAINSWARP_ITK_LIBS} ${OPTIONAL_DEBUG_LINK_LIBRARIES})
23
set_target_properties(VBRAINSDemonWarpCLPTests PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${BRAINSDemonWarp_BINARY_DIR})
24
set(VBRAINS_Demon_Warp_TESTS ${Slicer_LAUNCH_COMMAND} $<TARGET_FILE:VBRAINSDemonWarpCLPTests> )
25

26 27
include(${BRAINS_CMAKE_HELPER_DIR}/MIDAS.cmake)
set(MIDAS_KEY_DIR "${PROJECT_SOURCE_DIR}/../BRAINSCommonLib/TestData")
28

29
#1
30
midas_add_test(NAME ValidateBRAINSDemonsWarpTest_nii COMMAND ${BRAINS_Demon_Warp_TESTS}
31
 --compare
32
    MIDAS{thirionDemons.nii.gz.md5}
33 34 35 36
    ${BRAINSDemonWarp_BINARY_DIR}/thirionDemons_test.nii.gz
    --compareNumberOfPixelsTolerance 50
    --compareIntensityTolerance 10
    BRAINSDemonWarpTest
37 38
    --movingVolume MIDAS{SUBJ_B_small/SUBJ_B_small_T1.nii.gz.md5}
    --fixedVolume MIDAS{SUBJ_A_small/SUBJ_A_small_T1.nii.gz.md5}
39
    --outputVolume ${BRAINSDemonWarp_BINARY_DIR}/thirionDemons_test.nii.gz
40 41
#    --inputPixelType short
#    --outputPixelType short
42 43
    --outputDebug
    --numberOfPyramidLevels 3
44 45 46
    --arrayOfPyramidLevelIterations 100,100,100
    --minimumFixedPyramid 4,4,4
    --minimumMovingPyramid 4,4,4
47
    --registrationFilterType Demons
48 49 50
)

#2
51
midas_add_test(NAME ValidateFastSymmetricForcesTest_nii COMMAND ${BRAINS_Demon_Warp_TESTS}
52
 --compare
53
    MIDAS{fastSymmetricForcesDemons.nii.gz.md5}
54 55 56 57
    ${BRAINSDemonWarp_BINARY_DIR}/fastSymmetricForcesDemons_test.nii.gz
    --compareNumberOfPixelsTolerance 450
    --compareIntensityTolerance 10
     BRAINSDemonWarpTest
58 59
    --movingVolume MIDAS{SUBJ_B_small/SUBJ_B_small_T1.nii.gz.md5}
    --fixedVolume MIDAS{SUBJ_A_small/SUBJ_A_small_T1.nii.gz.md5}
60 61
    --outputVolume ${BRAINSDemonWarp_BINARY_DIR}/fastSymmetricForcesDemons_test.nii.gz
    --inputPixelType uchar
62
    --outputPixelType uchar
63
    --medianFilterSize 1,1,1
64 65
    --outputDebug
    --smoothDeformationFieldSigma 1.0
66 67 68 69 70 71 72 73
    --numberOfPyramidLevels 3
    --arrayOfPyramidLevelIterations 100,50,5
    --minimumFixedPyramid 4,4,4
    --minimumMovingPyramid 4,4,4
    --registrationFilterType FastSymmetricForces
)

#3
74
midas_add_test(NAME ValidateDiffeomorphicTest1_nii COMMAND ${BRAINS_Demon_Warp_TESTS}
75
 --compare
76
    MIDAS{diffeomorphicDemons1.nii.gz.md5}
77 78 79 80
    ${BRAINSDemonWarp_BINARY_DIR}/diffeomorphicDemons1_test.nii.gz
    --compareNumberOfPixelsTolerance 220
    --compareIntensityTolerance 10
    BRAINSDemonWarpTest
81 82
    --movingVolume MIDAS{SUBJ_B_small/SUBJ_B_small_T1.nii.gz.md5}
    --fixedVolume MIDAS{SUBJ_A_small/SUBJ_A_small_T1.nii.gz.md5}
83 84
    --outputVolume ${BRAINSDemonWarp_BINARY_DIR}/diffeomorphicDemons1_test.nii.gz
    --outputDeformationFieldVolume ${BRAINSDemonWarp_BINARY_DIR}/OutDefField.nii.gz
85 86 87
    --inputPixelType short
    --outputPixelType uchar
    --outputNormalized
88 89
    --outputDebug
    --histogramMatch
90 91
    --numberOfHistogramBins 1024
    --numberOfMatchPoints 7
92 93 94
    --smoothDeformationFieldSigma 1.5
    --numberOfPyramidLevels 3
    --arrayOfPyramidLevelIterations 100,50,5
95 96 97 98 99 100
    --minimumFixedPyramid 4,4,4
    --minimumMovingPyramid 4,4,4
    --registrationFilterType Diffeomorphic
)

#4
101
midas_add_test(NAME ValidateDiffeomorphicTest2_nii COMMAND ${BRAINS_Demon_Warp_TESTS}
102
 --compare
103
    MIDAS{diffeomorphicDemons2.nii.gz.md5}
104
    ${BRAINSDemonWarp_BINARY_DIR}/diffeomorphicDemons2_test.nii.gz
105
    --compareNumberOfPixelsTolerance 300
106 107
    --compareIntensityTolerance 10
    BRAINSDemonWarpTest
108 109
    --movingVolume MIDAS{SUBJ_B_small/SUBJ_B_small_T1.nii.gz.md5}
    --fixedVolume MIDAS{SUBJ_A_small/SUBJ_A_small_T1.nii.gz.md5}
110 111 112 113
    --outputVolume ${BRAINSDemonWarp_BINARY_DIR}/diffeomorphicDemons2_test.nii.gz
    --inputPixelType ushort
    --outputPixelType uchar
    --outputNormalized
114 115
    --fixedBinaryVolume MIDAS{SUBJ_A_small/SUBJ_A_small_brain_cut_mask.nii.gz.md5}
    --movingBinaryVolume MIDAS{SUBJ_B_small/SUBJ_B_small_brain_cut_mask.nii.gz.md5}
116
    --maskProcessingMode BOBF
117
    --histogramMatch
118 119
    --numberOfHistogramBins 1024
    --numberOfMatchPoints 7
120 121 122
    --smoothDeformationFieldSigma 1.0
    --numberOfPyramidLevels 3
    --arrayOfPyramidLevelIterations 100,50,5
123 124 125 126 127 128
    --minimumFixedPyramid 4,4,4
    --minimumMovingPyramid 4,4,4
    --registrationFilterType Diffeomorphic
)

#5
129
midas_add_test(NAME ValidateDiffeomorphicTest3_nii COMMAND ${BRAINS_Demon_Warp_TESTS}
130
 --compare
131
    MIDAS{diffeomorphicDemons3.nii.gz.md5}
132 133 134
    ${BRAINSDemonWarp_BINARY_DIR}/diffeomorphicDemons3_test.nii.gz
    --compareNumberOfPixelsTolerance 6950
    --compareIntensityTolerance 10
135
    BRAINSDemonWarpTest
136 137
    --movingVolume MIDAS{SUBJ_B_small/SUBJ_B_small_T1.nii.gz.md5}
    --fixedVolume MIDAS{SUBJ_A_small/SUBJ_A_small_T1.nii.gz.md5}
138 139
#    --outputDeformationFieldVolume ${BRAINSDemonWarp_BINARY_DIR}/OutDefField.nii.gz
    --outputVolume ${BRAINSDemonWarp_BINARY_DIR}/diffeomorphicDemons3_test.nii.gz
140 141 142
    --inputPixelType int
    --outputPixelType uchar
    --outputNormalized
143 144
    --fixedBinaryVolume MIDAS{SUBJ_A_small/SUBJ_A_small_brain_cut_mask.nii.gz.md5}
    --movingBinaryVolume MIDAS{SUBJ_B_small/SUBJ_B_small_brain_cut_mask.nii.gz.md5}
145
    --maskProcessingMode BOBF
146 147 148
    --smoothDeformationFieldSigma 0.01
    --upFieldSmoothing 1.0
    --histogramMatch
149 150
    --numberOfHistogramBins 1024
    --numberOfMatchPoints 7
151 152
    --numberOfPyramidLevels 3
    --arrayOfPyramidLevelIterations 100,50,5
153 154 155 156 157 158
    --minimumFixedPyramid 4,4,4
    --minimumMovingPyramid 4,4,4
    --registrationFilterType Diffeomorphic
)

#6
159
midas_add_test(NAME ValidateDiffeomorphicTest4_nii COMMAND ${BRAINS_Demon_Warp_TESTS}
160
 --compare
161
    MIDAS{diffeomorphicDemons4.nii.gz.md5}
162 163 164 165
    ${BRAINSDemonWarp_BINARY_DIR}/diffeomorphicDemons4_test.nii.gz
    --compareNumberOfPixelsTolerance 340
    --compareIntensityTolerance 10
    BRAINSDemonWarpTest
166 167
    --movingVolume MIDAS{SUBJ_B_small/SUBJ_B_small_T1.nii.gz.md5}
    --fixedVolume MIDAS{SUBJ_A_small/SUBJ_A_small_T1.nii.gz.md5}
168
    --outputVolume ${BRAINSDemonWarp_BINARY_DIR}/diffeomorphicDemons4_test.nii.gz
169 170 171 172
    --inputPixelType int
    --outputPixelType uchar
#    --outputNormalized
    --outputCheckerboardVolume ${BRAINSDemonWarp_BINARY_DIR}/output_Checkborad.nii.gz
173
    --initializeWithDeformationField MIDAS{InitialDeformationField.nii.gz.md5}
174 175 176
    --smoothDeformationFieldSigma 1.5
    --numberOfPyramidLevels 3
    --arrayOfPyramidLevelIterations 10,5,5
177 178 179
    --minimumFixedPyramid 4,4,4
    --minimumMovingPyramid 4,4,4
    --outputDisplacementFieldPrefix ${BRAINSDemonWarp_BINARY_DIR}/displacement.nii.gz
hjohnson's avatar
ENH:  
hjohnson committed
180
    --registrationFilterType Diffeomorphic
181 182 183
)

### Need to add more test to get better code coverage of this test suite.  Need to make sure that all the command line options are tested.
184
midas_add_test(NAME ValidateOrientedImagesTest5_nii COMMAND ${BRAINS_Demon_Warp_TESTS}
185
 --compare
186
    MIDAS{ValidateOrientedImagesTest5.nii.gz.md5}
187
    ${BRAINSDemonWarp_BINARY_DIR}/ValidateOrientedImagesTest5.nii.gz
188 189 190
    --compareNumberOfPixelsTolerance 49800
    --compareIntensityTolerance 25
    BRAINSDemonWarpTest
191 192
    --movingVolume MIDAS{ANON0006_20_T1_sag_twisted.nii.gz.md5}
    --fixedVolume MIDAS{ANON0006_20_T1_dbg_splayed.nii.gz.md5}
193
    --outputVolume ${BRAINSDemonWarp_BINARY_DIR}/ValidateOrientedImagesTest5.nii.gz
194
    --outputDeformationFieldVolume ${BRAINSDemonWarp_BINARY_DIR}/OutDefField_orientedImage.nii.gz
195
    --inputPixelType uchar
196
    --outputPixelType uchar
197 198 199 200
    --smoothDeformationFieldSigma 1.5
    --outputDebug
    --numberOfPyramidLevels 3
    --arrayOfPyramidLevelIterations 1000,100,25
201 202 203
    --registrationFilterType Diffeomorphic
)

204
midas_add_test(NAME ValidateVectorBRAINSDemonWarpTest_nii COMMAND ${VBRAINS_Demon_Warp_TESTS}
205
 --compare
206
    MIDAS{thirionDemons.nii.gz.md5}
207
    ${BRAINSDemonWarp_BINARY_DIR}/thirionDemons_V_test.nii.gz
208 209 210
    --compareNumberOfPixelsTolerance 50
    --compareIntensityTolerance 10
    VBRAINSDemonWarpTest
211 212
    --movingVolume MIDAS{SUBJ_B_small/SUBJ_B_small_T1.nii.gz.md5}
    --fixedVolume MIDAS{SUBJ_A_small/SUBJ_A_small_T1.nii.gz.md5}
213
    --outputVolume ${BRAINSDemonWarp_BINARY_DIR}/thirionDemons_V_test.nii.gz
214 215
#    --inputPixelType short
#    --outputPixelType short
216 217
    --outputDebug
    --numberOfPyramidLevels 3
218 219 220
    --arrayOfPyramidLevelIterations 100,100,100
    --minimumFixedPyramid 4,4,4
    --minimumMovingPyramid 4,4,4
hjohnson's avatar
ENH:  
hjohnson committed
221
    --registrationFilterType Demons
222 223 224
)


225
midas_add_test(NAME ValidateVectorFastSymmetricForcesTest_nii COMMAND ${VBRAINS_Demon_Warp_TESTS}
226
 --compare
227
    MIDAS{fastSymmetricForcesDemons.nii.gz.md5}
228 229 230
    ${BRAINSDemonWarp_BINARY_DIR}/fastSymmetricForcesDemons_V_test.nii.gz
    --compareNumberOfPixelsTolerance 450
    --compareIntensityTolerance 10
231
    VBRAINSDemonWarpTest
232 233
    --movingVolume MIDAS{SUBJ_B_small/SUBJ_B_small_T1.nii.gz.md5}
    --fixedVolume MIDAS{SUBJ_A_small/SUBJ_A_small_T1.nii.gz.md5}
234 235
    --outputVolume ${BRAINSDemonWarp_BINARY_DIR}/fastSymmetricForcesDemons_V_test.nii.gz
    --inputPixelType uchar
236
    --outputPixelType uchar
237
    --medianFilterSize 1,1,1
238 239
    --outputDebug
    --smoothDeformationFieldSigma 1.0
240 241 242 243 244 245 246
    --numberOfPyramidLevels 3
    --arrayOfPyramidLevelIterations 100,50,5
    --minimumFixedPyramid 4,4,4
    --minimumMovingPyramid 4,4,4
    --registrationFilterType FastSymmetricForces
)

247
midas_add_test(NAME ValidateVectorDiffeomorphicTest1_nii COMMAND ${VBRAINS_Demon_Warp_TESTS}
248
 --compare
249
    MIDAS{diffeomorphicDemons1.nii.gz.md5}
250 251 252 253
    ${BRAINSDemonWarp_BINARY_DIR}/vectordiffeomorphicDemons1_test.nii.gz
    --compareNumberOfPixelsTolerance 220
    --compareIntensityTolerance 10
    VBRAINSDemonWarpTest
254 255
    --movingVolume MIDAS{SUBJ_B_small/SUBJ_B_small_T1.nii.gz.md5},MIDAS{SUBJ_B_small/SUBJ_B_small_T1.nii.gz.md5}
    --fixedVolume MIDAS{SUBJ_A_small/SUBJ_A_small_T1.nii.gz.md5},MIDAS{SUBJ_A_small/SUBJ_A_small_T1.nii.gz.md5}
256 257
    --outputVolume ${BRAINSDemonWarp_BINARY_DIR}/vectordiffeomorphicDemons1_test.nii.gz
    --outputDeformationFieldVolume ${BRAINSDemonWarp_BINARY_DIR}/OutDefField.nii.gz
258 259 260
    --inputPixelType short
    --outputPixelType uchar
    --outputNormalized
261 262
    --outputDebug
    --histogramMatch
263 264
    --numberOfHistogramBins 1024
    --numberOfMatchPoints 7
265 266 267
    --smoothDeformationFieldSigma 1.5
    --numberOfPyramidLevels 3
    --arrayOfPyramidLevelIterations 100,50,5
268 269 270 271 272 273
    --minimumFixedPyramid 4,4,4
    --minimumMovingPyramid 4,4,4
    --registrationFilterType Diffeomorphic
)


274
midas_add_test(NAME ValidateVectorDiffeomorphicTest2_nii COMMAND ${VBRAINS_Demon_Warp_TESTS}
275
 --compare
276
    MIDAS{diffeomorphicDemons2.nii.gz.md5}
277
    ${BRAINSDemonWarp_BINARY_DIR}/vectordiffeomorphicDemons2_test.nii.gz
278
    --compareNumberOfPixelsTolerance 300
279 280
    --compareIntensityTolerance 10
    VBRAINSDemonWarpTest
281 282
    --movingVolume MIDAS{SUBJ_B_small/SUBJ_B_small_T1.nii.gz.md5},MIDAS{SUBJ_B_small/SUBJ_B_small_T1.nii.gz.md5}
    --fixedVolume MIDAS{SUBJ_A_small/SUBJ_A_small_T1.nii.gz.md5},MIDAS{SUBJ_A_small/SUBJ_A_small_T1.nii.gz.md5}
283 284 285 286
    --outputVolume ${BRAINSDemonWarp_BINARY_DIR}/vectordiffeomorphicDemons2_test.nii.gz
    --inputPixelType ushort
    --outputPixelType uchar
    --outputNormalized
287 288
    --fixedBinaryVolume MIDAS{SUBJ_A_small/SUBJ_A_small_brain_cut_mask.nii.gz.md5}
    --movingBinaryVolume MIDAS{SUBJ_B_small/SUBJ_B_small_brain_cut_mask.nii.gz.md5}
289
    --makeBOBF
290
    --histogramMatch
291
    --numberOfHistogramBins 1024    --numberOfMatchPoints 7
292 293
    --smoothDeformationFieldSigma 1.0    --numberOfPyramidLevels 3
    --arrayOfPyramidLevelIterations 100,50,5
294 295 296 297 298
    --minimumFixedPyramid 4,4,4
    --minimumMovingPyramid 4,4,4
    --registrationFilterType Diffeomorphic
)

299
midas_add_test(NAME ValidateVectorDiffeomorphicTest3_nii COMMAND ${VBRAINS_Demon_Warp_TESTS}
300
 --compare
301
    MIDAS{diffeomorphicDemons3.nii.gz.md5}
302 303 304 305
    ${BRAINSDemonWarp_BINARY_DIR}/vectordiffeomorphicDemons3_test.nii.gz
    --compareNumberOfPixelsTolerance 6950
    --compareIntensityTolerance 10
    VBRAINSDemonWarpTest
306 307
    --movingVolume MIDAS{SUBJ_B_small/SUBJ_B_small_T1.nii.gz.md5},MIDAS{SUBJ_B_small/SUBJ_B_small_T1.nii.gz.md5}
    --fixedVolume MIDAS{SUBJ_A_small/SUBJ_A_small_T1.nii.gz.md5},MIDAS{SUBJ_A_small/SUBJ_A_small_T1.nii.gz.md5}
308 309
#    --outputDeformationFieldVolume ${VBRAINSDemonWarp_BINARY_DIR}/OutDefField.nii.gz
    --outputVolume ${BRAINSDemonWarp_BINARY_DIR}/vectordiffeomorphicDemons3_test.nii.gz
310 311
    --inputPixelType int
    --outputPixelType uchar
312
    --outputNormalized
313 314
    --fixedBinaryVolume MIDAS{SUBJ_A_small/SUBJ_A_small_brain_cut_mask.nii.gz.md5}
    --movingBinaryVolume MIDAS{SUBJ_B_small/SUBJ_B_small_brain_cut_mask.nii.gz.md5}
315
    --makeBOBF
316 317 318
    --smoothDeformationFieldSigma 0.01
    --upFieldSmoothing 1.0
    --histogramMatch
319 320
    --numberOfHistogramBins 1024
    --numberOfMatchPoints 7
321 322
    --numberOfPyramidLevels 3
    --arrayOfPyramidLevelIterations 100,50,5
323 324 325 326 327 328
    --minimumFixedPyramid 4,4,4
    --minimumMovingPyramid 4,4,4
    --registrationFilterType Diffeomorphic
)


329
midas_add_test(NAME ValidateVectorDiffeomorphicTest4_nii COMMAND ${VBRAINS_Demon_Warp_TESTS}
330
 --compare
331
    MIDAS{diffeomorphicDemons4.nii.gz.md5}
332 333 334 335
    ${BRAINSDemonWarp_BINARY_DIR}/vectordiffeomorphicDemons4_test.nii.gz
    --compareNumberOfPixelsTolerance 340
    --compareIntensityTolerance 10
    VBRAINSDemonWarpTest
336 337
    --movingVolume MIDAS{SUBJ_B_small/SUBJ_B_small_T1.nii.gz.md5},MIDAS{SUBJ_B_small/SUBJ_B_small_T1.nii.gz.md5}
    --fixedVolume MIDAS{SUBJ_A_small/SUBJ_A_small_T1.nii.gz.md5},MIDAS{SUBJ_A_small/SUBJ_A_small_T1.nii.gz.md5}
338 339
    --outputVolume ${BRAINSDemonWarp_BINARY_DIR}/vectordiffeomorphicDemons4_test.nii.gz
    --outputDeformationFieldVolume ${BRAINSDemonWarp_BINARY_DIR}/OutDefField.nii.gz
340 341 342 343
    --inputPixelType int
    --outputPixelType uchar
#    --outputNormalized
    --outputCheckerboardVolume ${BRAINSDemonWarp_BINARY_DIR}/output_Checkborad.nii.gz
344
    --initializeWithDeformationField MIDAS{InitialDeformationField.nii.gz.md5}
345 346 347
     --smoothDeformationFieldSigma 1.5
    --numberOfPyramidLevels 3
    --arrayOfPyramidLevelIterations 10,5,5
348 349 350 351 352 353
    --minimumFixedPyramid 4,4,4
    --minimumMovingPyramid 4,4,4
    --registrationFilterType Diffeomorphic
    --outputDisplacementFieldPrefix ${BRAINSDemonWarp_BINARY_DIR}/displacement.nii.gz
)

354
midas_add_test(NAME ValidateVectorDiffeomorphicTest5_nii COMMAND ${VBRAINS_Demon_Warp_TESTS}
355
 --compare
356
    MIDAS{diffeomorphicDemons5.nii.gz.md5}
357 358 359 360
    ${BRAINSDemonWarp_BINARY_DIR}/vectordiffeomorphicDemons5_test.nii.gz
    --compareNumberOfPixelsTolerance 75
    --compareIntensityTolerance 10
    VBRAINSDemonWarpTest
361 362
    --movingVolume MIDAS{SUBJ_B_small/SUBJ_B_small_T1.nii.gz.md5},MIDAS{SUBJ_B_small/SUBJ_B_small_T1.nii.gz.md5},MIDAS{SUBJ_B_small/SUBJ_B_small_T1.nii.gz.md5}
    --fixedVolume MIDAS{SUBJ_A_small/SUBJ_A_small_T1.nii.gz.md5},MIDAS{SUBJ_A_small/SUBJ_A_small_T1.nii.gz.md5},MIDAS{SUBJ_A_small/SUBJ_A_small_T1.nii.gz.md5}
363
    --outputVolume ${BRAINSDemonWarp_BINARY_DIR}/vectordiffeomorphicDemons5_test.nii.gz
364 365 366
    --inputPixelType short
    --outputPixelType uchar
    --medianFilterSize 1,1,1
367 368 369
    --outputDebug
    --histogramMatch
    --weightFactors 0.5,0.5,0.0
370 371
    --numberOfHistogramBins 1024
    --numberOfMatchPoints 7
372 373 374
    --smoothDeformationFieldSigma 1.5
    --numberOfPyramidLevels 3
    --arrayOfPyramidLevelIterations 100,50,5
375 376 377 378 379
    --minimumFixedPyramid 4,4,4
    --minimumMovingPyramid 4,4,4
    --registrationFilterType Diffeomorphic
)

380
midas_add_test(NAME ValidateVectorDiffeomorphicTest6_nii COMMAND ${VBRAINS_Demon_Warp_TESTS}
381
 --compare
382
    MIDAS{diffeomorphicDemons3.nii.gz.md5}
383 384 385 386
    ${BRAINSDemonWarp_BINARY_DIR}/vectordiffeomorphicDemons6_test.nii.gz
    --compareNumberOfPixelsTolerance 6950
    --compareIntensityTolerance 10
    VBRAINSDemonWarpTest
387 388
    --movingVolume MIDAS{SUBJ_B_small/SUBJ_B_small_T1.nii.gz.md5}
    --fixedVolume MIDAS{SUBJ_A_small/SUBJ_A_small_T1.nii.gz.md5}
389 390
#    --outputDeformationFieldVolume ${BRAINSDemonWarp_BINARY_DIR}/OutDefField.nii.gz
    --outputVolume ${BRAINSDemonWarp_BINARY_DIR}/vectordiffeomorphicDemons6_test.nii.gz
391 392
    --inputPixelType int
    --outputPixelType uchar
393
    --outputNormalized
394 395
    --fixedBinaryVolume MIDAS{SUBJ_A_small/SUBJ_A_small_brain_cut_mask.nii.gz.md5}
    --movingBinaryVolume MIDAS{SUBJ_B_small/SUBJ_B_small_brain_cut_mask.nii.gz.md5}
396
    --makeBOBF
397 398 399
    --smoothDeformationFieldSigma 0.01
    --upFieldSmoothing 1.0
    --histogramMatch
400 401
    --numberOfHistogramBins 1024
    --numberOfMatchPoints 7
402 403
    --numberOfPyramidLevels 3
    --arrayOfPyramidLevelIterations 100,50,5
404 405 406 407 408 409 410
    --minimumFixedPyramid 4,4,4
    --minimumMovingPyramid 4,4,4
    --registrationFilterType Diffeomorphic
)



411
midas_add_test(NAME ValidateVectorOrientedImagesTest6_nii COMMAND ${VBRAINS_Demon_Warp_TESTS}
412
 --compare
413
    MIDAS{ValidateVectorOrientedImagesTest6.nii.gz.md5}
414
    ${BRAINSDemonWarp_BINARY_DIR}/ValidateVectorOrientedImagesTest6.nii.gz
415 416 417
    --compareNumberOfPixelsTolerance 50000
    --compareIntensityTolerance 25
    VBRAINSDemonWarpTest
418 419
    --movingVolume MIDAS{ANON0006_20_T1_sag_twisted.nii.gz.md5},MIDAS{ANON0006_20_T1_sag_twisted.nii.gz.md5}
    --fixedVolume MIDAS{ANON0006_20_T1_dbg_splayed.nii.gz.md5},MIDAS{ANON0006_20_T1_dbg_splayed.nii.gz.md5}
420
    --outputVolume ${BRAINSDemonWarp_BINARY_DIR}/ValidateVectorOrientedImagesTest6.nii.gz
421
    --inputPixelType uchar
422
    --outputPixelType uchar
423 424 425 426
    --smoothDeformationFieldSigma 1.5
    --outputDebug
    --numberOfPyramidLevels 5
    --arrayOfPyramidLevelIterations 100,30,20,0,0
427 428 429
    --registrationFilterType Diffeomorphic
)

430
midas_add_test(NAME ValidateVectorOrientedImagesTest7_nii COMMAND ${VBRAINS_Demon_Warp_TESTS}
431
 --compare
432
    MIDAS{ValidateVectorOrientedImagesTest7.nii.gz.md5}
433
    ${BRAINSDemonWarp_BINARY_DIR}/ValidateVectorOrientedImagesTest7.nii.gz
434 435 436
    --compareNumberOfPixelsTolerance 51000
    --compareIntensityTolerance 25
    VBRAINSDemonWarpTest
437 438
    --movingVolume MIDAS{ANON0006_20_T1_sag_twisted.nii.gz.md5},MIDAS{ANON0006_20_T1_sag_twisted.nii.gz.md5}
    --fixedVolume MIDAS{ANON0006_20_T1_dbg_splayed.nii.gz.md5},MIDAS{ANON0006_20_T1_dbg_splayed.nii.gz.md5}
439
    --outputVolume ${BRAINSDemonWarp_BINARY_DIR}/ValidateVectorOrientedImagesTest7.nii.gz
440
    --inputPixelType uchar
441
    --outputPixelType uchar
442 443 444 445 446
    --smoothDeformationFieldSigma 1.5
    --outputDebug
    --weightFactors 0.8,0.2
    --numberOfPyramidLevels 5
    --arrayOfPyramidLevelIterations 100,30,20,0,0
447 448 449
    --registrationFilterType Diffeomorphic
)

450
midas_add_test(NAME ValidateDiffeomorphicWithAUTOMask_Test_nii COMMAND ${BRAINS_Demon_Warp_TESTS}
451
  --compare
452
    MIDAS{diffeomorphicDemons_AutoMask.nii.gz.md5}
453 454 455 456
    ${BRAINSDemonWarp_BINARY_DIR}/diffeomorphicDemonsWithAutoMask_test.nii.gz
    --compareNumberOfPixelsTolerance 50
    --compareIntensityTolerance 10
    BRAINSDemonWarpTest
457 458
    --movingVolume MIDAS{SUBJ_B_small/SUBJ_B_small_T2.nii.gz.md5}
    --fixedVolume MIDAS{SUBJ_A_small/SUBJ_A_small_T2.nii.gz.md5}
459
    --outputVolume ${BRAINSDemonWarp_BINARY_DIR}/diffeomorphicDemonsWithAutoMask_test.nii.gz
460 461 462
    --inputPixelType short
    --outputPixelType uchar
    --outputNormalized
463 464
    --outputDebug
    --histogramMatch
465 466
    --numberOfHistogramBins 1024
    --numberOfMatchPoints 7
467 468 469
    --smoothDeformationFieldSigma 1.5
    --numberOfPyramidLevels 3
    --arrayOfPyramidLevelIterations 100,50,5
470 471
    --minimumFixedPyramid 4,4,4
    --minimumMovingPyramid 4,4,4
472
    --maskProcessingMode ROIAUTO
hjohnson's avatar
ENH:  
hjohnson committed
473
    --registrationFilterType Diffeomorphic
474 475
)

476
midas_add_test(NAME ValidateDiffeomorphicWithMask_Test_nii COMMAND ${BRAINS_Demon_Warp_TESTS}
477
  --compare
478
    MIDAS{diffeomorphicDemonsWithMask.nii.gz.md5}
479 480 481 482
    ${BRAINSDemonWarp_BINARY_DIR}/diffeomorphicDemonsWithMask_test.nii.gz
    --compareNumberOfPixelsTolerance 50
    --compareIntensityTolerance 10
    BRAINSDemonWarpTest
483 484
    --movingVolume MIDAS{SUBJ_B_small/SUBJ_B_small_T2.nii.gz.md5}
    --fixedVolume MIDAS{SUBJ_A_small/SUBJ_A_small_T2.nii.gz.md5}
485
    --outputVolume ${BRAINSDemonWarp_BINARY_DIR}/diffeomorphicDemonsWithMask_test.nii.gz
486 487 488
    --inputPixelType short
    --outputPixelType uchar
    --outputNormalized
489 490
    --outputDebug
    --histogramMatch
491 492
    --numberOfHistogramBins 1024
    --numberOfMatchPoints 7
493 494 495
    --smoothDeformationFieldSigma 1.5
    --numberOfPyramidLevels 3
    --arrayOfPyramidLevelIterations 100,50,5
496 497 498
    --minimumFixedPyramid 4,4,4
    --minimumMovingPyramid 4,4,4
    --maskProcessingMode ROI
499 500
    --fixedBinaryVolume MIDAS{SUBJ_A_small/SUBJ_A_small_T2_mask.nii.gz.md5}
    --movingBinaryVolume MIDAS{SUBJ_B_small/SUBJ_B_small_T2_mask.nii.gz.md5}
hjohnson's avatar
ENH:  
hjohnson committed
501
    --registrationFilterType Diffeomorphic
502 503 504
)

#Test for initial Transform
505
midas_add_test(NAME ValidateInitialTransform_Test_nii COMMAND ${BRAINS_Demon_Warp_TESTS}
506
  --compare
507
    MIDAS{ValidateInitialTransform_Test.nii.gz.md5}
508
    ${BRAINSDemonWarp_BINARY_DIR}/ValidateInitialTransform_Test.nii.gz
509 510 511
    --compareNumberOfPixelsTolerance 20
    --compareIntensityTolerance 10
    BRAINSDemonWarpTest
512 513
    --movingVolume MIDAS{rotation.rescale.rigid.nii.gz.md5}
    --fixedVolume MIDAS{test.nii.gz.md5}
514
    --outputVolume ${BRAINSDemonWarp_BINARY_DIR}/ValidateInitialTransform_Test.nii.gz
hjohnson's avatar
ENH:  
hjohnson committed
515
    --outputPixelType short
516
    --outputDebug
517
    --initializeWithTransform MIDAS{BRAINSFitTest_BSplineAnteScaleRotationRescaleHeadMasks.mat.md5}
518 519 520
    --smoothDeformationFieldSigma 0.0
    --numberOfPyramidLevels 1
    --arrayOfPyramidLevelIterations 1
521 522 523 524 525 526
    --minimumFixedPyramid 1,1,1
    --minimumMovingPyramid 1,1,1
    --registrationFilterType Diffeomorphic
)

#Test for Log Domain
527
midas_add_test(NAME ValidateLogDemons_Test_nii COMMAND ${BRAINS_Demon_Warp_TESTS}
528
  --compare
529
    MIDAS{logDemons.nii.gz.md5}
530
    ${BRAINSDemonWarp_BINARY_DIR}/logDemons_test.nii.gz
531
    --compareNumberOfPixelsTolerance 500
532 533
    --compareIntensityTolerance 10
    BRAINSDemonWarpTest
534 535
    --movingVolume MIDAS{SUBJ_B_small/SUBJ_B_small_T1.nii.gz.md5}
    --fixedVolume MIDAS{SUBJ_A_small/SUBJ_A_small_T1.nii.gz.md5}
536 537 538
    --outputVolume ${BRAINSDemonWarp_BINARY_DIR}/logDemons_test.nii.gz
    --outputDebug
    --histogramMatch
539 540
    --numberOfHistogramBins 1024
    --numberOfMatchPoints 7
541 542 543
    --smoothDeformationFieldSigma 1.5
    --numberOfPyramidLevels 3
    --arrayOfPyramidLevelIterations 100,50,5
544 545 546 547 548
    --minimumFixedPyramid 4,4,4
    --minimumMovingPyramid 4,4,4
    --registrationFilterType LogDemons
)

549
midas_add_test(NAME ValidateSymmetricLogDemons_Test1_nii COMMAND ${BRAINS_Demon_Warp_TESTS}
550
  --compare
551
    MIDAS{symmetricLogDemons1.nii.gz.md5}
552
    ${BRAINSDemonWarp_BINARY_DIR}/symmetricLogDemons_test1.nii.gz
553
    --compareNumberOfPixelsTolerance 1300
554 555
    --compareIntensityTolerance 10
    BRAINSDemonWarpTest
556 557
    --movingVolume MIDAS{SUBJ_B_small/SUBJ_B_small_T1.nii.gz.md5}
    --fixedVolume MIDAS{SUBJ_A_small/SUBJ_A_small_T1.nii.gz.md5}
558 559 560
    --outputVolume ${BRAINSDemonWarp_BINARY_DIR}/symmetricLogDemons_test1.nii.gz
    --outputDebug
    --histogramMatch
561 562
    --numberOfHistogramBins 1024
    --numberOfMatchPoints 7
563 564 565
    --smoothDeformationFieldSigma 1.5
    --numberOfPyramidLevels 3
    --arrayOfPyramidLevelIterations 100,50,5
566 567 568 569 570
    --minimumFixedPyramid 4,4,4
    --minimumMovingPyramid 4,4,4
    --registrationFilterType SymmetricLogDemons
)

571
midas_add_test(NAME ValidateSymmetricLogDemons_Test2_nii COMMAND ${BRAINS_Demon_Warp_TESTS}
572
  --compare
573
    MIDAS{symmetricLogDemons2.nii.gz.md5}
574
    ${BRAINSDemonWarp_BINARY_DIR}/symmetricLogDemons_test2.nii.gz
575
    --compareNumberOfPixelsTolerance 1300
576 577
    --compareIntensityTolerance 10
    BRAINSDemonWarpTest
578 579
    --movingVolume MIDAS{SUBJ_B_small/SUBJ_B_small_T1.nii.gz.md5}
    --fixedVolume MIDAS{SUBJ_A_small/SUBJ_A_small_T1.nii.gz.md5}
580 581 582
    --outputVolume ${BRAINSDemonWarp_BINARY_DIR}/symmetricLogDemons_test2.nii.gz
    --outputDebug
    --histogramMatch
583 584
    --numberOfHistogramBins 1024
    --numberOfMatchPoints 7
585 586 587
    --smoothDeformationFieldSigma 1.5
    --numberOfPyramidLevels 3
    --arrayOfPyramidLevelIterations 100,50,5
588 589
    --minimumFixedPyramid 4,4,4
    --minimumMovingPyramid 4,4,4
590
    --initializeWithDeformationField MIDAS{InitialDeformationField.nii.gz.md5}
hjohnson's avatar
ENH:  
hjohnson committed
591
    --registrationFilterType SymmetricLogDemons
592
)