X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvMainWindow.cxx;h=a3d2000cbd9da993edcd9adccbd3b1130eaf9358;hb=dcb3446e7d4a04cdaac655b3181109d4463252b9;hp=ba3f3136d721d1d5240d498d19fea343d57e13dc;hpb=c45f077f35553cdc72396626ac601080093d273b;p=clitk.git diff --git a/vv/vvMainWindow.cxx b/vv/vvMainWindow.cxx index ba3f313..a3d2000 100644 --- a/vv/vvMainWindow.cxx +++ b/vv/vvMainWindow.cxx @@ -48,7 +48,7 @@ It is distributed under dual licence #include "vvMeshReader.h" #include "vvSaveState.h" #include "vvReadState.h" -#ifdef CLITK_USE_PACS_CONNECTION +#if CLITK_USE_PACS_CONNECTION #include "vvQPacsConnection.h" #endif #include "clitkConfiguration.h" @@ -82,9 +82,7 @@ It is distributed under dual licence #include #include #include -#ifdef CLITK_EXPERIMENTAL -# include -#endif +#include #ifdef VTK_USE_VIDEO_FOR_WINDOWS # include #endif @@ -235,7 +233,7 @@ vvMainWindow::vvMainWindow():vvMainWindowBase() documentation = new vvDocumentation(); help_dialog = new vvHelpDialog(); dicomSeriesSelector = new vvDicomSeriesSelector(); -#ifdef CLITK_USE_PACS_CONNECTION +#if CLITK_USE_PACS_CONNECTION PacsConnection = new vvQPacsConnection(); #endif @@ -280,8 +278,8 @@ 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())); +#if 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())); @@ -397,6 +395,10 @@ connect(actionConnect_Pacs,SIGNAL(triggered()),this,SLOT(ConnectPacs())); menuExperimental->menuAction()->setVisible(false); #endif +#if !CLITK_USE_PACS_CONNECTION + actionConnect_Pacs->setVisible(false); +#endif + QTimer * timerMemory = new QTimer(this); //timerMemory->setInterval(5); connect(timerMemory, SIGNAL(timeout()), this, SLOT(UpdateMemoryUsage())); @@ -770,7 +772,7 @@ void vvMainWindow::OpenDicom() LoadImages(files, vvImageReader::DICOM); } } -#ifdef CLITK_USE_PACS_CONNECTION +#if CLITK_USE_PACS_CONNECTION void vvMainWindow::ConnectPacs() { std::vector files; @@ -982,6 +984,7 @@ void vvMainWindow::LoadImages(std::vector files, vvImageReader::Loa connect(mSlicerManagers.back(), SIGNAL(ChangeImageWithIndexOffset(vvSlicerManager*,int,int)), this,SLOT(ChangeImageWithIndexOffset(vvSlicerManager*,int,int))); connect(mSlicerManagers.back(),SIGNAL(LandmarkAdded()),landmarksPanel,SLOT(AddPoint())); + connect(landmarksPanel,SIGNAL(UpdateLandmarkTransform()), mSlicerManagers.back(), SLOT(UpdateLandmark())); InitSlicers(); numberofsuccesulreads++; } @@ -3338,9 +3341,7 @@ void vvMainWindow::SaveScreenshot(QVTKWidget *widget) #ifdef VTK_USE_MPEG2_ENCODER Extensions += ";;Video( *.mpg)"; #endif -#ifdef CLITK_EXPERIMENTAL Extensions += ";;Video( *.gif)"; -#endif int smIndex=GetSlicerIndexFromItem(DataTree->selectedItems()[0]); QString fileName = QFileDialog::getSaveFileName(this, @@ -3351,6 +3352,8 @@ void vvMainWindow::SaveScreenshot(QVTKWidget *widget) if (!fileName.isEmpty()) { vtkSmartPointer w2i = vtkSmartPointer::New(); w2i->SetInput(widget->GetRenderWindow()); + w2i->SetMagnification(1); + w2i->SetInputBufferTypeToRGBA(); //also record the alpha (transparency) channel w2i->Update(); vtkImageData *image = w2i->GetOutput(); @@ -3383,7 +3386,6 @@ void vvMainWindow::SaveScreenshot(QVTKWidget *widget) // Video vtkGenericMovieWriter *vidwriter = NULL; -#if CLITK_EXPERIMENTAL == 1 if (ext==".gif") { vvAnimatedGIFWriter *gif = vvAnimatedGIFWriter::New(); vidwriter = gif; @@ -3408,7 +3410,6 @@ void vvMainWindow::SaveScreenshot(QVTKWidget *widget) msgBox.addButton(tr("No"), QMessageBox::RejectRole); gif->SetDither(msgBox.exec() == QMessageBox::AcceptRole); } -#endif #ifdef VTK_USE_VIDEO_FOR_WINDOWS if (ext==".avi") { vtkAVIWriter *mpg = vtkAVIWriter::New(); @@ -3697,6 +3698,7 @@ vvSlicerManager* vvMainWindow::AddImage(vvImage::Pointer image,std::string filen connect(mSlicerManagers.back(), SIGNAL(ChangeImageWithIndexOffset(vvSlicerManager*,int,int)), this,SLOT(ChangeImageWithIndexOffset(vvSlicerManager*,int,int))); connect(mSlicerManagers.back(), SIGNAL(LandmarkAdded()),landmarksPanel,SLOT(AddPoint())); + connect(landmarksPanel,SIGNAL(UpdateLandmarkTransform()), mSlicerManagers.back(), SLOT(UpdateLandmark()));