USGS

Isis 3.0 Object Programmers' Reference

Home

Isis::AdvancedStretchDialog Class Reference

Advanced Stretch Dialog. More...

#include <AdvancedStretchDialog.h>

Inheritance diagram for Isis::AdvancedStretchDialog:
Inheritance graph
Collaboration diagram for Isis::AdvancedStretchDialog:
Collaboration graph

Public Slots

void updateStretch (CubeViewport *)
 This calls setStretch on all applicable advanced stretches.
 

Signals

void stretchChanged ()
 Emitted when an advanced stretch has changed.
 
void visibilityChanged ()
 Emitted when this dialog is shown or hidden.
 

Public Member Functions

 AdvancedStretchDialog (QWidget *parent)
 This constructs an advanced stretch.
 
 ~AdvancedStretchDialog ()
 This destroys the advanced stretch dialog.
 
void enableRgbMode (Stretch &redStretch, Histogram &redHist, Stretch &grnStretch, Histogram &grnHist, Stretch &bluStretch, Histogram &bluHist)
 This displays RGB advanced stretches.
 
void updateHistograms (const Histogram &redHist, const Histogram &grnHist, const Histogram &bluHist)
 This calls setHistogram on all of the advanced stretches.
 
void updateForRGBMode (Stretch &redStretch, Histogram &redHist, Stretch &grnStretch, Histogram &grnHist, Stretch &bluStretch, Histogram &bluHist)
 Update the stretch and histogram for all the bands for All BandId option.
 
void enableGrayMode (Stretch &grayStretch, Histogram &grayHist)
 This displays a gray advanced stretch.
 
void updateHistogram (const Histogram &grayHist)
 This calls setHistogram on the gray advanced stretche.
 
bool isRgbMode () const
 Returns true if the dialog is displaying the RGB advanced stretches.
 
Stretch getGrayStretch ()
 This returns the advanced stretch's stretch for gray.
 
Stretch getRedStretch ()
 This returns the advanced stretch's stretch for red.
 
Stretch getGrnStretch ()
 This returns the advanced stretch's stretch for green.
 
Stretch getBluStretch ()
 This returns the advanced stretch's stretch for blue.
 
bool enabled ()
 Returns true if the advanced stretch is enabled.
 
void enable (bool enable)
 Sets the enabled state to enable.
 

Protected Slots

void showEvent (QShowEvent *)
 This is implemented to send a signal when visibility changes.
 
void hideEvent (QHideEvent *)
 This is implemented to send a signal when visibility changes.
 

Private Member Functions

void destroyCurrentStretches ()
 This cleans up memory from currently displayed advanced stretches.
 

Private Attributes

bool p_enabled
 True if advanced stretch should be used.
 
AdvancedStretchp_grayStretch
 Gray stretch pane.
 
AdvancedStretchp_redStretch
 Red stretch pane.
 
AdvancedStretchp_grnStretch
 Green stretch pane.
 
AdvancedStretchp_bluStretch
 Blue stretch pane.
 

Detailed Description

Advanced Stretch Dialog.

Author
2010-05-20 Steven Lambright
History:
2011-03-22 Sharmila Prasad - Added API updateForRGBMode to accomodate changes for all Bands for BandID All.

Definition at line 29 of file AdvancedStretchDialog.h.

Constructor & Destructor Documentation

Isis::AdvancedStretchDialog::AdvancedStretchDialog ( QWidget parent)

This constructs an advanced stretch.

Parameters
parentthe parent widget

Definition at line 15 of file AdvancedStretchDialog.cpp.

References p_bluStretch, p_enabled, p_grayStretch, p_grnStretch, and p_redStretch.

Isis::AdvancedStretchDialog::~AdvancedStretchDialog ( )

This destroys the advanced stretch dialog.

Definition at line 31 of file AdvancedStretchDialog.cpp.

References destroyCurrentStretches().

Member Function Documentation

void Isis::AdvancedStretchDialog::destroyCurrentStretches ( )
private

This cleans up memory from currently displayed advanced stretches.

