CMakeLists.txt 29 KB
Newer Older
1
project( CLI )
lorensen's avatar
lorensen committed
2

3
#
lorensen's avatar
lorensen committed
4

5
6
7
8
9
find_package(GenerateCLP REQUIRED)
if(GenerateCLP_FOUND)
  include(${GenerateCLP_USE_FILE})
endif(GenerateCLP_FOUND)
find_package(vtkITK REQUIRED)
lorensen's avatar
lorensen committed
10

11
link_directories(${ModuleDescriptionParser_BINARY_DIR})
12

13
14
find_package(ITK REQUIRED)
include(${ITK_USE_FILE})
15

16
17
find_package(VTK REQUIRED)
include(${VTK_USE_FILE})
18

19
20
include_directories( ${SlicerBaseCLI_BINARY_DIR} ${SlicerBaseCLI_SOURCE_DIR} )
link_directories(${SlicerBaseCLI_BINARY_DIR})
21

22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#####################
if(BUILD_TESTING)
  set (CLP CLIModule4Test)

  set ( ${CLP}_SOURCE ${CLP}.cxx)
  generateclp(${CLP}_SOURCE ${CLP}.xml ${Slicer3_SOURCE_DIR}/Resources/ITKLogo.h)

  add_library(${CLP}Lib SHARED ${${CLP}_SOURCE})
  set_target_properties (${CLP}Lib PROPERTIES COMPILE_FLAGS "-Dmain=ModuleEntryPoint")
  slicer3_set_plugins_output_path(${CLP}Lib)
  target_link_libraries (${CLP}Lib)

  add_executable(${CLP} ${CLI_SOURCE_DIR}/Templates/CommandLineSharedLibraryWrapper.cxx)
  slicer3_set_plugins_output_path(${CLP})
  target_link_libraries (${CLP} ${CLP}Lib)
endif()

39
#####################
40
set (CLP DiffusionTensorTest)
41

42
43
set ( ${CLP}_SOURCE ${CLP}.cxx)
generateclp(${CLP}_SOURCE ${CLP}.xml ${Slicer3_SOURCE_DIR}/Resources/ITKLogo.h)
44

45
46
47
add_library(${CLP}Lib SHARED ${${CLP}_SOURCE})
set_target_properties (${CLP}Lib PROPERTIES COMPILE_FLAGS "-Dmain=ModuleEntryPoint")
slicer3_set_plugins_output_path(${CLP}Lib)
48
target_link_libraries (${CLP}Lib ITKIO)
49

50
51
52
53
add_executable(${CLP} ${CLI_SOURCE_DIR}/Templates/CommandLineSharedLibraryWrapper.cxx)
slicer3_set_plugins_output_path(${CLP})
target_link_libraries (${CLP} ${CLP}Lib)

rjosest's avatar
rjosest committed
54
#####################
55
#set (CLP DiffusionWeightedTest)
rjosest's avatar
rjosest committed
56

57
58
#set ( ${CLP}_SOURCE ${CLP}.cxx)
#generateclp(${CLP}_SOURCE ${CLP}.xml ${Slicer3_SOURCE_DIR}/Resources/ITKLogo.h)
59

60
61
62
63
#add_library(${CLP}Lib SHARED ${${CLP}_SOURCE})
#set_target_properties (${CLP}Lib PROPERTIES COMPILE_FLAGS "-Dmain=ModuleEntryPoint")
#slicer3_set_plugins_output_path(${CLP}Lib)
#target_link_libraries (${CLP}Lib ITKIO ITKBasicFilters)
64

65
66
67
#add_executable(${CLP} ${CLI_SOURCE_DIR}/Templates/CommandLineSharedLibraryWrapper.cxx)
#slicer3_set_plugins_output_path(${CLP})
#target_link_libraries (${CLP} ${CLP}Lib)
68

69

70
#####################
71
set (CLP DiffusionTensorEstimation)
72

73
74
75
set ( ${CLP}_SOURCE ${CLP}.cxx)
generateclp(${CLP}_SOURCE ${CLP}.xml ${Slicer3_SOURCE_DIR}/Resources/ITKLogo.h)
add_executable(${CLP} ${${CLP}_SOURCE})
76
slicer3_set_plugins_output_path(${CLP})
77
link_directories(${MRML_LIB_DIR} ${vtkTeem_LIB_DIR} ${SlicerBaseLogic_SOURCE_DIR}
alexy's avatar
alexy committed
78
  ${SlicerBaseLogic_BINARY_DIR})
79
target_link_libraries (${CLP} MRML vtkTeem SlicerBaseLogic)
80
81
82
83
84
include_directories(
  ${vtkITK_SOURCE_DIR} 
  ${vtkITK_BINARY_DIR} 
  ${MRML_SOURCE_DIR} ${MRML_BINARY_DIR} 
  ${vtkTeem_SOURCE_DIR}  ${vtkTeem_BINARY_DIR})
85

86
#####################
87
set (CLP DiffusionTensorMathematics)
88

89
90
91
set ( ${CLP}_SOURCE ${CLP}.cxx)
generateclp(${CLP}_SOURCE ${CLP}.xml ${Slicer3_SOURCE_DIR}/Resources/ITKLogo.h)
add_executable(${CLP} ${${CLP}_SOURCE})
92
slicer3_set_plugins_output_path(${CLP})
93
94
95
96
97
link_directories(${MRML_LIB_DIR} ${vtkTeem_LIB_DIR})
target_link_libraries (${CLP} MRML vtkTeem)
include_directories(
  ${MRML_SOURCE_DIR} ${MRML_BINARY_DIR} 
  ${vtkTeem_SOURCE_DIR}  ${vtkTeem_BINARY_DIR})
98

99
#####################
100
set (CLP OrientImage)
101

102
103
set ( ${CLP}_SOURCE ${CLP}.cxx)
generateclp(${CLP}_SOURCE ${CLP}.xml ${Slicer3_SOURCE_DIR}/Resources/NAMICLogo.h)
104

105
106
add_library(${CLP}Lib SHARED ${${CLP}_SOURCE})
set_target_properties (${CLP}Lib PROPERTIES COMPILE_FLAGS "-Dmain=ModuleEntryPoint")
107
slicer3_set_plugins_output_path(${CLP}Lib)
108
target_link_libraries (${CLP}Lib ITKIO ITKBasicFilters)
109

