From 1431d12890dfae231c5824aaf6fc5ef2bde2370b Mon Sep 17 00:00:00 2001 From: Jan Philipp Timme Date: Fri, 20 Nov 2015 13:49:10 +0100 Subject: [PATCH] [TASK] Prepare gui for partial linear histogramm adaption. --- imageviewer-qt4.cpp | 21 ++++++++++++++++++++- imageviewer-qt4.h | 2 ++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/imageviewer-qt4.cpp b/imageviewer-qt4.cpp index b3c3f36..09d480a 100644 --- a/imageviewer-qt4.cpp +++ b/imageviewer-qt4.cpp @@ -363,6 +363,21 @@ void ImageViewer::linearHistogrammAdaption(void) { renewLogging(); } +/** + * Break the reference histogramm into parts, do linear adaption + * + * @brief ImageViewer::partialLinearHistogrammAdaption + */ +void ImageViewer::partialLinearHistogrammAdaption() { + logFile << "Doing partial linear histogramm adaption ..." << std::endl; + renewLogging(); + + // TODO + + logFile << "done." << std::endl; + renewLogging(); +} + /** * Do a succeeding histogramm adaption based on a reference image. * @@ -564,7 +579,10 @@ void ImageViewer::generateControlPanels() { linear_histogramm_adaption = new QPushButton("Do linear histogramm adaption (basic)"); QObject::connect(linear_histogramm_adaption, SIGNAL(clicked()), this, SLOT(linearHistogrammAdaption())); - + + partial_linear_histogramm_adaption = new QPushButton("Do partial, linear histogramm adaption"); + QObject::connect(partial_linear_histogramm_adaption, SIGNAL(clicked()), this, SLOT(partialLinearHistogrammAdaption())); + succeeding_histogramm_adaption = new QPushButton("Do succeeding histogramm adaption"); QObject::connect(succeeding_histogramm_adaption, SIGNAL(clicked()), this, SLOT(succeedingHistogrammAdaption())); @@ -575,6 +593,7 @@ void ImageViewer::generateControlPanels() { task_tab3->addWidget(new QLabel("Working copy")); task_tab3->addWidget(histogramm_cumulative_label); task_tab3->addWidget(linear_histogramm_adaption); + task_tab3->addWidget(partial_linear_histogramm_adaption); task_tab3->addWidget(succeeding_histogramm_adaption); tabWidget->addTab(task_tab_widget3, "Task #3"); diff --git a/imageviewer-qt4.h b/imageviewer-qt4.h index f4ad3b0..fcf4424 100644 --- a/imageviewer-qt4.h +++ b/imageviewer-qt4.h @@ -110,6 +110,7 @@ class ImageViewer : public QMainWindow { QLabel* histogramm_cumulative_label; QPushButton* linear_histogramm_adaption; + QPushButton* partial_linear_histogramm_adaption; QPushButton* succeeding_histogramm_adaption; // "My" space for storing data/results @@ -130,6 +131,7 @@ class ImageViewer : public QMainWindow { void saveToOriginal(); void robustAutomaticContrastAdaption(int c_param); void linearHistogrammAdaption(); + void partialLinearHistogrammAdaption(); void succeedingHistogrammAdaption(); void open();