Isis 3.0 Programmer Reference
Back | Home
HistogramWidget.h
1 #ifndef HistogramWidget_h
2 #define HistogramWidget_h
3 
4 #include "Cube.h"
5 #include "Stretch.h"
6 #include "Histogram.h"
7 
8 #include <QWidget>
9 #include <QStackedWidget>
10 #include <QSlider>
11 #include <QLineEdit>
12 #include <QDoubleValidator>
13 
14 #include <qwt_plot.h>
15 #include <qwt_plot_curve.h>
16 #include <qwt_legend.h>
17 
18 #include "HistogramItem.h"
19 
20 class QwtPlotZoomer;
21 
22 namespace Isis {
36  class HistogramWidget : public QwtPlot {
37  Q_OBJECT
38 
39  public:
40  HistogramWidget(const QString title, const QColor histColor = Qt::gray, const QColor stretchColor = Qt::darkGray);
41  void setHistogram(const Histogram &hist);
42  void setStretch(Stretch stretch);
43 
44  void clearStretch();
45 
56  int heightForWidth(int w) const {
57  return w;
58  }
59 
60  private slots:
61 
62  private:
65  QwtPlotZoomer *p_zoomer;
66 
67  double p_min;
68  double p_max;
69  };
70 };
71 
72 #endif
HistogramItem * p_histCurve
The histogram curve.
void setStretch(Stretch stretch)
Creates a stretch curbe from the given stretch and plots it.
int heightForWidth(int w) const
Histograms have preferred sizes that keeps them all the same regardless of the contained data...
void clearStretch()
Clears the stretch curve from the plot.
Container of a cube histogram.
Definition: Histogram.h:78
Pixel value mapper.
Definition: Stretch.h:72
This is the (qwt) plot item for a histogram.
Definition: HistogramItem.h:24
QwtPlotZoomer * p_zoomer
This allows for zooming in/out.
double p_min
The minimum value the histogram&#39;s minimum can be set to.
QwtPlotCurve * p_stretchCurve
The stretch curve.
double p_max
The maximum value the histogram&#39;s maximum can be set to.
void setHistogram(const Histogram &hist)
Creates a histogram curve from the given histogram and plots it.
Histogram widget used by AdvancedStretchTool.
HistogramWidget(const QString title, const QColor histColor=Qt::gray, const QColor stretchColor=Qt::darkGray)
HistogramWidget constructor.

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the ISIS Support Center
File Modified: 07/12/2023 23:19:43