No stretches are visible after this is called.

Definition at line 133 of file AdvancedStretchDialog.cpp.

References p_bluStretch, p_grayStretch, p_grnStretch, p_redStretch, and stretchChanged().

Referenced by enableGrayMode(), enableRgbMode(), and ~AdvancedStretchDialog().

void Isis::AdvancedStretchDialog::enable ( bool  enable)
inline

Sets the enabled state to enable.

Parameters
enable

Definition at line 71 of file AdvancedStretchDialog.h.

References p_enabled.

Referenced by Isis::StretchTool::setCubeViewport().

bool Isis::AdvancedStretchDialog::enabled ( )
inline

Returns true if the advanced stretch is enabled.

Returns

Definition at line 62 of file AdvancedStretchDialog.h.

References p_enabled.

Referenced by Isis::StretchTool::updateTool().

void Isis::AdvancedStretchDialog::enableGrayMode ( Stretch grayStretch,
Histogram grayHist 
)

This displays a gray advanced stretch.

Parameters
grayStretch
grayHist

Definition at line 115 of file AdvancedStretchDialog.cpp.

References destroyCurrentStretches(), p_grayStretch, and stretchChanged().

Referenced by Isis::StretchTool::setCubeViewport().

void Isis::AdvancedStretchDialog::enableRgbMode ( Stretch redStretch,
Histogram redHist,
Stretch grnStretch,
Histogram grnHist,
Stretch bluStretch,
Histogram bluHist 
)

This displays RGB advanced stretches.

Parameters
redStretch
redHist
grnStretch
grnHist
bluStretch
bluHist

Definition at line 46 of file AdvancedStretchDialog.cpp.

References destroyCurrentStretches(), p_bluStretch, p_grnStretch, p_redStretch, and stretchChanged().

Referenced by Isis::StretchTool::setCubeViewport().

Stretch Isis::AdvancedStretchDialog::getBluStretch ( )

This returns the advanced stretch's stretch for blue.

Returns
Stretch

Definition at line 312 of file AdvancedStretchDialog.cpp.

References _FILEINFO_, Isis::AdvancedStretch::getStretch(), p_bluStretch, and Isis::IException::Programmer.

Referenced by Isis::StretchTool::advancedStretchChanged().

Stretch Isis::AdvancedStretchDialog::getGrayStretch ( )

This returns the advanced stretch's stretch for gray.

Returns
Stretch

Definition at line 264 of file AdvancedStretchDialog.cpp.

References _FILEINFO_, Isis::AdvancedStretch::getStretch(), p_grayStretch, and Isis::IException::Programmer.

Referenced by Isis::StretchTool::advancedStretchChanged().

Stretch Isis::AdvancedStretchDialog::getGrnStretch ( )

This returns the advanced stretch's stretch for green.

Returns
Stretch

Definition at line 296 of file AdvancedStretchDialog.cpp.

References _FILEINFO_, Isis::AdvancedStretch::getStretch(), p_grnStretch, and Isis::IException::Programmer.

Referenced by Isis::StretchTool::advancedStretchChanged().

Stretch Isis::AdvancedStretchDialog::getRedStretch ( )

This returns the advanced stretch's stretch for red.

Returns
Stretch

Definition at line 280 of file AdvancedStretchDialog.cpp.

References _FILEINFO_, Isis::AdvancedStretch::getStretch(), p_redStretch, and Isis::IException::Programmer.

Referenced by Isis::StretchTool::advancedStretchChanged().

void Isis::AdvancedStretchDialog::hideEvent ( QHideEvent *  event)
protectedslot

This is implemented to send a signal when visibility changes.

Parameters
event

Definition at line 242 of file AdvancedStretchDialog.cpp.

References visibilityChanged().

bool Isis::AdvancedStretchDialog::isRgbMode ( ) const

Returns true if the dialog is displaying the RGB advanced stretches.

Returns
bool

Definition at line 254 of file AdvancedStretchDialog.cpp.

References p_bluStretch, p_grnStretch, and p_redStretch.

