Isis 3 Programmer Reference
Isis::HistogramWidget Class Reference

Histogram widget used by AdvancedStretchTool. More...

#include <HistogramWidget.h>

Inheritance diagram for Isis::HistogramWidget:
Inheritance graph
Collaboration diagram for Isis::HistogramWidget:
Collaboration graph

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

HistogramItemp_histCurve
 The histogram curve. More...
 
QwtPlotCurvep_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...
 

Detailed Description

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.

Author
2009-05-01 Noah Hilt

Definition at line 36 of file HistogramWidget.h.

Constructor & Destructor Documentation

◆ HistogramWidget()

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.

Parameters
title
histColor
stretchColor

Definition at line 23 of file HistogramWidget.cpp.

References p_histCurve, p_stretchCurve, and Isis::HistogramItem::setColor().

Member Function Documentation

◆ clearStretch()

void Isis::HistogramWidget::clearStretch ( )

Clears the stretch curve from the plot.

Definition at line 129 of file HistogramWidget.cpp.

References p_stretchCurve.

◆ heightForWidth()

int Isis::HistogramWidget::heightForWidth ( int  w) const
inline

Histograms have preferred sizes that keeps them all the same regardless of the contained data.

This causes that.

Prefer 1:1

Parameters
w
Returns
int

Definition at line 56 of file HistogramWidget.h.

◆ setHistogram()

void Isis::HistogramWidget::setHistogram ( const Histogram hist)

◆ setStretch()

void Isis::HistogramWidget::setStretch ( Stretch  stretch)

Creates a stretch curbe from the given stretch and plots it.

Parameters
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().

Member Data Documentation

◆ p_histCurve

HistogramItem* Isis::HistogramWidget::p_histCurve
private

The histogram curve.

Definition at line 63 of file HistogramWidget.h.

Referenced by HistogramWidget(), and setHistogram().

◆ p_max

double Isis::HistogramWidget::p_max
private

The maximum value the histogram's maximum can be set to.

Definition at line 68 of file HistogramWidget.h.

◆ p_min

double Isis::HistogramWidget::p_min
private

The minimum value the histogram's minimum can be set to.

Definition at line 67 of file HistogramWidget.h.

◆ p_stretchCurve

QwtPlotCurve* Isis::HistogramWidget::p_stretchCurve
private

The stretch curve.

Definition at line 64 of file HistogramWidget.h.

Referenced by clearStretch(), HistogramWidget(), and setStretch().

◆ p_zoomer

QwtPlotZoomer* Isis::HistogramWidget::p_zoomer
private

This allows for zooming in/out.

Definition at line 65 of file HistogramWidget.h.

Referenced by setHistogram().


The documentation for this class was generated from the following files: