Isis 3 Programmer Reference
|
Histogram widget used by AdvancedStretchTool. More...
#include <HistogramWidget.h>
Public Member Functions | |
HistogramWidget (const QString title, const QColor histColor=Qt::gray, const QColor stretchColor=Qt::darkGray) | |
HistogramWidget constructor. More... | |
void | setHistogram (const Histogram &hist) |
Creates a histogram curve from the given histogram and plots it. More... | |
void | setStretch (Stretch stretch) |
Creates a stretch curbe from the given stretch and plots it. More... | |
void | clearStretch () |
Clears the stretch curve from the plot. More... | |
int | heightForWidth (int w) const |
Histograms have preferred sizes that keeps them all the same regardless of the contained data. More... | |
Private Attributes | |
HistogramItem * | p_histCurve |
The histogram curve. More... | |
QwtPlotCurve * | p_stretchCurve |
The stretch curve. More... | |
QwtPlotZoomer * | p_zoomer |
This allows for zooming in/out. More... | |
double | p_min |
The minimum value the histogram's minimum can be set to. More... | |
double | p_max |
The maximum value the histogram's maximum can be set to. More... | |
Histogram widget used by AdvancedStretchTool.
The HistogramWidget displays a given histogram and stretch in a graph and contains inputs for changing the min/max of the histogram.
Definition at line 36 of file HistogramWidget.h.
Isis::HistogramWidget::HistogramWidget | ( | const QString | title, |
const QColor | histColor = Qt::gray , |
||
const QColor | stretchColor = Qt::darkGray |
||
) |
HistogramWidget constructor.
Initializes all of the widgets and sets the plot title, histogram curve's color and stretch curve's color.
title | |
histColor | |
stretchColor |
Definition at line 23 of file HistogramWidget.cpp.
References p_histCurve, p_stretchCurve, p_zoomer, and Isis::HistogramItem::setColor().
void Isis::HistogramWidget::clearStretch | ( | ) |
Clears the stretch curve from the plot.
Definition at line 129 of file HistogramWidget.cpp.
References p_stretchCurve.
|
inline |
Histograms have preferred sizes that keeps them all the same regardless of the contained data.
This causes that.
Prefer 1:1
w |
Definition at line 56 of file HistogramWidget.h.
void Isis::HistogramWidget::setHistogram | ( | const Histogram & | hist | ) |
Creates a histogram curve from the given histogram and plots it.
hist |
Definition at line 63 of file HistogramWidget.cpp.
References Isis::Histogram::BinCount(), Isis::Histogram::BinMiddle(), Isis::Histogram::Bins(), Isis::Histogram::BinSize(), Isis::Histogram::MaxBinCount(), Isis::Statistics::Maximum(), Isis::Statistics::Minimum(), p_histCurve, p_zoomer, and Isis::HistogramItem::setData().
Referenced by Isis::StretchType::setHistogram(), and Isis::StretchType::StretchType().
void Isis::HistogramWidget::setStretch | ( | Stretch | stretch | ) |
Creates a stretch curbe from the given stretch and plots it.
stretch |
Definition at line 115 of file HistogramWidget.cpp.
References Isis::Stretch::Input(), Isis::Stretch::Output(), p_stretchCurve, and Isis::Stretch::Pairs().
Referenced by Isis::StretchType::updateGraph().
|
private |
The histogram curve.
Definition at line 63 of file HistogramWidget.h.
Referenced by HistogramWidget(), and setHistogram().
|
private |
The maximum value the histogram's maximum can be set to.
Definition at line 68 of file HistogramWidget.h.
|
private |
The minimum value the histogram's minimum can be set to.
Definition at line 67 of file HistogramWidget.h.
|
private |
The stretch curve.
Definition at line 64 of file HistogramWidget.h.
Referenced by clearStretch(), HistogramWidget(), and setStretch().
|
private |
This allows for zooming in/out.
Definition at line 65 of file HistogramWidget.h.
Referenced by HistogramWidget(), and setHistogram().