110
111
112
113
114
add_executable(${CLP} ${CLI_SOURCE_DIR}/Templates/CommandLineSharedLibraryWrapper.cxx)
slicer3_set_plugins_output_path(${CLP})
target_link_libraries (${CLP} ${CLP}Lib)


lorensen's avatar
lorensen committed
115
#####################
116
set (CLP LinearRegistration)
lorensen's avatar
lorensen committed
117

118
119
set ( ${CLP}_SOURCE ${CLP}.cxx)
generateclp(${CLP}_SOURCE ${CLP}.xml ${Slicer3_SOURCE_DIR}/Resources/NAMICLogo.h)
120
121
122
add_library(${CLP}Lib SHARED ${${CLP}_SOURCE})
set_target_properties (${CLP}Lib PROPERTIES COMPILE_FLAGS "-Dmain=ModuleEntryPoint")
slicer3_set_plugins_output_path(${CLP}Lib)
123
target_link_libraries (${CLP}Lib ITKIO ITKBasicFilters ITKNumerics)
124

125
126
127
128
add_executable(${CLP} ${CLI_SOURCE_DIR}/Templates/CommandLineSharedLibraryWrapper.cxx)
slicer3_set_plugins_output_path(${CLP})
target_link_libraries (${CLP} ${CLP}Lib)

129
130
131
132
133
134
135
136
137
138
139
#####################
set (CLP RigidRegistration)

set ( ${CLP}_SOURCE ${CLP}.cxx)
generateclp(${CLP}_SOURCE ${CLP}.xml ${Slicer3_SOURCE_DIR}/Resources/NAMICLogo.h)

add_library(${CLP}Lib SHARED ${${CLP}_SOURCE})
set_target_properties (${CLP}Lib PROPERTIES COMPILE_FLAGS "-Dmain=ModuleEntryPoint")
slicer3_set_plugins_output_path(${CLP}Lib)
target_link_libraries (${CLP}Lib ITKIO ITKBasicFilters ITKNumerics)

140
141
142
143
add_executable(${CLP} ${CLI_SOURCE_DIR}/Templates/CommandLineSharedLibraryWrapper.cxx)
slicer3_set_plugins_output_path(${CLP})
target_link_libraries (${CLP} ${CLP}Lib)

144
#####################
145
set (CLP AffineRegistration)
146

147
148
set ( ${CLP}_SOURCE ${CLP}.cxx)
generateclp(${CLP}_SOURCE ${CLP}.xml ${Slicer3_SOURCE_DIR}/Resources/NAMICLogo.h)
149

150
151
152
153
154
add_library(${CLP}Lib SHARED ${${CLP}_SOURCE})
set_target_properties (${CLP}Lib PROPERTIES COMPILE_FLAGS "-Dmain=ModuleEntryPoint")
slicer3_set_plugins_output_path(${CLP}Lib)
target_link_libraries (${CLP}Lib ITKIO ITKBasicFilters ITKNumerics)

155
156
157
158
add_executable(${CLP} ${CLI_SOURCE_DIR}/Templates/CommandLineSharedLibraryWrapper.cxx)
slicer3_set_plugins_output_path(${CLP})
target_link_libraries (${CLP} ${CLP}Lib)

159
#####################
160
set (CLP BSplineDeformableRegistration)
161

162
163
set ( ${CLP}_SOURCE ${CLP}.cxx)
generateclp(${CLP}_SOURCE ${CLP}.xml ${Slicer3_SOURCE_DIR}/Resources/NAMICLogo.h)
164

165
166
167
add_library(${CLP}Lib SHARED ${${CLP}_SOURCE})
set_target_properties (${CLP}Lib PROPERTIES COMPILE_FLAGS "-Dmain=ModuleEntryPoint")
slicer3_set_plugins_output_path(${CLP}Lib)
168
target_link_libraries (${CLP}Lib ITKStatistics ITKIO ITKBasicFilters ITKNumerics)
169

170
171
172
173
add_executable(${CLP} ${CLI_SOURCE_DIR}/Templates/CommandLineSharedLibraryWrapper.cxx)
slicer3_set_plugins_output_path(${CLP})
target_link_libraries (${CLP} ${CLP}Lib)

174
175
176
177
178
179
#####################
set (CLP TestGridTransformRegistration)

set ( ${CLP}_SOURCE ${CLP}.cxx)
generateclp(${CLP}_SOURCE ${CLP}.xml ${Slicer3_SOURCE_DIR}/Resources/NAMICLogo.h)

180
181
182
add_library(${CLP}Lib SHARED ${${CLP}_SOURCE})
set_target_properties (${CLP}Lib PROPERTIES COMPILE_FLAGS "-Dmain=ModuleEntryPoint")
slicer3_set_plugins_output_path(${CLP}Lib)
183
target_link_libraries (${CLP}Lib ITKStatistics ITKIO ITKBasicFilters ITKNumerics)
184

185
186
187
188
add_executable(${CLP} ${CLI_SOURCE_DIR}/Templates/CommandLineSharedLibraryWrapper.cxx)
slicer3_set_plugins_output_path(${CLP})
target_link_libraries (${CLP} ${CLP}Lib)

lorensen's avatar
lorensen committed
189
#####################
190
set (CLP CheckerBoard)
lorensen's avatar
lorensen committed
191

192
193
194
set ( ${CLP}_SOURCE ${CLP}.cxx)
generateclp(${CLP}_SOURCE ${CLP}.xml  ${Slicer3_SOURCE_DIR}/Resources/NAMICLogo.h)
add_library(${CLP}Lib SHARED ${${CLP}_SOURCE})
195
slicer3_set_plugins_output_path(${CLP}Lib)
196
197
set_target_properties (${CLP}Lib PROPERTIES COMPILE_FLAGS "-Dmain=ModuleEntryPoint")
target_link_libraries (${CLP}Lib ITKIO ITKBasicFilters)
lorensen's avatar
lorensen committed
198

