]> Creatis software - clitk.git/blobdiff - vv/vvMainWindow.cxx
Remove gtest reference
[clitk.git] / vv / vvMainWindow.cxx
index d210d118bf2ae5c71ed4e215964130ed02d065f4..11629f948db428c02cee78d1e7a41356400b29a2 100644 (file)
@@ -93,7 +93,7 @@
 #define COLUMN_RELOAD_IMAGE 6
 #define COLUMN_IMAGE_NAME 7
 
-#define EXTENSIONS "Images ( *.bmp *.png *.jpeg *.jpg *.tif *.mhd *.mha *.hdr *.vox *.his *.xdr *.SCAN )"
+#define EXTENSIONS "Images ( *.bmp *.png *.jpeg *.jpg *.tif *.mhd *.mha *.hdr *.vox *.his *.xdr *.SCAN *.nii *.nrrd *.nhdr)"
 
 /*Data Tree values
   0,Qt::UserRole full filename
@@ -2257,11 +2257,17 @@ void vvMainWindow::SaveAs()
   } else if (dimension == 3) {
     OutputListeFormat.push_back(".mhd");
     OutputListeFormat.push_back(".mha");
+    OutputListeFormat.push_back(".nii");
+    OutputListeFormat.push_back(".nrrd");
+    OutputListeFormat.push_back(".nhdr");
     OutputListeFormat.push_back(".hdr");
     OutputListeFormat.push_back(".vox");
   } else if (dimension == 4) {
     OutputListeFormat.push_back(".mhd");
     OutputListeFormat.push_back(".mha");
+    OutputListeFormat.push_back(".nii");
+    OutputListeFormat.push_back(".nrrd");
+    OutputListeFormat.push_back(".nhdr");
   }
   QString Extensions = "AllFiles(*.*)";
   for (int i = 0; i < OutputListeFormat.count(); i++) {
@@ -2781,7 +2787,13 @@ void vvMainWindow::SaveScreenshot(QVTKWidget *widget)
       mpg->SetInput(image);
       mpg->SetFileName(fileName.toStdString().c_str());
       mpg->SetQuality(2);
-      mpg->SetRate(5);
+      bool ok;
+      int fps = QInputDialog::getInt(this, tr("Number of frames per second"),
+                                     tr("FPS:"), 5, 0, 1024, 1, &ok);
+      if(!ok)
+       fps = 5;
+      mpg->SetRate(fps);
+      mpg->SetBitRateTolerance(int(ceil(12.0*1024*1024/fps)));
       mpg->Start();
 
       vvImage * vvImg = mSlicerManagers[smIndex]->GetImage();