X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvMainWindow.cxx;h=11629f948db428c02cee78d1e7a41356400b29a2;hb=55d19655c84d7dbad602fa351bd7404cf214c3de;hp=d210d118bf2ae5c71ed4e215964130ed02d065f4;hpb=83fa36c0b759b05d38f23acae0e0f72af0faf524;p=clitk.git diff --git a/vv/vvMainWindow.cxx b/vv/vvMainWindow.cxx index d210d11..11629f9 100644 --- a/vv/vvMainWindow.cxx +++ b/vv/vvMainWindow.cxx @@ -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();