199
200
201
202
add_executable(${CLP} ${CLI_SOURCE_DIR}/Templates/CommandLineSharedLibraryWrapper.cxx)
slicer3_set_plugins_output_path(${CLP})
target_link_libraries (${CLP} ${CLP}Lib)

203
#####################
204
set (CLP ResampleVolume)
205

206
207
set ( ${CLP}_SOURCE ${CLP}.cxx)
generateclp(${CLP}_SOURCE ${CLP}.xml ${Slicer3_SOURCE_DIR}/Resources/ITKLogo.h)
208

209
add_library(${CLP}Lib SHARED ${${CLP}_SOURCE})
210
slicer3_set_plugins_output_path(${CLP}Lib)
211
212
set_target_properties (${CLP}Lib PROPERTIES COMPILE_FLAGS "-Dmain=ModuleEntryPoint")
target_link_libraries (${CLP}Lib ITKIO ITKBasicFilters)
213

214
215
216
217
add_executable(${CLP} ${CLI_SOURCE_DIR}/Templates/CommandLineSharedLibraryWrapper.cxx)
slicer3_set_plugins_output_path(${CLP})
target_link_libraries (${CLP} ${CLP}Lib)

218
219
220
221
222
223
224
225
226
#####################
set (CLP PolyDataToLabelmap)

set ( ${CLP}_SOURCE ${CLP}.cxx)
generateclp(${CLP}_SOURCE ${CLP}.xml ${Slicer3_SOURCE_DIR}/Resources/NAMICLogo.h)

add_library(${CLP}Lib SHARED ${${CLP}_SOURCE})
slicer3_set_plugins_output_path(${CLP}Lib)
set_target_properties (${CLP}Lib PROPERTIES COMPILE_FLAGS "-Dmain=ModuleEntryPoint")
227
target_link_libraries (${CLP}Lib ITKIO vtkIO vtkGraphics ITKBasicFilters)
228

229
230
231
add_executable(${CLP} ${CLI_SOURCE_DIR}/Templates/CommandLineSharedLibraryWrapper.cxx)
slicer3_set_plugins_output_path(${CLP})
target_link_libraries (${CLP} ${CLP}Lib)
232

233
#####################
234
set (CLP GaussianBlurImageFilter)
235

236
237
set ( ${CLP}_SOURCE ${CLP}.cxx)
generateclp(${CLP}_SOURCE ${CLP}.xml ${Slicer3_SOURCE_DIR}/Resources/ITKLogo.h)
238

239
add_library(${CLP}Lib SHARED ${${CLP}_SOURCE})
240
slicer3_set_plugins_output_path(${CLP}Lib)
241
242
set_target_properties (${CLP}Lib PROPERTIES COMPILE_FLAGS "-Dmain=ModuleEntryPoint")
target_link_libraries (${CLP}Lib ITKIO ITKBasicFilters)
243

244
245
246
247
add_executable(${CLP} ${CLI_SOURCE_DIR}/Templates/CommandLineSharedLibraryWrapper.cxx)
slicer3_set_plugins_output_path(${CLP})
target_link_libraries (${CLP} ${CLP}Lib)

248

249
#####################
250
set (CLP ConfidenceConnected)
251

252
253
set ( ${CLP}_SOURCE ${CLP}.cxx)
generateclp(${CLP}_SOURCE ${CLP}.xml ${Slicer3_SOURCE_DIR}/Resources/ITKLogo.h)
254

255
add_library(${CLP}Lib SHARED ${${CLP}_SOURCE})
256
slicer3_set_plugins_output_path(${CLP}Lib)
257
258
set_target_properties (${CLP}Lib PROPERTIES COMPILE_FLAGS "-Dmain=ModuleEntryPoint")
target_link_libraries (${CLP}Lib ITKIO ITKBasicFilters)
259

260
261
262
263
add_executable(${CLP} ${CLI_SOURCE_DIR}/Templates/CommandLineSharedLibraryWrapper.cxx)
slicer3_set_plugins_output_path(${CLP})
target_link_libraries (${CLP} ${CLP}Lib)

264
#####################
265
set (CLP ExecutionModelTour)
266

267
268
269
set ( ${CLP}_SOURCE ${CLP}.cxx)
generateclp(${CLP}_SOURCE ${CLP}.xml ${Slicer3_SOURCE_DIR}/Resources/BillsLogo.h)
add_executable(${CLP} ${${CLP}_SOURCE})
270
slicer3_set_plugins_output_path(${CLP})
271
target_link_libraries (${CLP} MRML)
272
273
274
275

#####################


276
set (CLP ImageReadDicomWrite)
277

278
279
set ( ${CLP}_SOURCE ${CLP}.cxx)
generateclp (${CLP}_SOURCE ${CLP}.xml ${Slicer3_SOURCE_DIR}/Resources/ITKLogo.h)
280

281
add_library(${CLP}Lib SHARED ${${CLP}_SOURCE})
282
slicer3_set_plugins_output_path(${CLP}Lib)
283
284
set_target_properties (${CLP}Lib PROPERTIES COMPILE_FLAGS "-Dmain=ModuleEntryPoint")
target_link_libraries (${CLP}Lib ITKIO ITKBasicFilters)
285

286
287
288
289
add_executable(${CLP} ${CLI_SOURCE_DIR}/Templates/CommandLineSharedLibraryWrapper.cxx)
slicer3_set_plugins_output_path(${CLP})
target_link_libraries (${CLP} ${CLP}Lib)

290
#####################
291
set (CLP CurvatureAnisotropicDiffusion)
292

293
294
set ( ${CLP}_SOURCE ${CLP}.cxx)
generateclp(${CLP}_SOURCE ${CLP}.xml ${Slicer3_SOURCE_DIR}/Resources/ITKLogo.h)
295

296
add_library(${CLP}Lib SHARED ${${CLP}_SOURCE})
297
slicer3_set_plugins_output_path(${CLP}Lib)
298
299
set_target_properties (${CLP}Lib PROPERTIES COMPILE_FLAGS "-Dmain=ModuleEntryPoint")
target_link_libraries (${CLP}Lib ITKIO ITKBasicFilters)
300

