endif(COMMAND cmake_policy)
#=========================================================
+#=========================================================
+#List of vv tools to compile
+SET(vv_TOOLS
+ vvToolMedianFilter
+ vvToolRigidReg ## Very long to compile
+ vvToolCropImage
+ vvToolBinarize
+ vvToolImageArithm
+ vvToolResample
+ vvToolExtractPatient
+ vvToolExtractLung
+ vvToolMIP
+ vvToolConvert ## with dummy vvToolConvert.ui
+
+ ## these ones are for tests (not working)
+ # vvToolFoo
+ # vvToolFooWithWidgetBase
+ # vvToolPlastimatch
+ # vvToolConnectedComponentLabeling
+)
+# dependencies of the tools
+# Future issues : when tool depend on other tools ... how to manage that ?
+# >> add the relevant $_LIBS variable to the tool that has dependencies?
+SET(vvToolRigidReg_LIBS clitkAffineRegistrationLib clitkRegistrationGgoLib)
+SET(vvToolBinarize_LIBS clitkBinarizeImageLib)
+SET(vvToolResample_LIBS clitkImageResampleLib)
+SET(vvToolConvert_LIBS clitkImageConvertLib)
+SET(vvToolExtractPatient_LIBS clitkSegmentationGgoLib)
+SET(vvToolExtractLung_LIBS clitkSegmentationGgoLib)
+SET(vvToolCropImage_LIBS clitkToolsGgoLib)
+SET(vvToolMIP_LIBS clitkMIPLib clitkToolsGgoLib)
+
#=========================================================
# List of vv source files
+
+# in COMMON_WITH_UI -> must have .h and .cxx and .ui
+SET(vv_COMMON_WITH_UI
+ vvInfoPanel
+ vvMainWindow
+ vvLinkPanel
+ vvOverlayPanel
+ vvLandmarksPanel
+ vvProgressDialog
+ vvSegmentationDialog
+ vvSurfaceViewerDialog
+ vvDeformationDialog
+ vvStructSelector
+ vvIntensityValueSlider
+ vvLabelImageLoaderWidget
+ vvToolWidgetBase
+ vvToolSimpleInputSelectorWidget
+ vvToolInputSelectorWidget
+ vvToolStructureSetManager
+)
+
+# All others sources
SET(vv_SRCS
- vvInfoPanel.cxx
- vvLinkPanel.cxx
- vvOverlayPanel.cxx
- vvLandmarksPanel.cxx
vvQProgressDialogITKCommand.cxx
vvQDicomSeriesSelector.cxx
QTreePushButton.cxx
- vvSegmentationDialog.cxx
- vvSurfaceViewerDialog.cxx
vvMainWindowBase.cxx
- vvMainWindow.cxx
- vvDeformationDialog.cxx
vvImageWarp.cxx
vvDeformableRegistration.cxx
vtkVOXImageWriter.cxx
vvMesh.cxx
vvMeshActor.cxx
vvMeshReader.cxx
- vvStructSelector.cxx
vvMidPosition.cxx
vvImageMapToWLColors.cxx
- vvIntensityValueSlider.cxx
- vvToolManager.cxx
- vvToolCreatorBase.cxx
- vvToolWidgetBase.cxx
-# vvToolWidgetWithStepsBase.cxx
- vvToolMedianFilter.cxx
- vvToolRigidReg.cxx
-# vvToolFoo.cxx
-# vvToolFooWithWidgetBase.cxx
- vvToolCropImage.cxx
- vvToolBinarize.cxx
- vvToolSimpleInputSelectorWidget.cxx
- vvToolInputSelectorWidget.cxx
+ vvThreadedFilter.cxx
vvImageContour.cxx
vvBinaryImageOverlayActor.cxx
- vvToolImageArithm.cxx
- vvToolConvert.cxx
- vvToolStructureSetManager.cxx
vvStructureSetActor.cxx
vvROIActor.cxx
- vvToolResample.cxx
vvBlendImageActor.cxx
-# vvToolExtractLung.cxx
-# vvToolConnectedComponentLabeling.cxx
- )
-#=========================================================
+ vvToolManager.cxx
+ vvToolCreatorBase.cxx
+)
#=========================================================
# Qt related commands
QT4_WRAP_CPP(vv_SRCS
vvMainWindowBase.h
- vvMainWindow.h
QTreePushButton.h
- vvInfoPanel.h
- vvLinkPanel.h
- vvOverlayPanel.h
- vvLandmarksPanel.h
vvDocumentation.h
vvHelpDialog.h
- vvProgressDialog.h
vvQDicomSeriesSelector.h
- vvSegmentationDialog.h
- vvSurfaceViewerDialog.h
- vvDeformationDialog.h
vvSlicerManager.h
- vvStructSelector.h
- vvIntensityValueSlider.h
- vvToolCreatorBase.h
-# vvToolFoo.h
-# vvToolFooWithWidgetBase.h
- vvToolMedianFilter.h
- vvToolRigidReg.h
- vvToolBinarize.h
- vvToolSimpleInputSelectorWidget.h
- vvToolInputSelectorWidget.h
- vvToolWidgetBase.h
-# vvToolWidgetWithStepsBase.h
- vvToolCropImage.h
- vvToolImageArithm.h
- vvToolConvert.h
- vvToolStructureSetManager.h
+ vvThreadedFilter.h
vvStructureSetActor.h
vvROIActor.h
- vvToolResample.h
-# vvToolExtractLung.h
-# vvToolConnectedComponentLabeling.h
+ vvToolCreatorBase.h
)
QT4_WRAP_UI(vv_UI_CXX
- qt_ui/vvMainWindow.ui
- qt_ui/vvInfoPanel.ui
- qt_ui/vvLinkPanel.ui
- qt_ui/vvOverlayPanel.ui
- qt_ui/vvLandmarksPanel.ui
qt_ui/vvHelpDialog.ui
qt_ui/vvDocumentation.ui
- qt_ui/vvProgressDialog.ui
qt_ui/vvDicomSeriesSelector.ui
- qt_ui/vvSegmentationDialog.ui
- qt_ui/vvSurfaceViewerDialog.ui
- qt_ui/vvDeformationDialog.ui
- qt_ui/vvStructSelector.ui
qt_ui/vvDummyWindow.ui #For testing
- qt_ui/vvIntensityValueSlider.ui
- qt_ui/vvToolSimpleInputSelectorWidget.ui
- qt_ui/vvToolInputSelectorWidget.ui
- qt_ui/vvToolWidgetBase.ui
-# qt_ui/vvToolWidgetWithStepsBase.ui
- qt_ui/vvToolMedianFilter.ui
- qt_ui/vvToolRigidReg.ui
-# qt_ui/vvToolFoo.ui
- qt_ui/vvToolCropImage.ui
- qt_ui/vvToolBinarize.ui
- qt_ui/vvToolImageArithm.ui
- qt_ui/vvToolStructureSetManager.ui
- qt_ui/vvToolResample.ui
-# qt_ui/vvToolExtractLung.ui
-# qt_ui/vvToolConnectedComponentLabeling.ui
)
QT4_ADD_RESOURCES(vv_SRCS vvIcons.qrc)
+#Add the autotools and the common files ui
+foreach(tool ${vv_TOOLS} ${vv_COMMON_WITH_UI})
+ SET(vv_SRCS ${vv_SRCS} ${tool}.cxx)
+ QT4_WRAP_CPP(vv_SRCS ${tool}.h)
+ QT4_WRAP_UI(vv_UI_CXX qt_ui/${tool}.ui)
+endforeach(tool)
+
+#Add the common source files
+foreach(tool ${vv_COMMON})
+ SET(vv_SRCS ${vv_SRCS} ${tool}.cxx)
+ QT4_WRAP_CPP(vv_SRCS ${tool}.h)
+endforeach(tool)
# if Windows and Qt was built as a static lib then don't set QT_DLL flag
SET(QT_STATIC 0)
LINK_DIRECTORIES(${QT_INCLUDES})
ADD_EXECUTABLE(vv ${vv_SRCS} vv.cxx ${vv_UI_CXX} ${EXE_ICON})
-TARGET_LINK_LIBRARIES(vv clitkCommon clitkDicomRTStruct clitkFilters clitkSegmentationFilters ${ITK_LIBRARIES} QVTK vtkHybrid)
+ADD_DEPENDENCIES(vv clitkToolsGgoLib clitkSegmentationGgoLib)
+TARGET_LINK_LIBRARIES(vv clitkDicomRTStruct)
+
+#=========================================================
+#Add each tool's dependencies
+foreach(tool ${vv_TOOLS})
+ target_link_libraries(vv ${${tool}_LIBS})
+endforeach(tool)
#=========================================================
+#Add Foundation Libraries (this should be after our libraries, since we depend
+#on them)
+TARGET_LINK_LIBRARIES(vv
+clitkCommon ${ITK_LIBRARIES} QVTK vtkHybrid)
#=========================================================
# Install options (also used by CPack)