Isis Developer Reference
Isis::SawtoothStretchType Class Reference

This handles the advanced sawtooth stretch. More...

#include <SawtoothStretchType.h>

Inheritance diagram for Isis::SawtoothStretchType:
Inheritance graph
Collaboration diagram for Isis::SawtoothStretchType:
Collaboration graph

Signals

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

Public Member Functions

 SawtoothStretchType (const Histogram &, const Stretch &, const QString &name, const QColor &color)
 This initializes a sawtooth stretch type.
 
 ~SawtoothStretchType ()
 Destructor.
 
virtual CubeStretch getStretch ()
 Gets the CubeStretch for this Sawtooth Stretch.
 
virtual void setStretch (Stretch)
 Given an arbitrary stretch, this will re-interpret it, as best as possible, into a sawtooth stretch.
 
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 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.

Author
2010-05-20 Steven Lambright

Constructor & Destructor Documentation

◆ SawtoothStretchType()

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

This initializes a sawtooth stretch type.

Parameters
hist
stretch
name
color

References Isis::Statistics::Maximum(), Isis::Histogram::Median(), Isis::Statistics::Minimum(), Isis::StretchType::p_cubeHist, Isis::StretchType::p_mainLayout, and setStretch().

◆ ~SawtoothStretchType()

Isis::SawtoothStretchType::~SawtoothStretchType ( )

Destructor.

Member Function Documentation

◆ createStretchTable()

QTableWidget * Isis::StretchType::createStretchTable ( )
protectedinherited

This creates the stretch pairs table.

Returns
QTableWidget*

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

◆ deleteFromCube

void Isis::StretchType::deleteFromCube ( )
signalinherited

◆ getStretch()

CubeStretch Isis::SawtoothStretchType::getStretch ( )
virtual

Gets the CubeStretch for this Sawtooth Stretch.

Returns
CubeStretch

Reimplemented from Isis::StretchType.

References Isis::StretchType::p_stretch.

◆ loadStretch

void Isis::StretchType::loadStretch ( )
signalinherited

◆ saveToCube

void Isis::StretchType::saveToCube ( )
signalinherited

Emitted when a new Stretch object is available.

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

◆ setHistogram()

void Isis::StretchType::setHistogram ( const Histogram & hist)
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.

Parameters
hist

References Isis::StretchType::p_cubeHist, Isis::StretchType::p_graph, Isis::StretchType::p_stretch, Isis::HistogramWidget::setHistogram(), and Isis::StretchType::setStretch().

◆ setStretch()

void Isis::SawtoothStretchType::setStretch ( Stretch newStretch)
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.

Parameters
newStretchStretch to interpret

Implements Isis::StretchType.

References Isis::Histogram::BinSize(), Isis::Stretch::CopyPairs(), Isis::StretchType::p_cubeHist, Isis::StretchType::p_stretch, and Isis::StretchType::stretchChanged().

Referenced by SawtoothStretchType().

◆ stretchChanged

◆ updateGraph

void Isis::StretchType::updateGraph ( )
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().

◆ updateTable

void Isis::StretchType::updateTable ( )
protectedslotinherited

Member Data Documentation

◆ p_cubeHist

◆ p_graph

HistogramWidget* Isis::StretchType::p_graph
protectedinherited

◆ p_mainLayout

◆ p_stretch

◆ p_table

QTableWidget* Isis::StretchType::p_table
protectedinherited

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