301
302
303
304
add_executable(${CLP} ${CLI_SOURCE_DIR}/Templates/CommandLineSharedLibraryWrapper.cxx)
slicer3_set_plugins_output_path(${CLP})
target_link_libraries (${CLP} ${CLP}Lib)

305
#####################
306
set (CLP GradientAnisotropicDiffusion)
307

308
309
set ( ${CLP}_SOURCE ${CLP}.cxx)
generateclp(${CLP}_SOURCE ${CLP}.xml ${Slicer3_SOURCE_DIR}/Resources/ITKLogo.h)
310

311
add_library(${CLP}Lib SHARED ${${CLP}_SOURCE})
312
slicer3_set_plugins_output_path(${CLP}Lib)
313
314
set_target_properties (${CLP}Lib PROPERTIES COMPILE_FLAGS "-Dmain=ModuleEntryPoint")
target_link_libraries (${CLP}Lib ITKIO ITKBasicFilters)
315

316
317
318
add_executable(${CLP} ${CLI_SOURCE_DIR}/Templates/CommandLineSharedLibraryWrapper.cxx)
slicer3_set_plugins_output_path(${CLP})
target_link_libraries (${CLP} ${CLP}Lib)
319
#####################
320
set (CLP MedianImageFilter)
321

322
323
set ( ${CLP}_SOURCE ${CLP}.cxx)
generateclp(${CLP}_SOURCE ${CLP}.xml ${Slicer3_SOURCE_DIR}/Resources/ITKLogo.h)
324

325
add_library(${CLP}Lib SHARED ${${CLP}_SOURCE})
326
slicer3_set_plugins_output_path(${CLP}Lib)
327
328
set_target_properties (${CLP}Lib PROPERTIES COMPILE_FLAGS "-Dmain=ModuleEntryPoint")
target_link_libraries (${CLP}Lib ITKIO ITKBasicFilters)
329

330
331
332
add_executable(${CLP} ${CLI_SOURCE_DIR}/Templates/CommandLineSharedLibraryWrapper.cxx)
slicer3_set_plugins_output_path(${CLP})
target_link_libraries (${CLP} ${CLP}Lib)
333
#####################
334
add_subdirectory(DicomToNrrdConverter)
335
#####################
336
337
338
339
340
341
342
343
344
345
346
347
# set (CLP DWIDicomLoad)

# set ( ${CLP}_SOURCE ${CLP}.cxx)
# generateclp(${CLP}_SOURCE ${CLP}.xml ${Slicer3_SOURCE_DIR}/Resources/NAMICLogo.h)
# add_executable(${CLP} ${${CLP}_SOURCE})
# slicer3_set_plugins_output_path(${CLP})
# target_link_libraries (${CLP} ITKIO ITKBasicFilters)

# add_library(${CLP}Lib SHARED ${${CLP}_SOURCE})
# slicer3_set_plugins_output_path(${CLP}Lib)
# set_target_properties (${CLP}Lib PROPERTIES COMPILE_FLAGS "-Dmain=ModuleEntryPoint")
# target_link_libraries (${CLP}Lib ITKIO ITKBasicFilters)
348

349
#####################
350
set (CLP HistogramMatching)
351

352
353
set ( ${CLP}_SOURCE ${CLP}.cxx)
generateclp(${CLP}_SOURCE ${CLP}.xml ${Slicer3_SOURCE_DIR}/Resources/ITKLogo.h)
354

355
add_library(${CLP}Lib SHARED ${${CLP}_SOURCE})
356
slicer3_set_plugins_output_path(${CLP}Lib)
357
358
set_target_properties (${CLP}Lib PROPERTIES COMPILE_FLAGS "-Dmain=ModuleEntryPoint")
target_link_libraries (${CLP}Lib ITKIO ITKBasicFilters ITKStatistics)
359

360
361
362
363
add_executable(${CLP} ${CLI_SOURCE_DIR}/Templates/CommandLineSharedLibraryWrapper.cxx)
slicer3_set_plugins_output_path(${CLP})
target_link_libraries (${CLP} ${CLP}Lib)

364
#####################
365
set (CLP OtsuThresholdImageFilter)
366

367
368
set ( ${CLP}_SOURCE ${CLP}.cxx)
generateclp(${CLP}_SOURCE ${CLP}.xml ${Slicer3_SOURCE_DIR}/Resources/ITKLogo.h)
369

370
add_library(${CLP}Lib SHARED ${${CLP}_SOURCE})
371
slicer3_set_plugins_output_path(${CLP}Lib)
372
373
set_target_properties (${CLP}Lib PROPERTIES COMPILE_FLAGS "-Dmain=ModuleEntryPoint")
target_link_libraries (${CLP}Lib ITKIO ITKBasicFilters)
374

375
376
377
378
add_executable(${CLP} ${CLI_SOURCE_DIR}/Templates/CommandLineSharedLibraryWrapper.cxx)
slicer3_set_plugins_output_path(${CLP})
target_link_libraries (${CLP} ${CLP}Lib)

379
#####################
380
set (CLP OtsuThresholdSegmentation)
381

382
383
set ( ${CLP}_SOURCE ${CLP}.cxx)
generateclp(${CLP}_SOURCE ${CLP}.xml ${Slicer3_SOURCE_DIR}/Resources/NAMICLogo.h)
384

385
add_library(${CLP}Lib SHARED ${${CLP}_SOURCE})
386
slicer3_set_plugins_output_path(${CLP}Lib)
387
388
set_target_properties (${CLP}Lib PROPERTIES COMPILE_FLAGS "-Dmain=ModuleEntryPoint")
target_link_libraries (${CLP}Lib ITKIO ITKBasicFilters)
389

390
391
392
393
add_executable(${CLP} ${CLI_SOURCE_DIR}/Templates/CommandLineSharedLibraryWrapper.cxx)
slicer3_set_plugins_output_path(${CLP})
target_link_libraries (${CLP} ${CLP}Lib)

394
#####################
395
set (CLP Subtract)
396

397
398
set ( ${CLP}_SOURCE ${CLP}.cxx)
generateclp(${CLP}_SOURCE ${CLP}.xml ${Slicer3_SOURCE_DIR}/Resources/ITKLogo.h)
399

