USGS

Isis 3.0 Developer's Reference (API)

Home

Isis::BinaryStretchType Class Reference

This handles the advanced binary stretch. More...

#include <BinaryStretchType.h>

Inherits Isis::StretchType.

List of all members.

Signals

void stretchChanged ()
 Emitted when a new Stretch object is available.

Public Member Functions

 BinaryStretchType (const Histogram &, const Stretch &, const QString &name, const QColor &color)
 This constructs a binary stretch type.
 ~BinaryStretchType ()
 Destroys the binary stretch.
virtual void setStretch (Stretch)
 Given an arbitrary stretch, this will re-interpret it, as best as possible, into a binary 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.
Histogramp_cubeHist
 Visible area histogram.
QTableWidget * p_table
 Pairs table.
HistogramWidgetp_graph
 Histogram graph.
Stretchp_stretch
 Current stretch pairs stored here.

Detailed Description

This handles the advanced binary stretch.

The binary stretch consists off DNs being "ON" or "OFF" (0 or 255). This is useful for finding DNs in a certain range. Because all stretches consist of lines with a slope, we can't actually have a binary stretch. This, however, makes a stretch as close to binary as it can.

Author:
2010-05-20 Steven Lambright

Constructor & Destructor Documentation

Isis::BinaryStretchType::BinaryStretchType ( const Histogram hist,
const Stretch stretch,
const QString &  name,
const QColor &  color 
)

This constructs a binary stretch type.

Parameters:
hist 
stretch 
name 
color 

References Isis::StretchType::p_cubeHist, Isis::StretchType::p_mainLayout, Isis::Histogram::Percent(), and setStretch().

Isis::BinaryStretchType::~BinaryStretchType (  ) 

Destroys the binary stretch.


Member Function Documentation

QTableWidget * Isis::StretchType::createStretchTable (  )  [protected, inherited]

This creates the stretch pairs table.

Returns:
QTableWidget*

Referenced by Isis::StretchType::StretchType().

Stretch Isis::StretchType::getStretch (  )  [virtual, inherited]

Returns the current stretch object.

Returns:
Stretch

Reimplemented in Isis::LinearStretchType.

References Isis::StretchType::p_stretch.

Referenced by Isis::StretchType::updateTable().

void Isis::StretchType::setHistogram ( const Histogram hist  )  [virtual, inherited]

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.

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

void Isis::BinaryStretchType::setStretch ( Stretch  newStretch  )  [virtual]

Given an arbitrary stretch, this will re-interpret it, as best as possible, into a binary stretch.

It is required that a stretch that represents a binary stretch always translate into itself and does not cause a stretchChanged().

It is necessary to always update slider positions in this method even if the stretch did not change.

Parameters:
newStretch Stretch to interpret

Implements Isis::StretchType.

References Isis::Stretch::AddPair(), Isis::Histogram::BinSize(), Isis::Stretch::CopyPairs(), Isis::Stretch::Input(), Isis::Statistics::Maximum(), Isis::Statistics::Minimum(), Isis::Stretch::Output(), Isis::StretchType::p_cubeHist, Isis::StretchType::p_stretch, Isis::Stretch::Pairs(), Isis::StretchType::stretchChanged(), and Isis::Stretch::Text().

Referenced by BinaryStretchType().

void Isis::StretchType::stretchChanged (  )  [signal, inherited]
void Isis::StretchType::updateGraph (  )  [protected, slot, inherited]

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

void Isis::StretchType::updateTable (  )  [protected, slot, inherited]

Member Data Documentation

Histogram* Isis::StretchType::p_cubeHist [protected, inherited]
QGridLayout* Isis::StretchType::p_mainLayout [protected, inherited]
Stretch* Isis::StretchType::p_stretch [protected, inherited]
QTableWidget* Isis::StretchType::p_table [protected, inherited]

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