]> Creatis software - clitk.git/commitdiff
Compile PACS stuff only if GDCM system is used
authorSimon Rit <simon.rit@creatis.insa-lyon.fr>
Fri, 28 Jun 2013 09:03:09 +0000 (11:03 +0200)
committerSimon Rit <simon.rit@creatis.insa-lyon.fr>
Fri, 28 Jun 2013 09:03:37 +0000 (11:03 +0200)
vv/CMakeLists.txt
vv/vvMainWindow.cxx
vv/vvMainWindow.h

index c901fabf4ce7dcb1bf4cb6c7a06826ba15a76086..025a6f41d18ebbf7d2322019bc76f7d6237825f6 100644 (file)
@@ -71,7 +71,6 @@ SET(vv_COMMON_WITH_UI
 SET(vv_SRCS
   vvQProgressDialogITKCommand.cxx
   vvQDicomSeriesSelector.cxx
-  vvQPacsConnection.cxx
   QTreePushButton.cxx
   vvMainWindowBase.cxx
   vvImageWarp.cxx
@@ -87,7 +86,6 @@ SET(vv_SRCS
   vvSlicerManager.cxx
   vvSlicerManagerCommand.cxx
   vvUtils.cxx
-#  vvMaximumIntensityProjection.cxx
   vvMesh.cxx
   vvMeshActor.cxx
   vvMeshReader.cxx
@@ -114,7 +112,6 @@ QT4_WRAP_CPP(vv_SRCS
   vvDocumentation.h  
   vvHelpDialog.h  
   vvQDicomSeriesSelector.h 
-  vvQPacsConnection.h
   vvSlicerManager.h
   vvStructureSetActor.h
   vvROIActor.h
@@ -124,13 +121,19 @@ QT4_WRAP_CPP(vv_SRCS
 QT4_WRAP_UI(vv_UI_CXX 
   qt_ui/vvHelpDialog.ui 
   qt_ui/vvDocumentation.ui 
-  qt_ui/vvDicomSeriesSelector.ui 
-   qt_ui/vvPacsConnection.ui 
-  qt_ui/vvDummyWindow.ui #For testing
+  qt_ui/vvDicomSeriesSelector.ui
   )
 
 QT4_ADD_RESOURCES(vv_SRCS vvIcons.qrc)
 
+# Add DICOM gui selector if the adequate GDCM is available
+IF(CLITK_USE_SYSTEM_GDCM)
+  SET(vv_SRCS ${vv_SRCS}
+      vvQPacsConnection.cxx)
+  QT4_WRAP_CPP(vv_SRCS vvQPacsConnection.cxx)
+  QT4_WRAP_UI(vv_UI_CXX qt_ui/vvPacsConnection.ui)
+ENDIF(CLITK_USE_SYSTEM_GDCM)
+
 # Add the autotools in the header vvToolsList.h for initialization of the dummy
 # variables in vv.cxx for the tools contained in vvLib
 if(${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt IS_NEWER_THAN ${CMAKE_CURRENT_BINARY_DIR}/vvToolsList.h)
@@ -144,15 +147,15 @@ endif(${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt IS_NEWER_THAN ${CMAKE_CURRENT_B
 
 # 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)
+  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)
+  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
index 12d8d27f621bde8102a642c14d635e11b98cb55d..8047b7d2e42c5d006f9d7d08442c26c2a3f654fe 100644 (file)
@@ -235,7 +235,9 @@ vvMainWindow::vvMainWindow():vvMainWindowBase()
   documentation = new vvDocumentation();
   help_dialog = new vvHelpDialog();
   dicomSeriesSelector = new vvDicomSeriesSelector();
+#ifdef vvPacsConnection
   PacsConnection = new vvPacsConnection();
+#endif
 
   inverseButton->setEnabled(0);
   actionAdd_overlay_image_to_current_image->setEnabled(0);
@@ -745,8 +747,10 @@ void vvMainWindow::OpenDicom()
     files = *(dicomSeriesSelector->GetFilenames());
     LoadImages(files, vvImageReader::DICOM);
   }
+}
 
-  void vvMainWindow::ConnectPacs()
+#ifdef vvPacsConnection
+void vvMainWindow::ConnectPacs()
 {
   std::vector<std::string> files;
 
@@ -757,6 +761,7 @@ void vvMainWindow::OpenDicom()
   }
 
 }
+#endif
 //------------------------------------------------------------------------------
 
 //------------------------------------------------------------------------------
index eee1d64b807eadea3582532b08c898bf21067710..75d04976538a769ca679a17157b1d83c5a5e9479 100644 (file)
@@ -1,7 +1,7 @@
 /*=========================================================================
   Program:   vv                     http://www.creatis.insa-lyon.fr/rio/vv
 
-  Authors belong to: 
+  Authors belong to:
   - University of LYON              http://www.universite-lyon.fr/
   - Léon Bérard cancer center       http://www.centreleonberard.fr
   - CREATIS CNRS laboratory         http://www.creatis.insa-lyon.fr
@@ -91,7 +91,9 @@ public slots:
   void SliceImages();
   void MergeImagesWithTime();
   void OpenDicom();
+#ifdef vvPacsConnection
   void PacsConnection();
+#endif
   ///Open a vtkPolyData surface mesh and display it over the current image
   void OpenVTKContour();
   void SaveAs();
@@ -194,7 +196,9 @@ private:
   vvHelpDialog *help_dialog;
   vvDocumentation *documentation;
   vvDicomSeriesSelector *dicomSeriesSelector;
+#ifdef vvPacsConnection
   vvPacsConnection *PacsConnection;
+#endif
 
   bool viewMode;
   bool playMode;