400
add_library(${CLP}Lib SHARED ${${CLP}_SOURCE})
401
slicer3_set_plugins_output_path(${CLP}Lib)
402
403
set_target_properties (${CLP}Lib PROPERTIES COMPILE_FLAGS "-Dmain=ModuleEntryPoint")
target_link_libraries (${CLP}Lib ITKIO ITKBasicFilters)
404

405
406
407
408
add_executable(${CLP} ${CLI_SOURCE_DIR}/Templates/CommandLineSharedLibraryWrapper.cxx)
slicer3_set_plugins_output_path(${CLP})
target_link_libraries (${CLP} ${CLP}Lib)

naucoin's avatar
naucoin committed
409
410
411
412
413
414
415
416
417
418
419
#####################
set (CLP Multiply)

set ( ${CLP}_SOURCE ${CLP}.cxx)
generateclp(${CLP}_SOURCE ${CLP}.xml ${Slicer3_SOURCE_DIR}/Resources/ITKLogo.h)

add_library(${CLP}Lib SHARED ${${CLP}_SOURCE})
slicer3_set_plugins_output_path(${CLP}Lib)
set_target_properties (${CLP}Lib PROPERTIES COMPILE_FLAGS "-Dmain=ModuleEntryPoint")
target_link_libraries (${CLP}Lib ITKIO ITKBasicFilters)

420
421
422
add_executable(${CLP} ${CLI_SOURCE_DIR}/Templates/CommandLineSharedLibraryWrapper.cxx)
slicer3_set_plugins_output_path(${CLP})
target_link_libraries (${CLP} ${CLP}Lib)
naucoin's avatar
naucoin committed
423

424
#####################
425
set (CLP Add)
426

427
428
set ( ${CLP}_SOURCE ${CLP}.cxx)
generateclp(${CLP}_SOURCE ${CLP}.xml ${Slicer3_SOURCE_DIR}/Resources/ITKLogo.h)
429

430
add_library(${CLP}Lib SHARED ${${CLP}_SOURCE})
431
slicer3_set_plugins_output_path(${CLP}Lib)
432
433
set_target_properties (${CLP}Lib PROPERTIES COMPILE_FLAGS "-Dmain=ModuleEntryPoint")
target_link_libraries (${CLP}Lib ITKIO ITKBasicFilters)
434

435
436
437
438
add_executable(${CLP} ${CLI_SOURCE_DIR}/Templates/CommandLineSharedLibraryWrapper.cxx)
slicer3_set_plugins_output_path(${CLP})
target_link_libraries (${CLP} ${CLP}Lib)

439
440
441
442
443
444
445
446
447
448
449
#####################
set (CLP Threshold)

set ( ${CLP}_SOURCE ${CLP}.cxx)
generateclp(${CLP}_SOURCE ${CLP}.xml ${Slicer3_SOURCE_DIR}/Resources/ITKLogo.h)

add_library(${CLP}Lib SHARED ${${CLP}_SOURCE})
slicer3_set_plugins_output_path(${CLP}Lib)
set_target_properties (${CLP}Lib PROPERTIES COMPILE_FLAGS "-Dmain=ModuleEntryPoint")
target_link_libraries (${CLP}Lib ITKIO ITKBasicFilters)

450
451
452
453
add_executable(${CLP} ${CLI_SOURCE_DIR}/Templates/CommandLineSharedLibraryWrapper.cxx)
slicer3_set_plugins_output_path(${CLP})
target_link_libraries (${CLP} ${CLP}Lib)

454
455
456
457
458
459
460
461
462
463
464
#####################
set (CLP Mask)

set ( ${CLP}_SOURCE ${CLP}.cxx)
generateclp(${CLP}_SOURCE ${CLP}.xml ${Slicer3_SOURCE_DIR}/Resources/ITKLogo.h)

add_library(${CLP}Lib SHARED ${${CLP}_SOURCE})
slicer3_set_plugins_output_path(${CLP}Lib)
set_target_properties (${CLP}Lib PROPERTIES COMPILE_FLAGS "-Dmain=ModuleEntryPoint")
target_link_libraries (${CLP}Lib ITKIO ITKBasicFilters)

465
466
467
468
add_executable(${CLP} ${CLI_SOURCE_DIR}/Templates/CommandLineSharedLibraryWrapper.cxx)
slicer3_set_plugins_output_path(${CLP})
target_link_libraries (${CLP} ${CLP}Lib)

naucoin's avatar
naucoin committed
469
470
471
472
473
474
475
476
477
478
479
#####################
set (CLP Cast)

set ( ${CLP}_SOURCE ${CLP}.cxx)
generateclp(${CLP}_SOURCE ${CLP}.xml ${Slicer3_SOURCE_DIR}/Resources/ITKLogo.h)

add_library(${CLP}Lib SHARED ${${CLP}_SOURCE})
slicer3_set_plugins_output_path(${CLP}Lib)
set_target_properties (${CLP}Lib PROPERTIES COMPILE_FLAGS "-Dmain=ModuleEntryPoint")
target_link_libraries (${CLP}Lib ITKIO ITKBasicFilters)

480
481
482
483
add_executable(${CLP} ${CLI_SOURCE_DIR}/Templates/CommandLineSharedLibraryWrapper.cxx)
slicer3_set_plugins_output_path(${CLP})
target_link_libraries (${CLP} ${CLP}Lib)

484
#####################
485
set (CLP VotingBinaryHoleFillingImageFilter)
486

487
488
set ( ${CLP}_SOURCE ${CLP}.cxx)
generateclp(${CLP}_SOURCE ${CLP}.xml ${Slicer3_SOURCE_DIR}/Resources/ITKLogo.h)
489

490
add_library(${CLP}Lib SHARED ${${CLP}_SOURCE})
491
slicer3_set_plugins_output_path(${CLP}Lib)
492
493
set_target_properties (${CLP}Lib PROPERTIES COMPILE_FLAGS "-Dmain=ModuleEntryPoint")
target_link_libraries (${CLP}Lib ITKIO ITKBasicFilters)
494

495
496
497
498
add_executable(${CLP} ${CLI_SOURCE_DIR}/Templates/CommandLineSharedLibraryWrapper.cxx)
slicer3_set_plugins_output_path(${CLP})
target_link_libraries (${CLP} ${CLP}Lib)

