X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvMainWindow.cxx;h=a566c3aa96bed30fa99bb5e958efdb71937b1f26;hb=86d74c7664c5d6d11637ba376b639aa3c6e0e057;hp=15e1d910c4163103205447bf5d35aebb8bb25d4b;hpb=e14892179201c98b313764771c2456cf5cb29a3d;p=clitk.git diff --git a/vv/vvMainWindow.cxx b/vv/vvMainWindow.cxx index 15e1d91..a566c3a 100644 --- a/vv/vvMainWindow.cxx +++ b/vv/vvMainWindow.cxx @@ -47,6 +47,9 @@ It is distributed under dual licence #include "vvMeshReader.h" #include "vvSaveState.h" #include "vvReadState.h" +#ifdef CLITK_USE_PACS_CONNECTION +#include "vvQPacsConnection.h" +#endif #include "clitkConfiguration.h" #include "clitkMatrix.h" @@ -123,7 +126,7 @@ It is distributed under dual licence vvMainWindow::vvMainWindow():vvMainWindowBase() { setupUi(this); // this sets up the GUI - + setDicomClient(); mInputPathName = ""; mMenuTools = menuTools; // mMenuSegmentation = menuSegmentation; @@ -236,6 +239,9 @@ vvMainWindow::vvMainWindow():vvMainWindowBase() documentation = new vvDocumentation(); help_dialog = new vvHelpDialog(); dicomSeriesSelector = new vvDicomSeriesSelector(); +#ifdef CLITK_USE_PACS_CONNECTION + PacsConnection = new vvQPacsConnection(); +#endif inverseButton->setEnabled(0); actionAdd_overlay_image_to_current_image->setEnabled(0); @@ -278,6 +284,9 @@ 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_PACS_CONNECTION +connect(actionConnect_Pacs,SIGNAL(triggered()),this,SLOT(ConnectPacs())); +#endif // connect(actionOpen_Dicom_Struct,SIGNAL(triggered()),this,SLOT(OpenDCStructContour())); connect(actionOpen_VTK_contour,SIGNAL(triggered()),this,SLOT(OpenVTKContour())); connect(actionOpen_Multiple_Images_As_One,SIGNAL(triggered()),this,SLOT(MergeImages())); @@ -745,7 +754,24 @@ void vvMainWindow::OpenDicom() files = *(dicomSeriesSelector->GetFilenames()); LoadImages(files, vvImageReader::DICOM); } -} +} +#ifdef CLITK_USE_PACS_CONNECTION +void vvMainWindow::ConnectPacs() +{ + std::vector files; + + //std::cout << "dicomSeriesSelector " << std::endl; +if (PacsConnection->exec() == QDialog::Accepted) { + for (int i = 0; i < PacsConnection->getSeriesCount(); i++) + { + files = PacsConnection->getFileNames(i); + LoadImages(files, vvImageReader::DICOM); + } + PacsConnection->clearMove(); + } + } + +#endif //------------------------------------------------------------------------------ //------------------------------------------------------------------------------