From 3d62ce288b703e13eb2973e25bfc203c993e943b Mon Sep 17 00:00:00 2001 From: even <philippe.even@loria.fr> Date: Sun, 25 Nov 2018 09:48:54 +0100 Subject: [PATCH] Blurred segment display style update --- Code/Seg/BSTools/bsdetectionwidget.cpp | 8 +++++--- Code/Seg/BSTools/bsdetectionwidget.h | 5 ++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Code/Seg/BSTools/bsdetectionwidget.cpp b/Code/Seg/BSTools/bsdetectionwidget.cpp index 1997d42..5bf088f 100755 --- a/Code/Seg/BSTools/bsdetectionwidget.cpp +++ b/Code/Seg/BSTools/bsdetectionwidget.cpp @@ -570,6 +570,7 @@ void BSDetectionWidget::keyPressEvent (QKeyEvent *event) bsBoundsVisible = ! bsBoundsVisible; cout << "Segments bounds " << (bsBoundsVisible ? "visible" : "hidden") << endl; + extract (); } else { @@ -633,6 +634,7 @@ void BSDetectionWidget::keyPressEvent (QKeyEvent *event) bsPointsVisible = ! bsPointsVisible; cout << "Segments points " << (bsPointsVisible ? "visible" : "hidden") << endl; + displayDetectionResult (); } break; @@ -789,7 +791,7 @@ void BSDetectionWidget::writeDetectionResult () } -void BSDetectionWidget::displayDetectionResult (int hnum) +void BSDetectionWidget::displayDetectionResult () { if (background == BACK_BLACK) augmentedImage.fill (qRgb (0, 0, 0)); else if (background == BACK_WHITE) augmentedImage.fill (qRgb (255, 255, 255)); @@ -802,7 +804,7 @@ void BSDetectionWidget::displayDetectionResult (int hnum) int index = 0; vector<BlurredSegment *>::const_iterator it = bss.begin (); while (it != bss.end ()) - drawBlurredSegment (painter, *it++, index++ == hnum); + drawBlurredSegment (painter, *it++, index++ == exam); } else drawBlurredSegment (painter, detector.getBlurredSegment ()); @@ -841,7 +843,7 @@ void BSDetectionWidget::displayNext (int dir) { exam = (exam + dir) % size; if (strucview != NULL) strucview->setExamined (exam); - displayDetectionResult (exam); + displayDetectionResult (); } } diff --git a/Code/Seg/BSTools/bsdetectionwidget.h b/Code/Seg/BSTools/bsdetectionwidget.h index aa6f687..1401d9f 100755 --- a/Code/Seg/BSTools/bsdetectionwidget.h +++ b/Code/Seg/BSTools/bsdetectionwidget.h @@ -317,10 +317,9 @@ private: void writeDetectionResult (); /** - * \brief Displays the result of a detection. - * @param hnum Highlighted segment index (-1 if none). + * \brief Displays the result of the last detection. */ - void displayDetectionResult (int hnum = -1); + void displayDetectionResult (); /** * \brief Highlights the next blurred segment in multi-selection mode. -- GitLab