499
500
#####################

501
set (CLP ModelMaker)
502

503
504
505
506
set ( ${CLP}_SOURCE ${CLP}.cxx )
generateclp(${CLP}_SOURCE ${CLP}.xml ${Slicer3_SOURCE_DIR}/Resources/NAMICLogo.h)
link_directories(${vtkITK_LIB_DIR})
add_executable(${CLP} ${${CLP}_SOURCE})
507
slicer3_set_plugins_output_path(${CLP})
508
# TODO: remove SlicerBaseLogic once pass in color node information
509
target_link_libraries (${CLP}
510
  vtkITK
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
  ModuleDescriptionParser
  MRML
  SlicerBaseLogic
  SlicerBaseCLI
  )
include_directories(
  ${vtkITK_SOURCE_DIR} 
  ${vtkITK_BINARY_DIR} 
  ${MRML_SOURCE_DIR} ${MRML_BINARY_DIR} 
  ${SlicerBaseLogic_SOURCE_DIR}  ${SlicerBaseLogic_BINARY_DIR})

#####################

set (CLP MultipleModelsExample)

set ( ${CLP}_SOURCE ${CLP}.cxx )
generateclp(${CLP}_SOURCE ${CLP}.xml ${Slicer3_SOURCE_DIR}/Resources/NAMICLogo.h)
link_directories(${vtkITK_LIB_DIR})
add_executable(${CLP} ${${CLP}_SOURCE})
530
slicer3_set_plugins_output_path(${CLP})
531
# TODO: remove SlicerBaseLogic once pass in color node information
532
target_link_libraries (${CLP}
533
  vtkITK
534
535
536
537
538
539
540
541
542
543
  ModuleDescriptionParser
  MRML
  SlicerBaseLogic
  SlicerBaseCLI
  )
include_directories(
  ${vtkITK_SOURCE_DIR} 
  ${vtkITK_BINARY_DIR} 
  ${MRML_SOURCE_DIR} ${MRML_BINARY_DIR} 
  ${SlicerBaseLogic_SOURCE_DIR}  ${SlicerBaseLogic_BINARY_DIR})
544
545


546
#####################
547
set (CLP GrayscaleModelMaker)
548

549
550
551
552
set ( ${CLP}_SOURCE ${CLP}.cxx )
generateclp(${CLP}_SOURCE ${CLP}.xml ${Slicer3_SOURCE_DIR}/Resources/NAMICLogo.h)
link_directories(${vtkITK_LIB_DIR})
add_executable(${CLP} ${${CLP}_SOURCE})
553
slicer3_set_plugins_output_path(${CLP})
554
target_link_libraries (${CLP}
555
  vtkITK
556
557
  ModuleDescriptionParser
  SlicerBaseCLI
558
  vtkHybrid
559
560
  )
include_directories(${vtkITK_SOURCE_DIR} ${vtkITK_BINARY_DIR})
561

562
563
564
565
566
567
#####################

set (CLP MergeModels)

set ( ${CLP}_SOURCE ${CLP}.cxx )
generateclp(${CLP}_SOURCE ${CLP}.xml ${Slicer3_SOURCE_DIR}/Resources/NAMICLogo.h)
568

569
link_directories(${vtkITK_LIB_DIR})
570
571
572
573
574
575
576
include_directories(${vtkITK_SOURCE_DIR} ${vtkITK_BINARY_DIR})

add_library(${CLP}Lib SHARED ${${CLP}_SOURCE})
slicer3_set_plugins_output_path(${CLP}Lib)
set_target_properties (${CLP}Lib PROPERTIES COMPILE_FLAGS "-Dmain=ModuleEntryPoint")
target_link_libraries (${CLP}Lib vtkIO vtkGraphics)

577
578
add_executable(${CLP} ${${CLP}_SOURCE})
slicer3_set_plugins_output_path(${CLP})
579
target_link_libraries (${CLP} ${CLP}Lib
580
581
582
583
  vtkIO
  vtkGraphics
  )

lorensen's avatar
lorensen committed
584
#####################
585
set (CLP GrayscaleFillHoleImageFilter)
lorensen's avatar
lorensen committed
586

587
588
set ( ${CLP}_SOURCE ${CLP}.cxx)
generateclp(${CLP}_SOURCE ${CLP}.xml ${Slicer3_SOURCE_DIR}/Resources/ITKLogo.h)
lorensen's avatar
lorensen committed
589

590
add_library(${CLP}Lib SHARED ${${CLP}_SOURCE})
591
slicer3_set_plugins_output_path(${CLP}Lib)
592
593
set_target_properties (${CLP}Lib PROPERTIES COMPILE_FLAGS "-Dmain=ModuleEntryPoint")
target_link_libraries (${CLP}Lib ITKIO ITKBasicFilters)
594

595
596
597
598
add_executable(${CLP} ${CLI_SOURCE_DIR}/Templates/CommandLineSharedLibraryWrapper.cxx)
slicer3_set_plugins_output_path(${CLP})
target_link_libraries (${CLP} ${CLP}Lib)

599
#####################
600
set (CLP GrayscaleGrindPeakImageFilter)
601

602
603
set ( ${CLP}_SOURCE ${CLP}.cxx)
generateclp(${CLP}_SOURCE ${CLP}.xml ${Slicer3_SOURCE_DIR}/Resources/ITKLogo.h)
lorensen's avatar
lorensen committed
604

605
add_library(${CLP}Lib SHARED ${${CLP}_SOURCE})
606
slicer3_set_plugins_output_path(${CLP}Lib)
607
608
set_target_properties (${CLP}Lib PROPERTIES COMPILE_FLAGS "-Dmain=ModuleEntryPoint")
target_link_libraries (${CLP}Lib ITKIO ITKBasicFilters)
609

610
611
612
add_executable(${CLP} ${CLI_SOURCE_DIR}/Templates/CommandLineSharedLibraryWrapper.cxx)
slicer3_set_plugins_output_path(${CLP})
target_link_libraries (${CLP} ${CLP}Lib)
613

614
#####################
615
set (CLP LabelMapSmoothing)
616

