]> Creatis software - clitk.git/commitdiff
Merge branch 'master' into PacsConnection
authortbaudier <thomas.baudier@creatis.insa-lyon.fr>
Mon, 17 Oct 2016 07:13:39 +0000 (09:13 +0200)
committertbaudier <thomas.baudier@creatis.insa-lyon.fr>
Mon, 17 Oct 2016 07:13:39 +0000 (09:13 +0200)
1  2 
vv/vvMainWindow.cxx

diff --combined vv/vvMainWindow.cxx
index ba3f3136d721d1d5240d498d19fea343d57e13dc,79b28058f24bafe5b21d7a9568c728d01b74981b..958cf5c837574cffa3f76e10a58e33d75220854e
@@@ -48,9 -48,6 +48,9 @@@ It is distributed under dual licenc
  #include "vvMeshReader.h"
  #include "vvSaveState.h"
  #include "vvReadState.h"
 +#ifdef CLITK_USE_PACS_CONNECTION
 +#include "vvQPacsConnection.h"
 +#endif
  #include "clitkConfiguration.h"
  #include "clitkMatrix.h"
  #ifdef Q_OS_OSX
@@@ -134,8 -131,6 +134,8 @@@ vvMainWindow::vvMainWindow():vvMainWind
  { 
    setupUi(this); // this sets up the GUI
  
 +  setDicomClient();
 +
    //Qt::WindowFlags flags = windowFlags();
    //setWindowFlags(flags | Qt::WindowStaysOnTopHint);
  
    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);
    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()));
@@@ -769,24 -758,7 +769,24 @@@ void vvMainWindow::OpenDicom(
      files = *(dicomSeriesSelector->GetFilenames());
      LoadImages(files, vvImageReader::DICOM);
    }
 -}
 +}  
 +#ifdef CLITK_USE_PACS_CONNECTION
 +void vvMainWindow::ConnectPacs()
 +{
 +  std::vector<std::string> 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
  //------------------------------------------------------------------------------
  
  //------------------------------------------------------------------------------
@@@ -3351,6 -3323,8 +3351,8 @@@ void vvMainWindow::SaveScreenshot(QVTKW
    if (!fileName.isEmpty()) {
      vtkSmartPointer<vtkWindowToImageFilter> w2i = vtkSmartPointer<vtkWindowToImageFilter>::New();
      w2i->SetInput(widget->GetRenderWindow());
+     w2i->SetMagnification(1);
+     w2i->SetInputBufferTypeToRGBA(); //also record the alpha (transparency) channel
      w2i->Update();
      vtkImageData *image = w2i->GetOutput();