]> Creatis software - clitk.git/blobdiff - vv/vvMainWindow.cxx
Remove gtest reference
[clitk.git] / vv / vvMainWindow.cxx
index a8b90bf5b0e32b40abba9f7f6cc5c312e9322509..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++) {
@@ -2786,8 +2792,8 @@ void vvMainWindow::SaveScreenshot(QVTKWidget *widget)
                                      tr("FPS:"), 5, 0, 1024, 1, &ok);
       if(!ok)
        fps = 5;
-      mpg->SetRate(fps);      
-      mpg->SetBitRateTolerance(round(12*1024*1024/fps+1));
+      mpg->SetRate(fps);
+      mpg->SetBitRateTolerance(int(ceil(12.0*1024*1024/fps)));
       mpg->Start();
 
       vvImage * vvImg = mSlicerManagers[smIndex]->GetImage();