617
618
set ( ${CLP}_SOURCE ${CLP}.cxx)
generateclp(${CLP}_SOURCE ${CLP}.xml ${Slicer3_SOURCE_DIR}/Resources/ITKLogo.h)
619

620
add_library(${CLP}Lib SHARED ${${CLP}_SOURCE})
621
slicer3_set_plugins_output_path(${CLP}Lib)
622
623
set_target_properties (${CLP}Lib PROPERTIES COMPILE_FLAGS "-Dmain=ModuleEntryPoint")
target_link_libraries (${CLP}Lib ITKIO ITKAlgorithms ITKBasicFilters)
624

625
626
627
628
add_executable(${CLP} ${CLI_SOURCE_DIR}/Templates/CommandLineSharedLibraryWrapper.cxx)
slicer3_set_plugins_output_path(${CLP})
target_link_libraries (${CLP} ${CLP}Lib)

629
#####################
630
set (CLP ImageLabelCombine)
631

632
633
634
set ( ${CLP}_SOURCE ${CLP}.cxx)
generateclp(${CLP}_SOURCE ${CLP}.xml ${Slicer3_SOURCE_DIR}/Resources/ITKLogo.h)
add_executable(${CLP} ${${CLP}_SOURCE})
635
slicer3_set_plugins_output_path(${CLP})
636
target_link_libraries (${CLP} ITKIO ITKBasicFilters)
637

638
639

#####################
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
set (CLP ComputeSUVBodyWeight)

set ( ${CLP}_SOURCE ${CLP}.cxx )
generateclp(${CLP}_SOURCE ${CLP}.xml ${Slicer3_SOURCE_DIR}/Resources/NAMICLogo.h ${Slicer3_SOURCE_DIR}/Resources/CTSCLogo.h)

link_directories(${vtkITK_LIB_DIR})
add_executable(${CLP} ${${CLP}_SOURCE})
slicer3_set_plugins_output_path(${CLP})
target_link_libraries (${CLP}
  vtkITK
  ModuleDescriptionParser
  MRML
  SlicerBaseLogic
  SlicerBaseCLI
  )

include_directories(
  ${vtkITK_SOURCE_DIR} 
  ${vtkITK_BINARY_DIR} 
  ${MRML_SOURCE_DIR} ${MRML_BINARY_DIR} 
  ${SlicerBaseLogic_SOURCE_DIR}  ${SlicerBaseLogic_BINARY_DIR}
)
662
663


664
#####################
665
set (CLP ResampleVolume2)
666

667
668
669
670
671
672
673
674
675
676
677
678
679
set( TRANSFORM_SOURCE 
DiffusionApplications/ResampleDTI/itkWarpTransform3D.h
DiffusionApplications/ResampleDTI/itkWarpTransform3D.txx
DiffusionApplications/ResampleDTI/itkTransformDeformationFieldFilter.h
DiffusionApplications/ResampleDTI/itkTransformDeformationFieldFilter.txx
DiffusionApplications/ResampleDTI/dtiprocessFiles/deformationfieldio.h
DiffusionApplications/ResampleDTI/dtiprocessFiles/deformationfieldio.cxx
DiffusionApplications/ResampleDTI/dtiprocessFiles/dtitypes.h
DiffusionApplications/ResampleDTI/dtiprocessFiles/itkHFieldToDeformationFieldImageFilter.h
DiffusionApplications/ResampleDTI/dtiprocessFiles/itkHFieldToDeformationFieldImageFilter.txx
)

set ( ${CLP}_SOURCE ${CLP}.cxx ${TRANSFORM_SOURCE} )
680
generateclp(${CLP}_SOURCE ${CLP}.xml ${Slicer3_SOURCE_DIR}/Resources/NAMICLogo.h)
681

682
add_library(${CLP}Lib SHARED ${${CLP}_SOURCE})
683
slicer3_set_plugins_output_path(${CLP}Lib)
684
set_target_properties (${CLP}Lib PROPERTIES COMPILE_FLAGS "-Dmain=ModuleEntryPoint")
685
target_link_libraries (${CLP}Lib ITKIO ITKBasicFilters ITKAlgorithms)
686

687
688
689
690
add_executable(${CLP} ${CLI_SOURCE_DIR}/Templates/CommandLineSharedLibraryWrapper.cxx)
slicer3_set_plugins_output_path(${CLP})
target_link_libraries (${CLP} ${CLP}Lib)

691
692
#####################

693
694
695
696
697
698
699
700
701
702
703
704
705
706
# culled from Slicer 3.6 release
#set (CLP ZeroCrossingBasedEdgeDetectionImageFilter)
#
#set ( ${CLP}_SOURCE ${CLP}.cxx)
#generateclp(${CLP}_SOURCE ${CLP}.xml ${Slicer3_SOURCE_DIR}/Resources/ITKLogo.h)
#
#add_library(${CLP}Lib SHARED ${${CLP}_SOURCE})
#slicer3_set_plugins_output_path(${CLP}Lib)
#set_target_properties (${CLP}Lib PROPERTIES COMPILE_FLAGS "-Dmain=ModuleEntryPoint")
#target_link_libraries (${CLP}Lib ITKIO ITKBasicFilters)
#
#add_executable(${CLP} ${CLI_SOURCE_DIR}/Templates/CommandLineSharedLibraryWrapper.cxx)
#slicer3_set_plugins_output_path(${CLP})
#target_link_libraries (${CLP} ${CLP}Lib)
707

708
709
710
#####################


711
712
713
714
715
716
717
718
719
720
# culled from Slicer 3.6 release
#set (CLP FreesurferSurfaceSectionExtraction)
#set ( ${CLP}_SOURCE ${CLP}.cxx)
#generateclp(${CLP}_SOURCE ${CLP}.xml)
#
#add_executable(${CLP} ${${CLP}_SOURCE})
#slicer3_set_plugins_output_path(${CLP})
#target_link_libraries (${CLP} ITKIO ITKBasicFilters)
#
#set( Slicer3_EXE ${Slicer3_BINARY_DIR}/Slicer3 )
721
722
723

###################

