]> Creatis software - clitk.git/commitdiff
add move directory to store dicom files
authorcervenansky <frederic.cervenansky@creatis.insa-lyon.fr>
Wed, 17 Jul 2013 16:44:45 +0000 (18:44 +0200)
committercervenansky <frederic.cervenansky@creatis.insa-lyon.fr>
Wed, 17 Jul 2013 16:44:45 +0000 (18:44 +0200)
common/clitkConfiguration.h.in
vv/CMakeLists.txt
vv/vvMainWindow.cxx
vv/vvMainWindow.h
vv/vvQPacsConnection.cxx
vv/vvQPacsConnection.h

index b6a8e792f655a49589996bbb4fb5d9001204c8ec..808020697bb73aaee978cb963bc35a94778c164e 100644 (file)
@@ -25,6 +25,7 @@
 #cmakedefine01 CLITK_MEMORY_INFO
 #cmakedefine01 CLITK_PRIVATE_FEATURES
 #cmakedefine01 CLITK_USE_SYSTEM_GDCM
+#cmakedefine01 CLITK_USE_PACS_CONNECTION
 
 // Global environment variables
 #define OS_NAME "@CMAKE_SYSTEM@"
index 9c991ff787e131e7fa64ba1a3dc211e7acc3eb16..7075ca1235ddb9971de164cdec680887c0b60709 100644 (file)
@@ -6,7 +6,12 @@ if(COMMAND cmake_policy)
   cmake_policy(SET CMP0003 NEW)
 endif(COMMAND cmake_policy)
 #=========================================================
-
+OPTION(CLITK_USE_PACS_CONNECTION "USE PACS CONNECTION"       OFF)
+IF (CLITK_USE_PACS_CONNECTION)
+       SET(CLITK_PACS_MOVE_PATH ${PROJECT_BINARY_DIR}/move)
+       file(MAKE_DIRECTORY ${CLITK_PACS_MOVE_PATH})
+       add_definitions( -DPACS_MOVE_PATH=${LIBINTERFACE_VERSION} )
+ENDIF()
 #=========================================================
 #List of vv tools to compile
 SET(vv_TOOLS
@@ -124,22 +129,25 @@ QT4_WRAP_UI(vv_UI_CXX
   qt_ui/vvDocumentation.ui 
   qt_ui/vvDicomSeriesSelector.ui
 qt_ui/vvDummyWindow.ui          #For testing 
-qt_ui/vvPacsConnection.ui
-     qt_ui/vvPacsSettingsDialog.ui
+#qt_ui/vvPacsConnection.ui
#    qt_ui/vvPacsSettingsDialog.ui
 )
 
 QT4_ADD_RESOURCES(vv_SRCS vvIcons.qrc)
 
 # Add DICOM SERVER gui selector if the adequate GDCM is available
-#IF(CLITK_USE_SYSTEM_GDCM)
+IF(CLITK_USE_PACS_CONNECTION)
   SET(vv_SRCS ${vv_SRCS}
       vvQPacsConnection.cxx
-         vvPacsSettingsDialog.cxx)
+         vvPacsSettingsDialog.cxx
+         vvDicomServerQueryFactory.cxx
+         )
   QT4_WRAP_CPP(vv_SRCS vvQPacsConnection.h
      vvPacsSettingsDialog.h)
-  #QT4_WRAP_UI(vv_UI_CXX qt_ui/vvPacsConnection.ui
-   #  qt_ui/vvPacsSettingsDialog.ui)
-#ENDIF(CLITK_USE_SYSTEM_GDCM)
+  QT4_WRAP_UI(vv_UI_CXX 
+       qt_ui/vvPacsConnection.ui
+     qt_ui/vvPacsSettingsDialog.ui)
+ENDIF(CLITK_USE_PACS_CONNECTION)
 
 # Add the autotools in the header vvToolsList.h for initialization of the dummy
 # variables in vv.cxx for the tools contained in vvLib
