diff --git a/Code/Seg/BSTools/bsdetectionwidget.cpp b/Code/Seg/BSTools/bsdetectionwidget.cpp index 375f19a803388e2b4f99e4791cb82d5a5e21b4d4..e06f180088974e5e293ca2a93792de0dc33fab74 100755 --- a/Code/Seg/BSTools/bsdetectionwidget.cpp +++ b/Code/Seg/BSTools/bsdetectionwidget.cpp @@ -33,6 +33,7 @@ BSDetectionWidget::BSDetectionWidget (QWidget *parent) alternate = 0; verbose = false; + capture = false; instanceOfAll = 0; } @@ -374,10 +375,18 @@ void BSDetectionWidget::keyPressEvent (QKeyEvent *event) break; case Qt::Key_P : - detector.switchFiltering (0); - cout << "Pre-filtering " - << (detector.isFiltering (0) ? "on" : "off") << endl; - extract (true); + if (event->modifiers () & Qt::ShiftModifier) + { + capture = true; + cout << "Next extraction will be shot in capture.png" << endl; + } + else + { + detector.switchFiltering (0); + cout << "Pre-filtering " + << (detector.isFiltering (0) ? "on" : "off") << endl; + extract (true); + } break; case Qt::Key_G : @@ -635,6 +644,12 @@ void BSDetectionWidget::extractAll () if (verbose && fixed) displayExtractionResult (); fixed = false; if (! formerMultiMode) detector.switchMultiSelection (); + + if (capture) + { + augmentedImage.save ("capture.png"); + capture = false; + } } diff --git a/Code/Seg/BSTools/bsdetectionwidget.h b/Code/Seg/BSTools/bsdetectionwidget.h index f459a9316ceaa8585f2ccec191880c56dc98d1f0..b491b772186104da58d47271525e5508989db919 100755 --- a/Code/Seg/BSTools/bsdetectionwidget.h +++ b/Code/Seg/BSTools/bsdetectionwidget.h @@ -162,6 +162,8 @@ private: bool fixed; /** Flag indicating whether extraction result should be displayed. */ bool verbose; + /** Flag indicating whether extraction result should be captured. */ + bool capture; /** Activation of alternate comparative tests (F8). */ int alternate; diff --git a/Methode/ctrl.tex b/Methode/ctrl.tex index 56f81f9e7f55039443dac8e4b925c019a76e54b0..fc3b66168e537ab622ed26fadc8a490b118edc7b 100755 --- a/Methode/ctrl.tex +++ b/Methode/ctrl.tex @@ -41,6 +41,7 @@ g && Commute la contrainte de connectivit\'e \\ s && Commute l'aspect dynamique des scans \\ o && Commute l'aspect directionel des scans \\ x && Commute l'ajustement de la consigne d'\'epaisseur \\ +P && Demande la capture de la prochaine extraction \\ 1 && Commute la visu des segments (pixels) \\ 2 && Commute la visu de l'accumulateur \\ 3 && Commute la visu des profils \\