]> Creatis software - clitk.git/blobdiff - vv/vvMainWindow.cxx
Merge branch 'master' into vectorImage
[clitk.git] / vv / vvMainWindow.cxx
index 3da4be743f0049b838b35193b49c03e0115f9e4b..79b28058f24bafe5b21d7a9568c728d01b74981b 100644 (file)
@@ -378,12 +378,13 @@ vvMainWindow::vvMainWindow():vvMainWindowBase()
   vvToolManager::GetInstance()->InsertToolsInMenu(this);
   vvToolManager::GetInstance()->EnableToolsInMenu(this, false);
 
-#ifndef CLITK_EXPERIMENTAL
-#define CLITK_EXPERIMENTAL 0
-#endif
+//#ifndef CLITK_EXPERIMENTAL
+//#define CLITK_EXPERIMENTAL 0
+//#endif
+#ifdef CLITK_EXPERIMENTAL
   if (!CLITK_EXPERIMENTAL)
     menuExperimental->menuAction()->setVisible(false);
-
+#endif
 
   QTimer * timerMemory = new QTimer(this);
   //timerMemory->setInterval(5);
@@ -3322,6 +3323,8 @@ void vvMainWindow::SaveScreenshot(QVTKWidget *widget)
   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();
 
@@ -3386,7 +3389,7 @@ void vvMainWindow::SaveScreenshot(QVTKWidget *widget)
       vidwriter = mpg;
       mpg->SetQuality(2);
       bool ok;
-      int fps = QInputDialog::getInteger(this, tr("Number of frames per second"),
+      int fps = QInputDialog::getInt(this, tr("Number of frames per second"),
         tr("FPS:"), 5, 0, 1024, 1, &ok);
       if(!ok)
         fps = 5;
@@ -3399,7 +3402,7 @@ void vvMainWindow::SaveScreenshot(QVTKWidget *widget)
       vidwriter = mpg;
       mpg->SetQuality(2);
       bool ok;
-      int fps = QInputDialog::getInteger(this, tr("Number of frames per second"),
+      int fps = QInputDialog::getInt(this, tr("Number of frames per second"),
         tr("FPS:"), 5, 0, 1024, 1, &ok);
       if(!ok)
         fps = 5;