1 # Add Libraries used in vv and clitk to avoid recompilation
2 WRAP_GGO(clitkCropImage_GGO_C clitkCropImage.ggo)
3 ADD_LIBRARY(clitkCropImageLib clitkCropImageGenericFilter.cxx ${clitkCropImage_GGO_C})
5 WRAP_GGO(clitkImageConvert_GGO_C clitkImageConvert.ggo)
6 ADD_LIBRARY(clitkImageConvertLib clitkImageConvertGenericFilter.cxx ${clitkImageConvert_GGO_C})
8 WRAP_GGO(clitkBinarizeImage_GGO_C clitkBinarizeImage.ggo)
9 ADD_LIBRARY(clitkBinarizeImageLib clitkBinarizeImageGenericFilter.cxx ${clitkBinarizeImage_GGO_C})
11 WRAP_GGO(clitkImageArithm_GGO_C clitkImageArithm.ggo)
12 ADD_LIBRARY(clitkImageArithmImageLib clitkImageArithmGenericFilter.cxx ${clitkImageArithm_GGO_C})
14 WRAP_GGO(clitkResampleImage_GGO_C clitkResampleImage.ggo)
15 ADD_LIBRARY(clitkResampleImageLib clitkResampleImageGenericFilter.cxx ${clitkResampleImage_GGO_C})
17 WRAP_GGO(clitkMIP_GGO_C clitkMIP.ggo)
18 ADD_LIBRARY(clitkMIPLib clitkMIPGenericFilter.cxx ${clitkMIP_GGO_C})
20 WRAP_GGO(clitkMedianImageFilter_GGO_C clitkMedianImageFilter.ggo)
21 ADD_LIBRARY(clitkMedianImageFilterLib clitkMedianImageGenericFilter.cxx ${clitkMedianImageFilter_GGO_C})
23 IF (CLITK_BUILD_TOOLS)
24 WRAP_GGO(clitkDicomInfo_GGO_C clitkDicomInfo.ggo)
25 ADD_EXECUTABLE(clitkDicomInfo clitkDicomInfo.cxx ${clitkDicomInfo_GGO_C})
26 TARGET_LINK_LIBRARIES(clitkDicomInfo clitkCommon ${ITK_LIBRARIES})
27 SET(TOOLS_INSTALL clitkDicomInfo)
29 WRAP_GGO(clitkDicom2Image_GGO_C clitkDicom2Image.ggo)
30 ADD_EXECUTABLE(clitkDicom2Image clitkDicom2Image.cxx ${clitkDicom2Image_GGO_C})
31 TARGET_LINK_LIBRARIES(clitkDicom2Image clitkCommon ${ITK_LIBRARIES})
32 SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkDicom2Image)
34 WRAP_GGO(clitkDicomWave2Text_GGO_C clitkDicomWave2Text.ggo)
35 ADD_EXECUTABLE(clitkDicomWave2Text clitkDicomWave2Text.cxx ${clitkDicomWave2Text_GGO_C})
36 TARGET_LINK_LIBRARIES(clitkDicomWave2Text clitkCommon ${ITK_LIBRARIES})
37 SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkDicomWave2Text)
39 WRAP_GGO(clitkImageInfo_GGO_C clitkImageInfo.ggo)
40 ADD_EXECUTABLE(clitkImageInfo clitkImageInfo.cxx ${clitkImageInfo_GGO_C})
41 TARGET_LINK_LIBRARIES(clitkImageInfo clitkCommon ${ITK_LIBRARIES})
42 SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkImageInfo)
44 ADD_EXECUTABLE(clitkImageConvert clitkImageConvert.cxx)
45 TARGET_LINK_LIBRARIES(clitkImageConvert clitkImageConvertLib clitkCommon ${ITK_LIBRARIES})
46 SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkImageConvert)
48 ADD_EXECUTABLE(clitkBinarizeImage clitkBinarizeImage.cxx)
49 TARGET_LINK_LIBRARIES(clitkBinarizeImage clitkBinarizeImageLib clitkCommon ${ITK_LIBRARIES})
50 SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkBinarizeImage)
52 WRAP_GGO(clitkVFResample_GGO_C clitkVFResample.ggo)
53 ADD_EXECUTABLE(clitkVFResample clitkVFResample.cxx clitkVFResampleGenericFilter.cxx ${clitkVFResample_GGO_C})
54 TARGET_LINK_LIBRARIES(clitkVFResample clitkCommon ${ITK_LIBRARIES})
55 SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkVFResample)
57 WRAP_GGO(clitkImageCreate_GGO_C clitkImageCreate.ggo)
58 ADD_EXECUTABLE(clitkImageCreate clitkImageCreate.cxx ${clitkImageCreate_GGO_C})
59 TARGET_LINK_LIBRARIES(clitkImageCreate clitkCommon ${ITK_LIBRARIES})
60 SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkImageCreate)
62 WRAP_GGO(clitkZeroVF_GGO_C clitkZeroVF.ggo)
63 ADD_EXECUTABLE(clitkZeroVF clitkZeroVF.cxx ${clitkZeroVF_GGO_C} clitkZeroVFGenericFilter.cxx)
64 TARGET_LINK_LIBRARIES(clitkZeroVF clitkCommon ${ITK_LIBRARIES})
65 SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkZeroVF)
67 WRAP_GGO(clitkSplitImage_GGO_C clitkSplitImage.ggo)
68 ADD_EXECUTABLE(clitkSplitImage clitkSplitImage.cxx clitkSplitImageGenericFilter.cxx ${clitkSplitImage_GGO_C})
69 TARGET_LINK_LIBRARIES(clitkSplitImage clitkCommon ${ITK_LIBRARIES} )
70 SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkSplitImage)
72 WRAP_GGO(clitkWriteDicomSeries_GGO_C clitkWriteDicomSeries.ggo)
73 ADD_EXECUTABLE(clitkWriteDicomSeries clitkWriteDicomSeries.cxx ${clitkWriteDicomSeries_GGO_C})
74 TARGET_LINK_LIBRARIES(clitkWriteDicomSeries clitkCommon ${ITK_LIBRARIES} )
75 SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkWriteDicomSeries)
77 WRAP_GGO(clitkMedianTemporalDimension_GGO_C clitkMedianTemporalDimension.ggo)
78 ADD_EXECUTABLE(clitkMedianTemporalDimension clitkMedianTemporalDimension.cxx
79 ${clitkMedianTemporalDimension_GGO_C})
80 TARGET_LINK_LIBRARIES(clitkMedianTemporalDimension clitkCommon ${ITK_LIBRARIES} )
81 SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMedianTemporalDimension)
83 WRAP_GGO(clitkWarpImage_GGO_C clitkWarpImage.ggo)
84 ADD_EXECUTABLE(clitkWarpImage clitkWarpImage.cxx ${clitkWarpImage_GGO_C} clitkWarpImageGenericFilter.cxx)
85 TARGET_LINK_LIBRARIES(clitkWarpImage clitkCommon ${ITK_LIBRARIES})
86 SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkWarpImage)
88 WRAP_GGO(clitkInvertVF_GGO_C clitkInvertVF.ggo)
89 ADD_EXECUTABLE(clitkInvertVF clitkInvertVF.cxx ${clitkInvertVF_GGO_C})
90 TARGET_LINK_LIBRARIES(clitkInvertVF clitkCommon ${ITK_LIBRARIES} )
91 SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkInvertVF)
93 WRAP_GGO(clitkAffineTransform_GGO_C clitkAffineTransform.ggo)
94 ADD_EXECUTABLE(clitkAffineTransform clitkAffineTransform.cxx ${clitkAffineTransform_GGO_C})
95 TARGET_LINK_LIBRARIES(clitkAffineTransform clitkCommon ${ITK_LIBRARIES} )
96 SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkAffineTransform)
98 WRAP_GGO(clitkSetBackground_GGO_C clitkSetBackground.ggo)
99 ADD_EXECUTABLE(clitkSetBackground clitkSetBackground.cxx clitkSetBackgroundGenericFilter.cxx ${clitkSetBackground_GGO_C})
100 TARGET_LINK_LIBRARIES(clitkSetBackground clitkCommon ${ITK_LIBRARIES})
101 SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkSetBackground)
103 WRAP_GGO(clitkGammaIndex_GGO_C clitkGammaIndex.ggo)
104 ADD_EXECUTABLE(clitkGammaIndex clitkGammaIndex.cxx ${clitkGammaIndex_GGO_C})
105 TARGET_LINK_LIBRARIES(clitkGammaIndex clitkCommon ${VTK_LIBRARIES} ${ITK_LIBRARIES})
106 SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkGammaIndex)
108 ADD_EXECUTABLE(clitkImageArithm clitkImageArithm.cxx)
109 TARGET_LINK_LIBRARIES(clitkImageArithm clitkImageArithmImageLib clitkCommon ${ITK_LIBRARIES} )
110 SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkImageArithm)
112 WRAP_GGO(clitkUnsharpMask_GGO_C clitkUnsharpMask.ggo)
113 ADD_EXECUTABLE(clitkUnsharpMask clitkUnsharpMask.cxx ${clitkUnsharpMask_GGO_C})
114 TARGET_LINK_LIBRARIES(clitkUnsharpMask clitkCommon ${ITK_LIBRARIES} )
115 SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkUnsharpMask)
117 WRAP_GGO(clitkFooImage_GGO_C clitkFooImage.ggo)
118 ADD_EXECUTABLE(clitkFooImage clitkFooImage.cxx ${clitkFooImage_GGO_C})
119 TARGET_LINK_LIBRARIES(clitkFooImage clitkCommon ${ITK_LIBRARIES} )
120 SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkFooImage)
122 #WRAP_GGO(clitkMedianImageFilter_GGO_C clitkMedianImageFilter.ggo)
123 #ADD_EXECUTABLE(clitkMedianImageFilter clitkMedianImageFilter.cxx ${clitkMedianImageFilter_GGO_C})
124 #TARGET_LINK_LIBRARIES(clitkMedianImageFilter clitkMedianImageFilterLib clitkCommon ${ITK_LIBRARIES})
125 #SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMedianImageFilter)
127 ADD_EXECUTABLE(clitkResampleImage clitkResampleImage.cxx)
128 TARGET_LINK_LIBRARIES(clitkResampleImage clitkResampleImageLib clitkCommon ${ITK_LIBRARIES})
129 SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkResampleImage)
131 WRAP_GGO(clitkMinMaxMask_GGO_C clitkMinMaxMask.ggo)
132 ADD_EXECUTABLE(clitkMinMaxMask clitkMinMaxMask.cxx ${clitkMinMaxMask_GGO_C})
133 TARGET_LINK_LIBRARIES(clitkMinMaxMask clitkCommon ${ITK_LIBRARIES} )
134 SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMinMaxMask)
136 WRAP_GGO(clitkAutoCrop_GGO_C clitkAutoCrop.ggo)
137 ADD_EXECUTABLE(clitkAutoCrop clitkAutoCrop.cxx ${clitkAutoCrop_GGO_C})
138 TARGET_LINK_LIBRARIES(clitkAutoCrop clitkCommon ${ITK_LIBRARIES} )
139 SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkAutoCrop)
141 WRAP_GGO(clitkDicomRTStruct2Image_GGO_C clitkDicomRTStruct2Image.ggo)
142 ADD_EXECUTABLE(clitkDicomRTStruct2Image clitkDicomRTStruct2Image.cxx ${clitkDicomRTStruct2Image_GGO_C})
143 TARGET_LINK_LIBRARIES(clitkDicomRTStruct2Image clitkDicomRTStruct clitkCommon ${ITK_LIBRARIES} )
144 SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkDicomRTStruct2Image)
146 WRAP_GGO(clitkComposeVF_GGO_C clitkComposeVF.ggo)
147 ADD_EXECUTABLE(clitkComposeVF clitkComposeVFGenericFilter.cxx clitkComposeVF.cxx ${clitkComposeVF_GGO_C})
148 TARGET_LINK_LIBRARIES(clitkComposeVF ${ITK_LIBRARIES} clitkCommon)
149 SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkComposeVF)
151 WRAP_GGO(clitkMergeSequence_GGO_C clitkMergeSequence.ggo)
152 ADD_EXECUTABLE(clitkMergeSequence clitkMergeSequence.cxx clitkMergeSequenceGenericFilter.cxx ${clitkMergeSequence_GGO_C})
153 TARGET_LINK_LIBRARIES(clitkMergeSequence ${ITK_LIBRARIES} clitkCommon)
154 SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMergeSequence)
156 WRAP_GGO(clitkBackProjectImage_GGO_C clitkBackProjectImage.ggo)
157 ADD_EXECUTABLE(clitkBackProjectImage clitkBackProjectImage.cxx clitkBackProjectImageGenericFilter.cxx ${clitkBackProjectImage_GGO_C})
158 TARGET_LINK_LIBRARIES(clitkBackProjectImage ${ITK_LIBRARIES} clitkCommon )
159 SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkBackProjectImage)
161 ADD_EXECUTABLE(clitkCropImage clitkCropImage.cxx ${clitkCropImage_GGO_C})
162 TARGET_LINK_LIBRARIES(clitkCropImage clitkCropImageLib clitkCommon ${ITK_LIBRARIES})
163 SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkCropImage)
165 # WRAP_GGO(clitkExtractSlice_GGO_C clitkExtractSlice.ggo)
166 # ADD_EXECUTABLE(clitkExtractSlice clitkExtractSlice.cxx clitkExtractSliceGenericFilter.cxx ${clitkExtractSlice_GGO_C})
167 # TARGET_LINK_LIBRARIES(clitkExtractSlice clitkCommon ${ITK_LIBRARIES})
168 #SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkExtractSlice)
170 WRAP_GGO(clitkFlipImage_GGO_C clitkFlipImage.ggo)
171 ADD_EXECUTABLE(clitkFlipImage clitkFlipImage.cxx clitkFlipImageGenericFilter.cxx ${clitkFlipImage_GGO_C})
172 TARGET_LINK_LIBRARIES(clitkFlipImage clitkCommon ${ITK_LIBRARIES})
173 SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkFlipImage)
175 WRAP_GGO(clitkMirrorPadImage_GGO_C clitkMirrorPadImage.ggo)
176 ADD_EXECUTABLE(clitkMirrorPadImage clitkMirrorPadImage.cxx clitkMirrorPadImageGenericFilter.cxx ${clitkMirrorPadImage_GGO_C})
177 TARGET_LINK_LIBRARIES(clitkMirrorPadImage clitkCommon ${ITK_LIBRARIES})
178 SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMirrorPadImage)
180 WRAP_GGO(clitkImageMoment_GGO_C clitkImageMoment.ggo)
181 ADD_EXECUTABLE(clitkImageMoment clitkImageMoment.cxx clitkImageMomentGenericFilter.cxx ${clitkImageMoment_GGO_C})
182 TARGET_LINK_LIBRARIES(clitkImageMoment clitkCommon ${ITK_LIBRARIES})
183 SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkImageMoment)
185 WRAP_GGO(clitkImageStatistics_GGO_C clitkImageStatistics.ggo)
186 ADD_EXECUTABLE(clitkImageStatistics clitkImageStatistics.cxx clitkImageStatisticsGenericFilter.cxx ${clitkImageStatistics_GGO_C})
187 TARGET_LINK_LIBRARIES(clitkImageStatistics clitkCommon ${ITK_LIBRARIES})
188 SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkImageStatistics)
190 WRAP_GGO(clitkVFConvert_GGO_C clitkVFConvert.ggo)
191 ADD_EXECUTABLE(clitkVFConvert clitkVFConvert.cxx clitkVFConvertGenericFilter.cxx ${clitkVFConvert_GGO_C})
192 TARGET_LINK_LIBRARIES(clitkVFConvert ${ITK_LIBRARIES} clitkCommon )
193 SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkVFConvert)
195 WRAP_GGO(clitkImageToVectorImage_GGO_C clitkImageToVectorImage.ggo)
196 ADD_EXECUTABLE(clitkImageToVectorImage clitkImageToVectorImage.cxx clitkImageToVectorImageGenericFilter.cxx ${clitkImageToVectorImage_GGO_C})
197 TARGET_LINK_LIBRARIES(clitkImageToVectorImage clitkCommon ${ITK_LIBRARIES})
198 SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkImageToVectorImage)
200 WRAP_GGO(clitkVectorImageToImage_GGO_C clitkVectorImageToImage.ggo)
201 ADD_EXECUTABLE(clitkVectorImageToImage clitkVectorImageToImage.cxx clitkVectorImageToImageGenericFilter.cxx ${clitkVectorImageToImage_GGO_C})
202 TARGET_LINK_LIBRARIES(clitkVectorImageToImage clitkCommon ${ITK_LIBRARIES})
203 SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkVectorImageToImage)
205 ADD_EXECUTABLE(clitkMIP clitkMIP.cxx clitkMIPGenericFilter.cxx)
206 TARGET_LINK_LIBRARIES(clitkMIP clitkMIPLib clitkCommon ${ITK_LIBRARIES})
207 SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMIP)
209 WRAP_GGO(clitkTransformLandmarks_GGO_C clitkTransformLandmarks.ggo)
210 ADD_EXECUTABLE(clitkTransformLandmarks clitkTransformLandmarks.cxx ${clitkTransformLandmarks_GGO_C})
211 TARGET_LINK_LIBRARIES(clitkTransformLandmarks clitkCommon ${ITK_LIBRARIES})
212 SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkTransformLandmarks)
214 ADD_EXECUTABLE(clitkMakeSphereImage clitkMakeSphereImage.cxx) # clitkLineProfileGenericFilter.cxx ${clitkLineProfile_GGO_C})
215 TARGET_LINK_LIBRARIES(clitkMakeSphereImage clitkCommon ${ITK_LIBRARIES})
216 SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMakeSphereImage)
218 WRAP_GGO(clitkJacobianImage_GGO_C clitkJacobianImage.ggo)
219 ADD_EXECUTABLE(clitkJacobianImage clitkJacobianImage.cxx clitkJacobianImageGenericFilter.cxx ${clitkJacobianImage_GGO_C})
220 TARGET_LINK_LIBRARIES(clitkJacobianImage clitkCommon ${ITK_LIBRARIES})
221 SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkJacobianImage)
223 WRAP_GGO(clitkPadImage_GGO_C clitkPadImage.ggo)
224 ADD_EXECUTABLE(clitkPadImage clitkPadImage.cxx clitkPadImageGenericFilter.cxx ${clitkPadImage_GGO_C})
225 TARGET_LINK_LIBRARIES(clitkPadImage clitkCommon ${ITK_LIBRARIES})
226 SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkPadImage)
228 WRAP_GGO(clitkCatImage_GGO_C clitkCatImage.ggo)
229 ADD_EXECUTABLE(clitkCatImage clitkCatImage.cxx ${clitkCatImage_GGO_C})
230 TARGET_LINK_LIBRARIES(clitkCatImage clitkCommon ${ITK_LIBRARIES})
231 SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkCatImage)
233 IF(CLITK_EXPERIMENTAL)
234 WRAP_GGO(clitkBinaryImageToMesh_GGO_C clitkBinaryImageToMesh.ggo)
235 ADD_EXECUTABLE(clitkBinaryImageToMesh clitkBinaryImageToMesh.cxx ${clitkBinaryImageToMesh_GGO_C})
236 TARGET_LINK_LIBRARIES(clitkBinaryImageToMesh ${ITK_LIBRARIES} ${VTK_LIBRARIES})
237 SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkBinaryImageToMesh)
239 WRAP_GGO(clitkMeshToBinaryImage_GGO_C clitkMeshToBinaryImage.ggo)
240 ADD_EXECUTABLE(clitkMeshToBinaryImage clitkMeshToBinaryImage.cxx ${clitkMeshToBinaryImage_GGO_C})
241 TARGET_LINK_LIBRARIES(clitkMeshToBinaryImage clitkCommon ${ITK_LIBRARIES} ${VTK_LIBRARIES})
242 SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMeshToBinaryImage)
244 WRAP_GGO(clitkMeshViewer_GGO_C clitkMeshViewer.ggo)
245 ADD_EXECUTABLE(clitkMeshViewer clitkMeshViewer.cxx ${clitkMeshViewer_GGO_C})
246 TARGET_LINK_LIBRARIES(clitkMeshViewer ${VTK_LIBRARIES})
247 SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMeshViewer)
248 ENDIF(CLITK_EXPERIMENTAL)
250 IF(ITK_VERSION_MAJOR VERSION_LESS 4)
251 MESSAGE("clitkDicomRTPlan2Gate is not compatible with GDCM<2 (ITK<4). It will not be built.")
252 ELSE(ITK_VERSION_MAJOR VERSION_LESS 4)
253 WRAP_GGO(clitkDicomRTPlan2Gate_GGO_C clitkDicomRTPlan2Gate.ggo)
254 ADD_EXECUTABLE(clitkDicomRTPlan2Gate clitkDicomRTPlan2Gate.cxx clitkDicomRTPlan2Gate_ggo.c)
255 TARGET_LINK_LIBRARIES(clitkDicomRTPlan2Gate clitkCommon ${ITK_LIBRARIES})
256 SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkDicomRTPlan2Gate)
257 ENDIF(ITK_VERSION_MAJOR VERSION_LESS 4)
259 SET_TARGET_PROPERTIES(${TOOLS_INSTALL} PROPERTIES INSTALL_RPATH "${VTK_DIR}:${ITK_DIR}" )
260 INSTALL (TARGETS ${TOOLS_INSTALL} DESTINATION bin PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
262 ENDIF(CLITK_BUILD_TOOLS)