Loading [MathJax]/jax/output/NativeMML/config.js
Isis Developer Reference
HistogramWidget.h
Go to the documentation of this file.
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:
63  HistogramItem *p_histCurve;
64  QwtPlotCurve *p_stretchCurve;
65  QwtPlotZoomer *p_zoomer;
66 
67  double p_min;
68  double p_max;
69  };
70 };
71 
72 #endif
QwtPlot
Stretch.h
Cube.h
Isis::Histogram::MaxBinCount
BigInt MaxBinCount() const
Returns the highest bin count.
Definition: Histogram.cpp:493
Histogram.h
Isis::Histogram::BinSize
double BinSize() const
Returns the size of an individual bin.
Definition: Histogram.cpp:470
Isis::Stretch
Pixel value mapper.
Definition: Stretch.h:58
Isis::HistogramWidget::setStretch
void setStretch(Stretch stretch)
Creates a stretch curbe from the given stretch and plots it.
Definition: HistogramWidget.cpp:115
Isis::Statistics::Maximum
double Maximum() const
Returns the absolute maximum double found in all data passed through the AddData method.
Definition: Statistics.cpp:403
Isis::Histogram::BinMiddle
double BinMiddle(const int index) const
Returns the value represented by a bin.
Definition: Histogram.cpp:449
Isis::HistogramItem::setColor
void setColor(const QColor &)
Set the color of the hist.
Definition: HistogramItem.cpp:131
Isis::HistogramItem::setData
void setData(const QwtIntervalSeriesData &data)
Overridden method to set the data in the histogram.
Definition: HistogramItem.cpp:108
Isis::Stretch::Pairs
int Pairs() const
Returns the number of stretch pairs.
Definition: Stretch.h:162
Isis::HistogramItem
This is the (qwt) plot item for a histogram.
Definition: HistogramItem.h:24
Isis::HistogramWidget::clearStretch
void clearStretch()
Clears the stretch curve from the plot.
Definition: HistogramWidget.cpp:129
Isis::Histogram::BinCount
BigInt BinCount(const int index) const
Returns the count at a bin position in the histogram.
Definition: Histogram.cpp:403
HistogramItem.h
Isis::Statistics::Minimum
double Minimum() const
Returns the absolute minimum double found in all data passed through the AddData method.
Definition: Statistics.cpp:382
Isis::HistogramWidget
Histogram widget used by AdvancedStretchTool.
Definition: HistogramWidget.h:36
HistogramWidget.h
Ellipse
struct Ellipse Ellipse
This is free and unencumbered software released into the public domain.
Isis::Stretch::Output
double Output(const int index) const
Returns the value of the output side of the stretch pair at the specified index.
Definition: Stretch.cpp:302
QwtPlotCurve
Isis::Histogram::Bins
int Bins() const
Returns the number of bins in the histogram.
Definition: Histogram.cpp:483
Isis::Histogram
Container of a cube histogram.
Definition: Histogram.h:74
Isis::HistogramWidget::setHistogram
void setHistogram(const Histogram &hist)
Creates a histogram curve from the given histogram and plots it.
Definition: HistogramWidget.cpp:63
QVector
This is free and unencumbered software released into the public domain.
Definition: Calculator.h:18
Isis::HistogramWidget::HistogramWidget
HistogramWidget(const QString title, const QColor histColor=Qt::gray, const QColor stretchColor=Qt::darkGray)
HistogramWidget constructor.
Definition: HistogramWidget.cpp:23
Isis::HistogramWidget::heightForWidth
int heightForWidth(int w) const
Histograms have preferred sizes that keeps them all the same regardless of the contained data.
Definition: HistogramWidget.h:56
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::Stretch::Input
double Input(const int index) const
Returns the value of the input side of the stretch pair at the specified index.
Definition: Stretch.cpp:287

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 USGS Astrogeology Discussion Board
To report a bug, or suggest a feature go to: ISIS Github
File Modified: 03/21/2022 06:50:52