Skip to content
Snippets Groups Projects
Commit 894d988e authored by even's avatar even
Browse files

Automatic extraction screenshot

parent 155f9230
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
}
......
......@@ -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;
......
......@@ -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 \\
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment