From 2d7b4377587292f4c64c8ba732c1b0fad7334e4d Mon Sep 17 00:00:00 2001 From: Jan Philipp Timme Date: Fri, 30 Oct 2015 13:58:51 +0100 Subject: [PATCH] [TASK] Prepare drawing a histogramm. --- imageviewer-qt4.cpp | 15 +++++++++++++++ imageviewer-qt4.h | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/imageviewer-qt4.cpp b/imageviewer-qt4.cpp index 94fb3f5..c3a9038 100644 --- a/imageviewer-qt4.cpp +++ b/imageviewer-qt4.cpp @@ -46,6 +46,7 @@ */ ImageViewer::ImageViewer() { image=NULL; + histogramm=NULL; startLogging(); generateMainGui(); renewLogging(); @@ -215,6 +216,20 @@ int ImageViewer::getIntensityVariance() { return (int) (sumDifference/(image->width()*image->height())); } +/** + * Builds up the image for the histogramm. + * @brief ImageViewer::updateHistogramm + */ +void updateHistogramm() { + histogramm = new QImage(256, 100); + histogramm.fill(QColor::fromRgb(255,255,255)); + for(int i=0; i<256; i++) { + + } + logFile << "Histogramm done." << std::endl; + renewLogging(); +} + /**************************************************************************************** * * GUI elements related to the tasks are set up here. diff --git a/imageviewer-qt4.h b/imageviewer-qt4.h index f3d10ad..c8efc64 100644 --- a/imageviewer-qt4.h +++ b/imageviewer-qt4.h @@ -87,7 +87,7 @@ class ImageViewer : public QMainWindow { // "My" space for storing data/results int grayscale_absolute_histogramm[256]; double grayscale_relative_histogramm[256]; - + QImage* histogramm; private slots: // Custom slots