-
Notifications
You must be signed in to change notification settings - Fork 10
/
histogram_widget.h
82 lines (66 loc) · 1.98 KB
/
histogram_widget.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#ifndef HISTOGRAM_WIDGET_H
#define HISTOGRAM_WIDGET_H
/* Qt includes */
#include <QWidget>
#include <QVBoxLayout>
#include <QTimer>
/* Live View includes */
#include "qcustomplot.h"
#include "frame_worker.h"
#include "image_type.h"
#include "std_dev_filter.hpp"
#include "settings.h"
#include "startupOptions.h"
#include "constants.h"
/*! \file
* \brief Plots a histogram of the spatial frequency of pixel standard deviations.
* \paragraph
*
* The histogram displays the spacial frequency of the standard deviations calculated for the standard deviation frame.
* Each bar represents a range of sigma (in DN) that the individual pixel sigmas are binned within. These data are plotted
* with a logarithmic x-axis. Scrolling on the mouse wheel will zoom in and out. The standard viewing scale omits dead
* pixel bars, but these can be viewed by zooming out.
* \author Noah Levy */
class histogram_widget : public QWidget
{
Q_OBJECT
frameWorker *fw;
QTimer rendertimer;
startupOptionsType options;
/*! GUI elements */
QVBoxLayout qvbl;
/*! Plot elements */
QCustomPlot *qcp;
QCPBars *histogram;
/*! Plot rendering elements */
int frHeight, frWidth;
volatile double ceiling;
volatile double floor;
QVector<double> histo_bins;
QVector<double> histo_data_vec;
unsigned int count = 0;
public:
explicit histogram_widget(frameWorker *fw, QWidget *parent = 0);
/*! \addtogroup getters
* @{ */
double getCeiling();
double getFloor();
/*! @} */
bool slider_low_inc = false;
const unsigned int slider_max = 100000;
public slots:
/*! \addtogroup renderfunc
* @{ */
void handleNewFrame();
/*! @} */
/*! \addtogroup plotfunc
* @{ */
void histogramScrolledY(const QCPRange &newRange);
void histogramScrolledX(const QCPRange &newRange);
void updateCeiling(int c);
void updateFloor(int f);
void rescaleRange();
void resetRange();
/*! @} */
};
#endif // HISTOGRAM_WIDGET_H