index 36d42c591f216c1244bb38b13baba499b484b9d7..e3e5c993f88b2123643b9ddafa123b55bb54aa73 100644 (file)
@@ -47,7 +47,7 @@ It is distributed under dual licence
 #include "vvMeshReader.h"
 #include "vvSaveState.h"
 #include "vvReadState.h"
-#ifdef CLITK_USE_SYSTEM_GDCM
+#ifdef CLITK_USE_PACS_CONNECTION
 #include "vvQPacsConnection.h"
 #endif
 #include "clitkConfiguration.h"
@@ -238,7 +238,7 @@ vvMainWindow::vvMainWindow():vvMainWindowBase()
   documentation = new vvDocumentation();
   help_dialog = new vvHelpDialog();
   dicomSeriesSelector = new vvDicomSeriesSelector();
-#ifdef CLITK_USE_SYSTEM_GDCM
+#ifdef CLITK_USE_PACS_CONNECTION
      PacsConnection = new vvQPacsConnection();
 #endif
 
@@ -283,7 +283,7 @@ vvMainWindow::vvMainWindow():vvMainWindowBase()
   connect(actionWarp_image_with_vector_field,SIGNAL(triggered()),this,SLOT(WarpImage()));
   connect(actionLoad_images,SIGNAL(triggered()),this,SLOT(OpenImages()));
   connect(actionOpen_Dicom,SIGNAL(triggered()),this,SLOT(OpenDicom()));
-  #ifdef CLITK_USE_SYSTEM_GDCM
+  #ifdef CLITK_USE_PACS_CONNECTION
 connect(actionConnect_Pacs,SIGNAL(triggered()),this,SLOT(ConnectPacs()));
 #endif
   //  connect(actionOpen_Dicom_Struct,SIGNAL(triggered()),this,SLOT(OpenDCStructContour()));
@@ -754,7 +754,7 @@ void vvMainWindow::OpenDicom()
     LoadImages(files, vvImageReader::DICOM);
   }
 }  
-#ifdef CLITK_USE_SYSTEM_GDCM
+#ifdef CLITK_USE_PACS_CONNECTION
 void vvMainWindow::ConnectPacs()
 {
   std::vector<std::string> files;
@@ -763,6 +763,7 @@ void vvMainWindow::ConnectPacs()
 if (PacsConnection->exec() == QDialog::Accepted) {
        files = PacsConnection->getFileNames();
     LoadImages(files, vvImageReader::DICOM);
+       PacsConnection->clearMove();
   }
   }
 
index 92d70417815c62e464bc1864e92eba6f438584d1..01b53d09f97669105ea873bcaad28877044bc0ac 100644 (file)
@@ -39,7 +39,7 @@ class vtkImageData;
 class vtkRenderer;
 class vtkMatrix4x4;
 class vvDicomSeriesSelector;
-#ifdef CLITK_USE_SYSTEM_GDCM
+#ifdef CLITK_USE_PACS_CONNECTION
 class vvQPacsConnection;
 #endif
 class vvSlicer;
@@ -94,7 +94,7 @@ public slots:
   void SliceImages();
   void MergeImagesWithTime();
   void OpenDicom();
-#ifdef CLITK_USE_SYSTEM_GDCM
+#ifdef CLITK_USE_PACS_CONNECTION
   void ConnectPacs();
 #endif
   ///Open a vtkPolyData surface mesh and display it over the current image
@@ -200,7 +200,7 @@ private:
   vvDocumentation *documentation;
   vvDicomSeriesSelector *dicomSeriesSelector;
 
-#ifdef CLITK_USE_SYSTEM_GDCM
+#ifdef CLITK_USE_PACS_CONNECTION
   vvQPacsConnection *PacsConnection;
 #endif
 
