]> Creatis software - clitk.git/blob - tools/CMakeLists.txt
Merge branch 'VTK6_Qt5_Overlay4D' into VTK6_Qt5_Binarize
[clitk.git] / tools / CMakeLists.txt
1 #=========================================================
2 # Add Libraries used in vv and clitk to avoid recompilation
3 WRAP_GGO(clitkCropImage_GGO_C clitkCropImage.ggo)
4 add_library(clitkCropImageLib clitkCropImageGenericFilter.cxx ${clitkCropImage_GGO_C})
5
6 WRAP_GGO(clitkImageConvert_GGO_C clitkImageConvert.ggo)
7 add_library(clitkImageConvertLib clitkImageConvertGenericFilter.cxx ${clitkImageConvert_GGO_C})
8
9 WRAP_GGO(clitkBinarizeImage_GGO_C clitkBinarizeImage.ggo)
10 add_library(clitkBinarizeImageLib clitkBinarizeImageGenericFilter.cxx ${clitkBinarizeImage_GGO_C})
11
12 WRAP_GGO(clitkImageArithm_GGO_C clitkImageArithm.ggo)
13 add_library(clitkImageArithmImageLib clitkImageArithmGenericFilter.cxx ${clitkImageArithm_GGO_C})
14
15 WRAP_GGO(clitkVectorArithm_GGO_C clitkVectorArithm.ggo)
16 add_library(clitkVectorArithmLib clitkVectorArithmGenericFilter.cxx ${clitkVectorArithm_GGO_C})
17
18 WRAP_GGO(clitkResampleImage_GGO_C clitkResampleImage.ggo)
19 add_library(clitkResampleImageLib clitkResampleImageGenericFilter.cxx ${clitkResampleImage_GGO_C})
20
21 WRAP_GGO(clitkMIP_GGO_C clitkMIP.ggo)
22 add_library(clitkMIPLib clitkMIPGenericFilter.cxx ${clitkMIP_GGO_C})
23
24 WRAP_GGO(clitkMedianImageFilter_GGO_C clitkMedianImageFilter.ggo)
25 add_library(clitkMedianImageFilterLib clitkMedianImageGenericFilter.cxx ${clitkMedianImageFilter_GGO_C})
26
27 #=========================================================
28 if(CLITK_BUILD_TOOLS)
29
30   WRAP_GGO(clitkDicomInfo_GGO_C clitkDicomInfo.ggo)
31   add_executable(clitkDicomInfo clitkDicomInfo.cxx ${clitkDicomInfo_GGO_C})
32   target_link_libraries(clitkDicomInfo clitkCommon)
33   # set_target_properties(clitkDicomInfo
34   #   PROPERTIES
35   #   LINK_INTERFACE_LIBRARIES ""
36   #   )
37   set(TOOLS_INSTALL clitkDicomInfo)
38
39   WRAP_GGO(clitkDicom2Image_GGO_C clitkDicom2Image.ggo)
40   add_executable(clitkDicom2Image clitkDicom2Image.cxx ${clitkDicom2Image_GGO_C})
41   target_link_libraries(clitkDicom2Image clitkCommon)
42   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkDicom2Image)
43
44   WRAP_GGO(clitkDicomWave2Text_GGO_C clitkDicomWave2Text.ggo)
45   add_executable(clitkDicomWave2Text clitkDicomWave2Text.cxx ${clitkDicomWave2Text_GGO_C})
46   target_link_libraries(clitkDicomWave2Text clitkCommon)
47   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkDicomWave2Text)
48
49   WRAP_GGO(clitkImageInfo_GGO_C clitkImageInfo.ggo)
50   add_executable(clitkImageInfo clitkImageInfo.cxx ${clitkImageInfo_GGO_C})
51   target_link_libraries(clitkImageInfo clitkCommon)
52   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkImageInfo)
53
54   add_executable(clitkImageConvert clitkImageConvert.cxx)
55   target_link_libraries(clitkImageConvert clitkImageConvertLib clitkCommon)
56   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkImageConvert)
57
58   add_executable(clitkBinarizeImage clitkBinarizeImage.cxx)
59   target_link_libraries(clitkBinarizeImage clitkBinarizeImageLib clitkCommon)
60   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkBinarizeImage)
61
62   WRAP_GGO(clitkVFResample_GGO_C clitkVFResample.ggo)
63   add_executable(clitkVFResample clitkVFResample.cxx clitkVFResampleGenericFilter.cxx ${clitkVFResample_GGO_C})
64   target_link_libraries(clitkVFResample clitkCommon)
65   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkVFResample)
66
67   WRAP_GGO(clitkVFInterpolate_GGO_C clitkVFInterpolate.ggo)
68   add_executable(clitkVFInterpolate clitkVFInterpolate.cxx clitkVFInterpolateGenericFilter.cxx ${clitkVFInterpolate_GGO_C})
69   target_link_libraries(clitkVFInterpolate clitkCommon)
70   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkVFInterpolate)
71
72   WRAP_GGO(clitkImageCreate_GGO_C clitkImageCreate.ggo)
73   add_executable(clitkImageCreate clitkImageCreate.cxx ${clitkImageCreate_GGO_C})
74   target_link_libraries(clitkImageCreate clitkCommon)
75   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkImageCreate)
76
77   WRAP_GGO(clitkZeroVF_GGO_C clitkZeroVF.ggo)
78   add_executable(clitkZeroVF clitkZeroVF.cxx ${clitkZeroVF_GGO_C} clitkZeroVFGenericFilter.cxx)
79   target_link_libraries(clitkZeroVF clitkCommon)
80   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkZeroVF)
81
82   WRAP_GGO(clitkSplitImage_GGO_C clitkSplitImage.ggo)
83   add_executable(clitkSplitImage clitkSplitImage.cxx clitkSplitImageGenericFilter.cxx ${clitkSplitImage_GGO_C})
84   target_link_libraries(clitkSplitImage clitkCommon )
85   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkSplitImage)
86
87   WRAP_GGO(clitkWriteDicomSeries_GGO_C clitkWriteDicomSeries.ggo)
88   add_executable(clitkWriteDicomSeries clitkWriteDicomSeries.cxx ${clitkWriteDicomSeries_GGO_C})
89   target_link_libraries(clitkWriteDicomSeries clitkCommon )
90   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkWriteDicomSeries)
91
92   WRAP_GGO(clitkMedianTemporalDimension_GGO_C clitkMedianTemporalDimension.ggo)
93   add_executable(clitkMedianTemporalDimension clitkMedianTemporalDimension.cxx
94     ${clitkMedianTemporalDimension_GGO_C})
95   target_link_libraries(clitkMedianTemporalDimension clitkCommon )
96   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMedianTemporalDimension)
97
98   WRAP_GGO(clitkWarpImage_GGO_C clitkWarpImage.ggo)
99   add_executable(clitkWarpImage clitkWarpImage.cxx ${clitkWarpImage_GGO_C} clitkWarpImageGenericFilter.cxx)
100   target_link_libraries(clitkWarpImage clitkCommon)
101   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkWarpImage)
102
103   WRAP_GGO(clitkInvertVF_GGO_C clitkInvertVF.ggo)
104   add_executable(clitkInvertVF clitkInvertVF.cxx ${clitkInvertVF_GGO_C})
105   target_link_libraries(clitkInvertVF clitkCommon)
106   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkInvertVF)
107
108   WRAP_GGO(clitkAffineTransform_GGO_C clitkAffineTransform.ggo)
109   add_executable(clitkAffineTransform clitkAffineTransform.cxx ${clitkAffineTransform_GGO_C})
110   target_link_libraries(clitkAffineTransform clitkCommon )
111   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkAffineTransform)
112
113   WRAP_GGO(clitkElastixTransformToMatrix_GGO_C clitkElastixTransformToMatrix.ggo)
114   add_executable(clitkElastixTransformToMatrix clitkElastixTransformToMatrix.cxx ${clitkElastixTransformToMatrix_GGO_C})
115   target_link_libraries(clitkElastixTransformToMatrix clitkCommon )
116   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkElastixTransformToMatrix)
117
118   WRAP_GGO(clitkMatrixToElastixTransform_GGO_C clitkMatrixToElastixTransform.ggo)
119   add_executable(clitkMatrixToElastixTransform clitkMatrixToElastixTransform.cxx ${clitkMatrixToElastixTransform_GGO_C})
120   target_link_libraries(clitkMatrixToElastixTransform clitkCommon )
121   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMatrixToElastixTransform)
122
123   WRAP_GGO(clitkMatrixMultiply_GGO_C clitkMatrixMultiply.ggo)
124   add_executable(clitkMatrixMultiply clitkMatrixMultiply.cxx ${clitkMatrixMultiply_GGO_C})
125   target_link_libraries(clitkMatrixMultiply clitkCommon )
126   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMatrixMultiply)
127
128   WRAP_GGO(clitkMatrixInverse_GGO_C clitkMatrixInverse.ggo)
129   add_executable(clitkMatrixInverse clitkMatrixInverse.cxx ${clitkMatrixInverse_GGO_C})
130   target_link_libraries(clitkMatrixInverse clitkCommon )
131   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMatrixInverse)
132
133   WRAP_GGO(clitkSetBackground_GGO_C clitkSetBackground.ggo)
134   add_executable(clitkSetBackground clitkSetBackground.cxx clitkSetBackgroundGenericFilter.cxx ${clitkSetBackground_GGO_C})
135   target_link_libraries(clitkSetBackground clitkCommon)
136   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkSetBackground)
137
138   WRAP_GGO(clitkGammaIndex_GGO_C clitkGammaIndex.ggo)
139   add_executable(clitkGammaIndex clitkGammaIndex.cxx ${clitkGammaIndex_GGO_C})
140   target_link_libraries(clitkGammaIndex clitkCommon)
141   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkGammaIndex)
142
143   add_executable(clitkImageArithm clitkImageArithm.cxx)
144   target_link_libraries(clitkImageArithm clitkImageArithmImageLib clitkCommon )
145   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkImageArithm)
146
147   add_executable(clitkVectorArithm clitkVectorArithm.cxx)
148   target_link_libraries(clitkVectorArithm clitkVectorArithmLib clitkCommon )
149   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkVectorArithm)
150
151   WRAP_GGO(clitkUnsharpMask_GGO_C clitkUnsharpMask.ggo)
152   add_executable(clitkUnsharpMask clitkUnsharpMask.cxx ${clitkUnsharpMask_GGO_C})
153   target_link_libraries(clitkUnsharpMask clitkCommon )
154   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkUnsharpMask)
155
156   WRAP_GGO(clitkFooImage_GGO_C clitkFooImage.ggo)
157   add_executable(clitkFooImage clitkFooImage.cxx ${clitkFooImage_GGO_C})
158   target_link_libraries(clitkFooImage clitkCommon )
159   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkFooImage)
160
161   WRAP_GGO(clitkMedianImageFilter_GGO_C clitkMedianImageFilter.ggo)
162   add_executable(clitkMedianImageFilter clitkMedianImageFilter.cxx ${clitkMedianImageFilter_GGO_C})
163   target_link_libraries(clitkMedianImageFilter clitkMedianImageFilterLib clitkCommon)
164   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMedianImageFilter)
165
166   add_executable(clitkResampleImage clitkResampleImage.cxx)
167   target_link_libraries(clitkResampleImage clitkResampleImageLib clitkCommon)
168   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkResampleImage)
169
170   WRAP_GGO(clitkMinMaxMask_GGO_C clitkMinMaxMask.ggo)
171   add_executable(clitkMinMaxMask clitkMinMaxMask.cxx ${clitkMinMaxMask_GGO_C})
172   target_link_libraries(clitkMinMaxMask clitkCommon  )
173   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMinMaxMask)
174
175   WRAP_GGO(clitkAutoCrop_GGO_C clitkAutoCrop.ggo)
176   add_executable(clitkAutoCrop clitkAutoCrop.cxx ${clitkAutoCrop_GGO_C})
177   target_link_libraries(clitkAutoCrop clitkCommon )
178   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkAutoCrop)
179
180   WRAP_GGO(clitkDicomRTStruct2Image_GGO_C clitkDicomRTStruct2Image.ggo)
181   add_executable(clitkDicomRTStruct2Image clitkDicomRTStruct2Image.cxx ${clitkDicomRTStruct2Image_GGO_C})
182   target_link_libraries(clitkDicomRTStruct2Image clitkDicomRTStruct)
183   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkDicomRTStruct2Image)
184
185   if(CLITK_USE_SYSTEM_GDCM)
186     WRAP_GGO(clitkImage2DicomRTStruct_GGO_C clitkImage2DicomRTStruct.ggo)
187     add_executable(clitkImage2DicomRTStruct clitkImage2DicomRTStruct.cxx ${clitkImage2DicomRTStruct_GGO_C})
188     target_link_libraries(clitkImage2DicomRTStruct clitkDicomRTStruct)
189   endif()
190
191   WRAP_GGO(clitkComposeVF_GGO_C clitkComposeVF.ggo)
192   add_executable(clitkComposeVF clitkComposeVFGenericFilter.cxx clitkComposeVF.cxx ${clitkComposeVF_GGO_C})
193   target_link_libraries(clitkComposeVF clitkCommon  )
194   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkComposeVF)
195
196   WRAP_GGO(clitkMergeSequence_GGO_C clitkMergeSequence.ggo)
197   add_executable(clitkMergeSequence clitkMergeSequence.cxx clitkMergeSequenceGenericFilter.cxx ${clitkMergeSequence_GGO_C})
198   target_link_libraries(clitkMergeSequence clitkCommon)
199   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMergeSequence)
200
201   WRAP_GGO(clitkBackProjectImage_GGO_C clitkBackProjectImage.ggo)
202   add_executable(clitkBackProjectImage clitkBackProjectImage.cxx clitkBackProjectImageGenericFilter.cxx ${clitkBackProjectImage_GGO_C})
203   target_link_libraries(clitkBackProjectImage clitkCommon)
204   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkBackProjectImage)
205
206   add_executable(clitkCropImage clitkCropImage.cxx ${clitkCropImage_GGO_C})
207   target_link_libraries(clitkCropImage clitkCropImageLib clitkCommon)
208   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkCropImage)
209
210   # WRAP_GGO(clitkExtractSlice_GGO_C clitkExtractSlice.ggo)
211   # add_executable(clitkExtractSlice clitkExtractSlice.cxx clitkExtractSliceGenericFilter.cxx ${clitkExtractSlice_GGO_C})
212   # target_link_libraries(clitkExtractSlice clitkCommon)
213   #set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkExtractSlice)
214
215   WRAP_GGO(clitkFlipImage_GGO_C clitkFlipImage.ggo)
216   add_executable(clitkFlipImage clitkFlipImage.cxx clitkFlipImageGenericFilter.cxx ${clitkFlipImage_GGO_C})
217   target_link_libraries(clitkFlipImage clitkCommon)
218   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkFlipImage)
219
220   WRAP_GGO(clitkMirrorPadImage_GGO_C clitkMirrorPadImage.ggo)
221   add_executable(clitkMirrorPadImage clitkMirrorPadImage.cxx clitkMirrorPadImageGenericFilter.cxx ${clitkMirrorPadImage_GGO_C})
222   target_link_libraries(clitkMirrorPadImage clitkCommon)
223   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMirrorPadImage)
224
225   WRAP_GGO(clitkImageMoment_GGO_C clitkImageMoment.ggo)
226   add_executable(clitkImageMoment clitkImageMoment.cxx clitkImageMomentGenericFilter.cxx ${clitkImageMoment_GGO_C})
227   target_link_libraries(clitkImageMoment clitkCommon)
228   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkImageMoment)
229
230   WRAP_GGO(clitkImageStatistics_GGO_C clitkImageStatistics.ggo)
231   add_executable(clitkImageStatistics clitkImageStatistics.cxx clitkImageStatisticsGenericFilter.cxx ${clitkImageStatistics_GGO_C})
232   target_link_libraries(clitkImageStatistics clitkCommon)
233   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkImageStatistics)
234
235   WRAP_GGO(clitkVFConvert_GGO_C clitkVFConvert.ggo)
236   add_executable(clitkVFConvert clitkVFConvert.cxx clitkVFConvertGenericFilter.cxx ${clitkVFConvert_GGO_C})
237   target_link_libraries(clitkVFConvert clitkCommon )
238   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkVFConvert)
239
240   WRAP_GGO(clitkImageToVectorImage_GGO_C clitkImageToVectorImage.ggo)
241   add_executable(clitkImageToVectorImage  clitkImageToVectorImage.cxx clitkImageToVectorImageGenericFilter.cxx ${clitkImageToVectorImage_GGO_C})
242   target_link_libraries(clitkImageToVectorImage  clitkCommon)
243   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkImageToVectorImage)
244
245   WRAP_GGO(clitkVectorImageToImage_GGO_C clitkVectorImageToImage.ggo)
246   add_executable(clitkVectorImageToImage  clitkVectorImageToImage.cxx clitkVectorImageToImageGenericFilter.cxx ${clitkVectorImageToImage_GGO_C})
247   target_link_libraries(clitkVectorImageToImage  clitkCommon)
248   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkVectorImageToImage)
249
250   add_executable(clitkMIP clitkMIP.cxx clitkMIPGenericFilter.cxx)
251   target_link_libraries(clitkMIP clitkMIPLib clitkCommon)
252   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMIP)
253
254   WRAP_GGO(clitkTransformLandmarks_GGO_C clitkTransformLandmarks.ggo)
255   add_executable(clitkTransformLandmarks clitkTransformLandmarks.cxx ${clitkTransformLandmarks_GGO_C})
256   target_link_libraries(clitkTransformLandmarks clitkCommon)
257   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkTransformLandmarks)
258
259   WRAP_GGO(clitkMaskLandmarks_GGO_C clitkMaskLandmarks.ggo)
260   add_executable(clitkMaskLandmarks clitkMaskLandmarks.cxx ${clitkMaskLandmarks_GGO_C})
261   target_link_libraries(clitkMaskLandmarks clitkCommon)
262   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMaskLandmarks)
263
264   WRAP_GGO(clitkJacobianImage_GGO_C clitkJacobianImage.ggo)
265   add_executable(clitkJacobianImage clitkJacobianImage.cxx clitkJacobianImageGenericFilter.cxx ${clitkJacobianImage_GGO_C})
266   target_link_libraries(clitkJacobianImage clitkCommon)
267   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkJacobianImage)
268
269   WRAP_GGO(clitkPadImage_GGO_C clitkPadImage.ggo)
270   add_executable(clitkPadImage clitkPadImage.cxx clitkPadImageGenericFilter.cxx ${clitkPadImage_GGO_C})
271   target_link_libraries(clitkPadImage clitkCommon)
272   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkPadImage)
273
274   WRAP_GGO(clitkCatImage_GGO_C clitkCatImage.ggo)
275   add_executable(clitkCatImage clitkCatImage.cxx ${clitkCatImage_GGO_C})
276   target_link_libraries(clitkCatImage clitkCommon)
277   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkCatImage)
278
279   WRAP_GGO(clitkAnisotropicDiffusion_GGO_C clitkAnisotropicDiffusion.ggo)
280   add_executable(clitkAnisotropicDiffusion clitkAnisotropicDiffusion.cxx
281     clitkAnisotropicDiffusionGenericFilter.cxx
282     ${clitkAnisotropicDiffusion_GGO_C})
283   target_link_libraries(clitkAnisotropicDiffusion clitkCommon)
284   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkAnisotropicDiffusion)
285
286   WRAP_GGO(clitkChangeImageInfo_GGO_C clitkChangeImageInfo.ggo)
287   add_executable(clitkChangeImageInfo clitkChangeImageInfo.cxx
288     clitkChangeImageInfoGenericFilter.cxx
289     ${clitkChangeImageInfo_GGO_C})
290   target_link_libraries(clitkChangeImageInfo clitkCommon)
291   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkChangeImageInfo)
292
293   WRAP_GGO(clitkMergeAsciiDoseActor_GGO_C clitkMergeAsciiDoseActor.ggo)
294   add_executable(clitkMergeAsciiDoseActor clitkMergeAsciiDoseActor.cxx ${clitkMergeAsciiDoseActor_GGO_C})
295   target_link_libraries(clitkMergeAsciiDoseActor ITKCommon clitkCommon)
296   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMergeAsciiDoseActor)
297
298   WRAP_GGO(clitkImageUncertainty_GGO_C clitkImageUncertainty.ggo)
299   add_executable(clitkImageUncertainty clitkImageUncertainty.cxx clitkImageUncertainty_ggo.c)
300   target_link_libraries(clitkImageUncertainty clitkCommon ${ITK_LIBRARIES})
301   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkImageUncertainty)
302
303   WRAP_GGO(clitkNormalizeImageFilter_GGO_C clitkNormalizeImageFilter.ggo)
304   add_executable(clitkNormalizeImageFilter clitkNormalizeImageFilter.cxx ${clitkNormalizeImageFilter_GGO_C})
305   target_link_libraries(clitkNormalizeImageFilter clitkCommon )
306   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkNormalizeImageFilter)
307
308   WRAP_GGO(clitkImageGradientMagnitude_GGO_C clitkImageGradientMagnitude.ggo)
309   add_executable(clitkImageGradientMagnitude clitkImageGradientMagnitude.cxx ${clitkImageGradientMagnitude_GGO_C})
310   target_link_libraries(clitkImageGradientMagnitude clitkCommon )
311   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkImageGradientMagnitude)
312
313   WRAP_GGO(clitkImageLaplacian_GGO_C clitkImageLaplacian.ggo)
314   add_executable(clitkImageLaplacian clitkImageLaplacian.cxx ${clitkImageLaplacian_GGO_C})
315   target_link_libraries(clitkImageLaplacian clitkCommon )
316   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkImageLaplacian)
317
318   WRAP_GGO(clitkImageIntensityWindowing_GGO_C clitkImageIntensityWindowing.ggo)
319   add_executable(clitkImageIntensityWindowing clitkImageIntensityWindowing.cxx ${clitkImageIntensityWindowing_GGO_C})
320   target_link_libraries(clitkImageIntensityWindowing clitkCommon )
321   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkImageIntensityWindowing)
322
323   WRAP_GGO(clitkBlurImage_GGO_C clitkBlurImage.ggo)
324   add_executable(clitkBlurImage clitkBlurImage.cxx ${clitkBlurImage_GGO_C})
325   target_link_libraries(clitkBlurImage clitkCommon )
326   set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkBlurImage)
327
328   #=========================================================
329   option(CLITK_USE_ROOT "Build experimental tools using root" OFF)
330   if (CLITK_USE_ROOT)
331     find_package(ROOT REQUIRED)
332     if(ROOT_FOUND)
333       message(STATUS "ROOT found : ${ROOT_LIBRARY_DIR} ${ROOT_INCLUDE_DIR} ${ROOT_LIBRARIES}")
334     else(ROOT_FOUND)
335       message(FATAL_ERROR
336         "Cannot build without ROOT.  Please set ROOTSYS environement variable.")
337     endif(ROOT_FOUND)
338     include_directories(${ROOT_INCLUDE_DIR})
339     link_directories(${ROOT_LIBRARY_DIR})
340     WRAP_GGO(clitkMergeRootFiles_GGO_C clitkMergeRootFiles.ggo)
341     add_executable(clitkMergeRootFiles clitkMergeRootFiles.cxx GateMergeManager.cc ${clitkMergeRootFiles_GGO_C})
342     target_link_libraries(clitkMergeRootFiles ${ROOT_LIBRARIES})
343     set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMergeRootFiles)
344   endif()
345   #=========================================================
346
347
348   #=========================================================
349   if(CLITK_EXPERIMENTAL)
350     WRAP_GGO(clitkBinaryImageToMesh_GGO_C clitkBinaryImageToMesh.ggo)
351     add_executable(clitkBinaryImageToMesh clitkBinaryImageToMesh.cxx ${clitkBinaryImageToMesh_GGO_C})
352     target_link_libraries(clitkBinaryImageToMesh clitkCommon)
353     set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkBinaryImageToMesh)
354
355     WRAP_GGO(clitkMeshToBinaryImage_GGO_C clitkMeshToBinaryImage.ggo)
356     add_executable(clitkMeshToBinaryImage clitkMeshToBinaryImage.cxx ${clitkMeshToBinaryImage_GGO_C})
357     target_link_libraries(clitkMeshToBinaryImage clitkCommon)
358     set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMeshToBinaryImage)
359
360     WRAP_GGO(clitkMeshViewer_GGO_C clitkMeshViewer.ggo)
361     add_executable(clitkMeshViewer clitkMeshViewer.cxx ${clitkMeshViewer_GGO_C})
362     target_link_libraries(clitkMeshViewer clitkCommon)
363     set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMeshViewer)
364   endif(CLITK_EXPERIMENTAL)
365   #=========================================================
366
367
368   #=========================================================
369   if(ITK_VERSION_MAJOR VERSION_LESS 4)
370     message("clitkDice is not compatible with ITK<4. It will not be built.")
371     message("clitkDicomRTPlan2Gate is not compatible with GDCM<2 (ITK<4). It will not be built.")
372   else(ITK_VERSION_MAJOR VERSION_LESS 4)
373     WRAP_GGO(clitkDice_GGO_C clitkDice.ggo)
374     add_executable(clitkDice clitkDice.cxx ${clitkDice_GGO_C})
375     target_link_libraries(clitkDice clitkSegmentationGgoLib clitkCommon ${ITK_LIBRARIES} )
376     set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkDice)
377
378     WRAP_GGO(clitkDicomRTPlan2Gate_GGO_C clitkDicomRTPlan2Gate.ggo)
379     add_executable(clitkDicomRTPlan2Gate clitkDicomRTPlan2Gate.cxx clitkDicomRTPlan2Gate_ggo.c)
380     target_link_libraries(clitkDicomRTPlan2Gate clitkCommon)
381     set(TOOLS_INSTALL ${TOOLS_INSTALL} clitkDicomRTPlan2Gate)
382   endif(ITK_VERSION_MAJOR VERSION_LESS 4)
383   #=========================================================
384
385
386   install(TARGETS ${TOOLS_INSTALL} DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
387
388 endif(CLITK_BUILD_TOOLS)