USGS

Isis 3.0 Object Programmers' Reference

Home

Qisis::BinaryStretch Class Reference

#include <BinaryStretch.h>

Inheritance diagram for Qisis::BinaryStretch:

Inheritance graph
[legend]
Collaboration diagram for Qisis::BinaryStretch:

Collaboration graph
[legend]
List of all members.

Detailed Description

Binary stretch to map a window of values to 255.

This QStretch allows the user to map a window of values to 255 and everything outside of the window to 0. The window's size and location can be manipulated using this QStretch's parameters.

Author:
2009-05-01 Noah hilt
History:
2009-06-04 Stacy Alley added a variable in the ComputeBinary() method: stepSize. This was required because previously this number was hard coded to be 0.001. In cubes with very small DN #'s this would cause an error to be thrown. The step size needed to be based on DN values from each cube.

Definition at line 32 of file BinaryStretch.h.

Signals

void update ()
 Signal to emit when this QStretch has been updated.

Public Member Functions

 BinaryStretch (const StretchTool *stretchTool)
 BinaryStretch Constructor.
BinaryStretchclone ()
 Creates a new BinaryStretch with this BinaryStretch's parameters and returns it.
QGroupBox * getParameters ()
 Returns the QGroupBox holding parameters.
void setMinMax (double min, double max)
 Sets the min/max and updates the scale.
void computeBinary ()
 Computes the binary stretch from the starting point and width.
virtual void connectTable (QTableWidget *widget)
 Abstract method to connect the AdvancedStretchTool's table of stretch pairs in order to modify it if necessary.
virtual void disconnectTable (QTableWidget *widget)
 Abstract method to disconnect the AdvancedStretchTool's table of stretch pairs.
QString name ()
 This method returns the name of this QStretch.
Isis::Stretch stretch ()
 This method returns the stretch.

Protected Slots

void changeStart (int value)
 Changes the starting point to the scaled value and computes the binary stretch.
void changeWidth (int value)
 Changes the width to the scaled value and computers the binary stretch.

Protected Attributes

const StretchToolp_stretchTool
 The StretchTool that created this QStretch.
QString p_name
 The name of this QStretch.
double p_min
 The minimum value a stretch input pair can be set to.
double p_max
 The maximum value a stretch input pair can be set to.
QGroupBox * p_parametersBox
 The QGroupBox that holds this QStretch's parameters.
Isis::Stretch p_stretch
 The stretch that this QStretch modifies.

Private Attributes

double p_scale
 The scale to convert between the QSlider values and min/max values.
double p_start
 The starting point of the window.
double p_width
 The width of the window.
QSlider * p_startSlider
 QSlider to move the starting point of the window.
QSlider * p_widthSlider
 QSlider to change the width of the window.


Constructor & Destructor Documentation

Qisis::BinaryStretch::BinaryStretch ( const StretchTool stretchTool  ) 

BinaryStretch Constructor.

StretchTool can not be null.

Initializes the stretch, QSliders, and sets the name of this QStretch to be 'Binary'

Parameters:
stretchTool 

Definition at line 15 of file BinaryStretch.cpp.

References p_startSlider, p_width, and p_widthSlider.

Referenced by clone().


Member Function Documentation

void Qisis::BinaryStretch::changeStart ( int  value  )  [protected, slot]

Changes the starting point to the scaled value and computes the binary stretch.

Parameters:
value 

Definition at line 93 of file BinaryStretch.cpp.

References computeBinary(), Qisis::QStretch::p_min, p_scale, and p_start.

Referenced by getParameters(), and setMinMax().

void Qisis::BinaryStretch::changeWidth ( int  value  )  [protected, slot]

Changes the width to the scaled value and computers the binary stretch.

Parameters:
value 

Definition at line 103 of file BinaryStretch.cpp.

References computeBinary(), p_scale, and p_width.

Referenced by getParameters(), and setMinMax().

BinaryStretch * Qisis::BinaryStretch::clone (  )  [virtual]

Creates a new BinaryStretch with this BinaryStretch's parameters and returns it.

Returns:
BinaryStretch*

Implements Qisis::QStretch.

Definition at line 34 of file BinaryStretch.cpp.

References BinaryStretch(), Qisis::QStretch::p_max, Qisis::QStretch::p_min, p_start, p_startSlider, Qisis::QStretch::p_stretch, Qisis::QStretch::p_stretchTool, p_width, p_widthSlider, and Qisis::QStretch::stretch().

void Qisis::BinaryStretch::computeBinary (  ) 

Computes the binary stretch from the starting point and width.

Definition at line 112 of file BinaryStretch.cpp.

References Isis::Stretch::AddPair(), Isis::Stretch::ClearPairs(), Qisis::QStretch::p_max, Qisis::QStretch::p_min, p_start, Qisis::QStretch::p_stretch, p_width, and Qisis::QStretch::update().

Referenced by changeStart(), and changeWidth().

virtual void Qisis::QStretch::connectTable ( QTableWidget *  widget  )  [inline, virtual, inherited]

Abstract method to connect the AdvancedStretchTool's table of stretch pairs in order to modify it if necessary.

The default implementation is to do nothing.

Parameters:
widget 

Reimplemented in Qisis::ManualStretch.

Definition at line 72 of file QStretch.h.

Referenced by Qisis::StretchTool::setStretch().

virtual void Qisis::QStretch::disconnectTable ( QTableWidget *  widget  )  [inline, virtual, inherited]

Abstract method to disconnect the AdvancedStretchTool's table of stretch pairs.

The default implementation is to do nothing.

Parameters:
widget 

Reimplemented in Qisis::ManualStretch.

Definition at line 80 of file QStretch.h.

QGroupBox * Qisis::BinaryStretch::getParameters (  )  [virtual]