index 920876877e43f1cdf996abece4163803cee248ae..7c7f395eb0e081754c9228698993e823081d38e9 100644 (file)
@@ -182,10 +182,10 @@ void vvQPacsConnection::createTreeView()
 // clean the different model Trees
 void vvQPacsConnection::cleanTree()
 {
-       Patientmodel->removeRows(0,Patientmodel->rowCount(),QModelIndex());
-       Studymodel->removeRows(0,Patientmodel->rowCount(),QModelIndex());
-       Seriesmodel->removeRows(0,Patientmodel->rowCount(),QModelIndex());
-       Imagesmodel->removeRows(0,Patientmodel->rowCount(),QModelIndex());
+       Patientmodel->removeRows(0,Patientmodel->rowCount());
+       Studymodel->removeRows(0,Patientmodel->rowCount());
+       Seriesmodel->removeRows(0,Patientmodel->rowCount());
+       Imagesmodel->removeRows(0,Patientmodel->rowCount());
 
 }
 
@@ -197,19 +197,20 @@ void vvQPacsConnection::selectStudies(const QModelIndex &index)
        Seriesmodel->removeRows(0, Seriesmodel->rowCount(),QModelIndex());
        Imagesmodel->removeRows(0, Imagesmodel->rowCount(),QModelIndex());
        manageSeriesFilter(true);
-        m_query = mQFactory.getQueryPatient("",m_patient);
        convertDataSet( findQuery( mQFactory.getQueryforStudy(m_patient, false)) , Studymodel, mQFactory.getQueryKeysforStudy("",true));
 }
 
 
+void vvQPacsConnection::clearMove()
+{
 
+}
 
 void vvQPacsConnection::selectSeries(const QModelIndex &index)
 {
        m_study= Studymodel->data(index.sibling(index.row(),3)).toString().toStdString();
        Seriesmodel->removeRows(0, Seriesmodel->rowCount());
        Imagesmodel->removeRows(0, Imagesmodel->rowCount());
-       m_query = mQFactory.getQueryforSeries(m_patient,m_study, false);
     convertDataSet( findQuery( mQFactory.getQueryforSeries(m_patient,m_study, false)), Seriesmodel, mQFactory.getSeriesKeys("","",true));
        
 }
@@ -218,7 +219,6 @@ void vvQPacsConnection::selectImages(const QModelIndex &index)
 {
        m_series = Seriesmodel->data(index.sibling(index.row(),2)).toString().toStdString();
        Imagesmodel->removeRows(0, Imagesmodel->rowCount(),QModelIndex());
-       m_query = mQFactory.getQueryforImages(m_patient,m_study, m_series, false);
        convertDataSet( findQuery( mQFactory.getQueryforImages(m_patient,m_study, m_series, false) ),  Imagesmodel, mQFactory.getQueryKeysforImages("","","",true));
  
 }
@@ -367,9 +367,9 @@ void vvQPacsConnection::on_importButton_clicked()
        
                bool didItWork =  gdcm::CompositeNetworkFunctions::CMove(m_adress.c_str(),atoi(m_port.c_str()),
                        gdcm::CompositeNetworkFunctions::ConstructQuery(mQFactory.getMoveQuery().theRoot, mQFactory.getMoveQuery().theLevel ,mQFactory.getMoveQuery().keys,true),
-                       getDicomClientPort(),  getDicomClientAETitle().c_str(), m_aetitle.c_str(),"D:\\move" );
+                       getDicomClientPort(),  getDicomClientAETitle().c_str(), m_aetitle.c_str(), gets(CLITK_PACS_MOVE_PATH) );
                gdcm::Directory theDir;
-               theDir.Load("D:\\move");
+               theDir.Load(gets(CLITK_PACS_MOVE_PATH));
           m_files =    theDir.GetFilenames();
           accept();
        }
index e17c3b3b32a6284d4de729ce92f75a3575d2ae82..28a3d41bf815dbb2658e25d817eb4921e2621043 100644 (file)
@@ -27,6 +27,7 @@
          ~vvQPacsConnection(){}
        void refreshNetworks();
        std::vector <std::string> getFileNames();
+       void clearMove();
 
 public slots:
        void selectStudies(const QModelIndex &index);