724
SET(cli_modules
725
  MRIBiasFieldCorrection
726
727
728
729
730
  SparseFieldLevelSetContour
  Realign
  DiffusionApplications
  #EndoNavTracking
  ExtractSkeleton
731
  Java
732
  N4ITKBiasFieldCorrection
733
  RobustStatisticsSegmenter
734
  )
735

736
if ( ${ITK_VERSION_MAJOR} GREATER 3 )
737

738
  SET(cli_modules ${cli_modules} RegisterImagesModule)
739

740
else ( ${ITK_VERSION_MAJOR} GREATER 3 )
741

742
743
  if ( ${ITK_VERSION_MAJOR} MATCHES 3 AND ${ITK_VERSION_MINOR} GREATER 12 )

744
    SET(cli_modules ${cli_modules} RegisterImagesModule)
745
746

  else ( ${ITK_VERSION_MAJOR} MATCHES 3 AND ${ITK_VERSION_MINOR} GREATER 12 )
747

748
749
    if ( ${ITK_VERSION_MAJOR} MATCHES 3 AND ${ITK_VERSION_MINOR} GREATER 6 )
      if ( ITK_USE_OPTIMIZED_REGISTRATION_METHODS )
750
        SET(cli_modules ${cli_modules} RegisterImagesModule)
751
752
753
754
755
756
      else ( ITK_USE_OPTIMIZED_REGISTRATION_METHODS )
        message ("RegisterImagesModule requires that the ITK_USE_OPTIMIZED_REGISTRATION_METHODS option be turned on when building ITK")
      endif ( ITK_USE_OPTIMIZED_REGISTRATION_METHODS )
    else ( ${ITK_VERSION_MAJOR} MATCHES 3 AND ${ITK_VERSION_MINOR} GREATER 6 )
      message ("RegisterImagesModule requires ITK version 3.8 or higher")
    endif ( ${ITK_VERSION_MAJOR} MATCHES 3 AND ${ITK_VERSION_MINOR} GREATER 6 )
757

758
  endif ( ${ITK_VERSION_MAJOR} MATCHES 3 AND ${ITK_VERSION_MINOR} GREATER 12 )
759

760
endif ( ${ITK_VERSION_MAJOR} GREATER 3 )
761

762
763
764
765
766
# culled from Slicer 3.6 release
#SET(cli_modules ${cli_modules}
  # UtahBSpline
  # DiffeomorphicDemonsRegistration
#  )
767

768
if(Slicer_USE_MIDAS)
769
  SET(cli_modules ${cli_modules} MIDASApplications)
770
endif(Slicer_USE_MIDAS)
771

772
if(Slicer_USE_BatchMake)
773
  SET(cli_modules ${cli_modules} BatchMakeApplications)
774
endif(Slicer_USE_BatchMake)
775

776
777
778
779
780
#SET(cli_modules ${cli_modules} Utah)

FOREACH(cli_module ${cli_modules})
  ADD_SUBDIRECTORY(${cli_module})
ENDFOREACH(cli_module)
781

782
if (Slicer3_SOURCE_DIR)
783
784
785
  # install each target in the production area (where it would appear in an 
  # installation) and install each target in the developer area (for running 
  # from a build)
786
787
788
789
790
791
792
793
794
795
  set(TARGETS
    ResampleVolume
    ResampleVolumeLib
    ResampleVolume2
    ResampleVolume2Lib
    ExecutionModelTour
    ImageReadDicomWrite
    ImageReadDicomWriteLib
    Add
    AddLib
naucoin's avatar
naucoin committed
796
797
    Threshold
    ThresholdLib
798
799
    Mask
    MaskLib
naucoin's avatar
naucoin committed
800
801
    Cast
    CastLib
802
803
    ConfidenceConnected
    ConfidenceConnectedLib
804
805
    #CurvatureAnisotropicDiffusion
    #CurvatureAnisotropicDiffusionLib
806
807
    GradientAnisotropicDiffusion
    GradientAnisotropicDiffusionLib
808
    MedianImageFilter
809
    MedianImageFilterLib
naucoin's avatar
naucoin committed
810
811
    Multiply
    MultiplyLib
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
    OtsuThresholdImageFilter
    OtsuThresholdImageFilterLib
    OtsuThresholdSegmentation
    OtsuThresholdSegmentationLib
    Subtract
    SubtractLib
    VotingBinaryHoleFillingImageFilter
    VotingBinaryHoleFillingImageFilterLib
    ModelMaker
    GrayscaleModelMaker
    GrayscaleFillHoleImageFilter
    GrayscaleFillHoleImageFilterLib
    GrayscaleGrindPeakImageFilter
    GrayscaleGrindPeakImageFilterLib
    HistogramMatching
    HistogramMatchingLib
828
829
    RigidRegistration
    RigidRegistrationLib
830
    LinearRegistration
831
    LinearRegistrationLib
832
    AffineRegistration
833
    AffineRegistrationLib
834
    BSplineDeformableRegistration
835
    BSplineDeformableRegistrationLib
836
    ComputeSUVBodyWeight
837
838
839
840
841
842
843
844
    LabelMapSmoothing
    LabelMapSmoothingLib
    ImageLabelCombine
    OrientImage
    OrientImageLib
    CheckerBoardLib
    GaussianBlurImageFilter
    GaussianBlurImageFilterLib
845
846
#    DWIDicomLoad
#    DWIDicomLoadLib
847
848
849
    #FreesurferSurfaceSectionExtraction
    #ZeroCrossingBasedEdgeDetectionImageFilter
    #ZeroCrossingBasedEdgeDetectionImageFilterLib
850
851
852
853
    DiffusionTensorMathematics
    DiffusionTensorEstimation
    )

854
  slicer3_install_plugins(${TARGETS})
855
856

endif (Slicer3_SOURCE_DIR)
lorensen's avatar
lorensen committed
857
858
859

#

860
option(BUILD_BRAINSTOOLS "Build the BRAINS subset of registraiton and segmentation tools" ON)
861
862
863
864
if(BUILD_BRAINSTOOLS)
  add_subdirectory(BRAINSTools)
endif(BUILD_BRAINSTOOLS)

865
if(BUILD_TESTING)
866
  ADD_SUBDIRECTORY(Testing)
867
endif(BUILD_TESTING)