Returns the QGroupBox holding parameters.

Returns:
QGroupBox*

Implements Qisis::QStretch.

Definition at line 51 of file BinaryStretch.cpp.

References changeStart(), changeWidth(), Qisis::QStretch::p_parametersBox, p_startSlider, and p_widthSlider.

QString Qisis::QStretch::name (  )  [inline, inherited]

This method returns the name of this QStretch.

Returns:
QString

Definition at line 97 of file QStretch.h.

References Qisis::QStretch::p_name.

Referenced by Qisis::StretchTool::stretchIndexChanged(), and Qisis::StretchTool::updateTool().

void Qisis::BinaryStretch::setMinMax ( double  min,
double  max 
) [virtual]

Sets the min/max and updates the scale.

Parameters:
min 
max 

Reimplemented from Qisis::QStretch.

Definition at line 80 of file BinaryStretch.cpp.

References changeStart(), changeWidth(), p_scale, p_startSlider, p_widthSlider, and Qisis::QStretch::setMinMax().

Isis::Stretch Qisis::QStretch::stretch (  )  [inline, inherited]

This method returns the stretch.

Returns:
Isis::Stretch

Definition at line 105 of file QStretch.h.

References Qisis::QStretch::p_stretch.

Referenced by Qisis::StretchTool::blueRangeChanged(), Qisis::SawtoothStretch::clone(), Qisis::ManualStretch::clone(), Qisis::LinearStretch::clone(), clone(), Qisis::StretchTool::greenRangeChanged(), Qisis::StretchTool::redRangeChanged(), Qisis::StretchTool::savePairs(), and Qisis::StretchTool::updateStretch().

void Qisis::QStretch::update (  )  [signal, inherited]

Signal to emit when this QStretch has been updated.

Referenced by Qisis::ManualStretch::addPair(), Qisis::LinearStretch::calculateStretch(), computeBinary(), Qisis::SawtoothStretch::computeSawtooths(), Qisis::ManualStretch::deletePair(), and Qisis::ManualStretch::setMinMax().


Member Data Documentation

double Qisis::QStretch::p_max [protected, inherited]

The maximum value a stretch input pair can be set to.

Definition at line 126 of file QStretch.h.

Referenced by Qisis::SawtoothStretch::clone(), Qisis::ManualStretch::clone(), Qisis::LinearStretch::clone(), clone(), computeBinary(), Qisis::SawtoothStretch::computeSawtooths(), and Qisis::QStretch::setMinMax().

double Qisis::QStretch::p_min [protected, inherited]

The minimum value a stretch input pair can be set to.

Definition at line 125 of file QStretch.h.

Referenced by Qisis::LinearStretch::calculateStretch(), Qisis::SawtoothStretch::changeStart(), changeStart(), Qisis::SawtoothStretch::clone(), Qisis::ManualStretch::clone(), Qisis::LinearStretch::clone(), clone(), computeBinary(), Qisis::SawtoothStretch::computeSawtooths(), and Qisis::QStretch::setMinMax().

QString Qisis::QStretch::p_name [protected, inherited]

The name of this QStretch.

Definition at line 124 of file QStretch.h.

Referenced by Qisis::QStretch::name().

QGroupBox* Qisis::QStretch::p_parametersBox [protected, inherited]

The QGroupBox that holds this QStretch's parameters.

Definition at line 127 of file QStretch.h.

Referenced by Qisis::SawtoothStretch::getParameters(), Qisis::ManualStretch::getParameters(), Qisis::LinearStretch::getParameters(), and getParameters().

double Qisis::BinaryStretch::p_scale [private]

The scale to convert between the QSlider values and min/max values.

Definition at line 47 of file BinaryStretch.h.

Referenced by changeStart(), changeWidth(), and setMinMax().

double Qisis::BinaryStretch::p_start [private]

The starting point of the window.

Definition at line 48 of file BinaryStretch.h.

Referenced by changeStart(), clone(), and computeBinary().

QSlider* Qisis::BinaryStretch::p_startSlider [private]

QSlider to move the starting point of the window.

Definition at line 50 of file BinaryStretch.h.

Referenced by BinaryStretch(), clone(), getParameters(), and setMinMax().

Isis::Stretch Qisis::QStretch::p_stretch [protected, inherited]

The stretch that this QStretch modifies.

Definition at line 128 of file QStretch.h.

Referenced by Qisis::ManualStretch::addPair(), Qisis::LinearStretch::calculateStretch(), Qisis::SawtoothStretch::clone(), Qisis::ManualStretch::clone(), Qisis::LinearStretch::clone(), clone(), computeBinary(), Qisis::SawtoothStretch::computeSawtooths(), Qisis::ManualStretch::deletePair(), Qisis::LinearStretch::LinearStretch(), Qisis::QStretch::QStretch(), Qisis::ManualStretch::setMinMax(), and Qisis::QStretch::stretch().

const StretchTool* Qisis::QStretch::p_stretchTool [protected, inherited]

The StretchTool that created this QStretch.

Definition at line 123 of file QStretch.h.

Referenced by Qisis::ManualStretch::addPair(), Qisis::ManualStretch::changeInput(), Qisis::SawtoothStretch::clone(), Qisis::ManualStretch::clone(), Qisis::LinearStretch::clone(), clone(), and Qisis::ManualStretch::editPair().

double Qisis::BinaryStretch::p_width [private]

The width of the window.

Definition at line 49 of file BinaryStretch.h.

Referenced by BinaryStretch(), changeWidth(), clone(), and computeBinary().

QSlider* Qisis::BinaryStretch::p_widthSlider [private]

QSlider to change the width of the window.

Definition at line 51 of file BinaryStretch.h.

Referenced by BinaryStretch(), clone(), getParameters(), and setMinMax().


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