Referenced by Isis::StretchTool::advancedStretchChanged(), Isis::StretchTool::updateHistograms(), and Isis::StretchTool::updateTool().

void Isis::AdvancedStretchDialog::showEvent ( QShowEvent *  event)
protectedslot

This is implemented to send a signal when visibility changes.

Parameters
event

Definition at line 231 of file AdvancedStretchDialog.cpp.

References visibilityChanged().

void Isis::AdvancedStretchDialog::stretchChanged ( )
signal

Emitted when an advanced stretch has changed.

Referenced by destroyCurrentStretches(), enableGrayMode(), and enableRgbMode().

void Isis::AdvancedStretchDialog::updateForRGBMode ( Stretch redStretch,
Histogram redHist,
Stretch grnStretch,
Histogram grnHist,
Stretch bluStretch,
Histogram bluHist 
)

Update the stretch and histogram for all the bands for All BandId option.

Author
Sharmila Prasad (3/14/2011)
Parameters
redStretch- Updated Red Stretch
redHist- Updated Red Histogram
grnStretch- Updated Green Stretch
grnHist- Updated Green Histogram
bluStretch- Updated Blue Stretch
bluHist- Updated Blue Histogram

Definition at line 86 of file AdvancedStretchDialog.cpp.

References p_bluStretch, p_grnStretch, p_redStretch, Isis::AdvancedStretch::setHistogram(), and Isis::AdvancedStretch::setStretch().

Referenced by Isis::StretchTool::updateAdvStretchDialogforAll().

void Isis::AdvancedStretchDialog::updateHistogram ( const Histogram grayHist)

This calls setHistogram on the gray advanced stretche.

This should be called every time the visible area changes.

Parameters
grayHistHistogram of visible area on gray band

Definition at line 220 of file AdvancedStretchDialog.cpp.

References p_grayStretch, and Isis::AdvancedStretch::setHistogram().

Referenced by Isis::StretchTool::updateHistograms().

void Isis::AdvancedStretchDialog::updateHistograms ( const Histogram redHist,
const Histogram grnHist,
const Histogram bluHist 
)

This calls setHistogram on all of the advanced stretches.

This should be called every time the visible area changes.

Parameters
redHistHistogram of visible area on red band
grnHistHistogram of visible area on green band
bluHistHistogram of visible area on blue band

Definition at line 198 of file AdvancedStretchDialog.cpp.

References p_bluStretch, p_grnStretch, p_redStretch, and Isis::AdvancedStretch::setHistogram().

Referenced by Isis::StretchTool::updateHistograms().

void Isis::AdvancedStretchDialog::updateStretch ( CubeViewport cvp)
slot

This calls setStretch on all applicable advanced stretches.

This should be called any time the cube viewport changes.

Parameters
cvp

Definition at line 174 of file AdvancedStretchDialog.cpp.

References Isis::CubeViewport::blueStretch(), Isis::CubeViewport::grayStretch(), Isis::CubeViewport::greenStretch(), p_bluStretch, p_grayStretch, p_grnStretch, p_redStretch, Isis::CubeViewport::redStretch(), and Isis::AdvancedStretch::setStretch().

Referenced by Isis::StretchTool::showAdvancedDialog(), and Isis::StretchTool::stretchChanged().

void Isis::AdvancedStretchDialog::visibilityChanged ( )
signal

Emitted when this dialog is shown or hidden.

Referenced by hideEvent(), and showEvent().

Member Data Documentation

AdvancedStretch* Isis::AdvancedStretchDialog::p_bluStretch
private
bool Isis::AdvancedStretchDialog::p_enabled
private

True if advanced stretch should be used.

Definition at line 92 of file AdvancedStretchDialog.h.

Referenced by AdvancedStretchDialog(), enable(), and enabled().

AdvancedStretch* Isis::AdvancedStretchDialog::p_grayStretch
private
AdvancedStretch* Isis::AdvancedStretchDialog::p_grnStretch
private
AdvancedStretch* Isis::AdvancedStretchDialog::p_redStretch
private

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