Isis 3.0 Developer's Reference (API) |
Home |
This handles the advanced sawtooth stretch. More...
#include <SawtoothStretchType.h>
Inherits Isis::StretchType.
Signals | |
void | stretchChanged () |
Emitted when a new Stretch object is available. | |
Public Member Functions | |
SawtoothStretchType (const Histogram &, const Stretch &, const QString &name, const QColor &color) | |
This initializes a sawtooth stretch type. | |
~SawtoothStretchType () | |
Destructor. | |
virtual void | setStretch (Stretch) |
Given an arbitrary stretch, this will re-interpret it, as best as possible, into a sawtooth stretch. | |
virtual Stretch | getStretch () |
Returns the current stretch object. | |
virtual void | setHistogram (const Histogram &) |
This should be called when the visible area changes. | |
Protected Slots | |
void | updateGraph () |
This updates the graph with the current stretch object. | |
void | updateTable () |
This updates the table with the current stretch pairs. | |
Protected Member Functions | |
QTableWidget * | createStretchTable () |
This creates the stretch pairs table. | |
Protected Attributes | |
QGridLayout * | p_mainLayout |
Main layout. | |
Histogram * | p_cubeHist |
Visible area histogram. | |
QTableWidget * | p_table |
Pairs table. | |
HistogramWidget * | p_graph |
Histogram graph. | |
Stretch * | p_stretch |
Current stretch pairs stored here. | |
This handles the advanced sawtooth stretch.
The sawtooth stretch is useful for highlighting things like craters. This highlights areas of DNs - for example it can highlight all of the DNs based on how close to the mean they are (user guesses the mean from the histogram). It can also highlight DNs as they differ from the mean. Anyhow, it existed in a form before so this class was needed to encapsulate it. I'm not sure what the original request for this stretch type derived from.
Isis::SawtoothStretchType::SawtoothStretchType | ( | const Histogram & | hist, |
const Stretch & | stretch, | ||
const QString & | name, | ||
const QColor & | color | ||
) |
This initializes a sawtooth stretch type.
hist | |
stretch | |
name | |
color |
References Isis::Statistics::Maximum(), Isis::Histogram::Median(), Isis::Statistics::Minimum(), Isis::StretchType::p_cubeHist, Isis::StretchType::p_mainLayout, and setStretch().
Isis::SawtoothStretchType::~SawtoothStretchType | ( | ) |
Destructor.
|
protectedinherited |
This creates the stretch pairs table.
Referenced by Isis::StretchType::StretchType().
|
virtualinherited |
Returns the current stretch object.
Reimplemented in Isis::LinearStretchType.
References Isis::StretchType::p_stretch.
Referenced by Isis::StretchType::updateTable().
|
virtualinherited |
This should be called when the visible area changes.
It updates the graph and calls setStretch() so that the children have a chance to update their GUI elements too.
hist |
References Isis::StretchType::p_cubeHist, Isis::StretchType::p_graph, Isis::StretchType::p_stretch, Isis::HistogramWidget::setHistogram(), and Isis::StretchType::setStretch().
Referenced by Isis::AdvancedStretch::setHistogram().
|
virtual |
Given an arbitrary stretch, this will re-interpret it, as best as possible, into a sawtooth stretch.
It is required that a stretch that represents a sawtooth stretch always translate into itself and does not cause a stretchChanged(). To ensure this the sliders have been restricted to not be ambiguous.
It is necessary to always update slider positions in this method even if the stretch did not change.
newStretch | Stretch to interpret |
Implements Isis::StretchType.
References Isis::Histogram::BinSize(), Isis::Stretch::CopyPairs(), Isis::Stretch::Input(), Isis::Stretch::Output(), Isis::StretchType::p_cubeHist, Isis::StretchType::p_stretch, Isis::Stretch::Pairs(), and Isis::StretchType::stretchChanged().
Referenced by SawtoothStretchType().
|
signalinherited |
Emitted when a new Stretch object is available.
Referenced by Isis::ManualStretchType::ManualStretchType(), Isis::LinearStretchType::setStretch(), Isis::BinaryStretchType::setStretch(), Isis::ManualStretchType::setStretch(), setStretch(), and Isis::StretchType::StretchType().
|
protectedslotinherited |
This updates the graph with the current stretch object.
References Isis::StretchType::p_graph, Isis::StretchType::p_stretch, and Isis::HistogramWidget::setStretch().
Referenced by Isis::StretchType::StretchType().
|
protectedslotinherited |
This updates the table with the current stretch pairs.
References Isis::StretchType::getStretch(), Isis::Stretch::Input(), Isis::Stretch::Output(), Isis::StretchType::p_table, and Isis::Stretch::Pairs().
Referenced by Isis::ManualStretchType::ManualStretchType(), Isis::ManualStretchType::setStretch(), and Isis::StretchType::StretchType().
|
protectedinherited |
Visible area histogram.
Referenced by Isis::BinaryStretchType::BinaryStretchType(), SawtoothStretchType(), Isis::StretchType::setHistogram(), Isis::BinaryStretchType::setStretch(), Isis::LinearStretchType::setStretch(), setStretch(), Isis::StretchType::StretchType(), and Isis::StretchType::~StretchType().
|
protectedinherited |
Histogram graph.
Referenced by Isis::StretchType::setHistogram(), Isis::StretchType::StretchType(), and Isis::StretchType::updateGraph().
|
protectedinherited |
|
protectedinherited |
Current stretch pairs stored here.
Referenced by Isis::LinearStretchType::getStretch(), Isis::StretchType::getStretch(), Isis::StretchType::setHistogram(), Isis::LinearStretchType::setStretch(), Isis::BinaryStretchType::setStretch(), Isis::ManualStretchType::setStretch(), setStretch(), Isis::StretchType::StretchType(), Isis::StretchType::updateGraph(), and Isis::StretchType::~StretchType().
|
protectedinherited |
Pairs table.
Referenced by Isis::ManualStretchType::ManualStretchType(), Isis::StretchType::StretchType(), and Isis::StretchType::updateTable().