Isis Developer Reference
AdvancedStretchDialog.h
Go to the documentation of this file.
1 #ifndef ADVANCEDSTRETCHDIALOG_H
2 #define ADVANCEDSTRETCHDIALOG_H
3 
4 #include <QDialog>
5 
6 class QShowEvent;
7 class QWidget;
8 
9 namespace Isis {
10  class Stretch;
11  class Histogram;
12  class CubeStretch;
13 };
14 
15 namespace Isis {
16  class AdvancedStretch;
17  class CubeViewport;
18 
30  class AdvancedStretchDialog : public QDialog {
31  Q_OBJECT
32 
33  public:
36 
37  void enableRgbMode(Stretch &redStretch, Histogram &redHist,
38  Stretch &grnStretch, Histogram &grnHist,
39  Stretch &bluStretch, Histogram &bluHist);
40  void updateHistograms(const Histogram &redHist,
41  const Histogram &grnHist,
42  const Histogram &bluHist);
43 
44  void updateForRGBMode(Stretch &redStretch, Histogram &redHist,
45  Stretch &grnStretch, Histogram &grnHist,
46  Stretch &bluStretch, Histogram &bluHist);
47 
48  void enableGrayMode(Stretch &grayStretch,
49  Histogram &grayHist);
50  void updateHistogram(const Histogram &grayHist);
51  bool isRgbMode() const;
52  void restoreGrayStretch(CubeStretch stretch);
54 
59 
65  bool enabled() {
66  return p_enabled;
67  }
68 
74  void enable(bool enable) {
75  p_enabled = enable;
76  }
77 
78  signals:
83  void saveToCube();
84  void deleteFromCube();
85  void loadStretch();
86 
87  public slots:
89 
90  protected slots:
91  void showEvent(QShowEvent *);
92  void hideEvent(QHideEvent *);
93 
94  private:
95  void destroyCurrentStretches();
96 
97  private:
98  bool p_enabled;
99  AdvancedStretch *p_grayStretch;
100  AdvancedStretch *p_redStretch;
101  AdvancedStretch *p_grnStretch;
102  AdvancedStretch *p_bluStretch;
103 
104  };
105 };
106 
107 
108 #endif
Isis::AdvancedStretchDialog::saveToCube
void saveToCube()
Isis::AdvancedStretch
Advanced Stretch Dialog.
Definition: AdvancedStretch.h:32
Isis::AdvancedStretchDialog::isRgbMode
bool isRgbMode() const
Returns true if the dialog is displaying the RGB advanced stretches.
Definition: AdvancedStretchDialog.cpp:340
Isis::AdvancedStretchDialog::restoreRgbStretch
void restoreRgbStretch(CubeStretch red, CubeStretch green, CubeStretch blue)
Restores a saved RGB stretch from the cube.
Definition: AdvancedStretchDialog.cpp:194
Stretch.h
QWidget
Isis::AdvancedStretchDialog::updateHistogram
void updateHistogram(const Histogram &grayHist)
This calls setHistogram on the gray advanced stretches.
Definition: AdvancedStretchDialog.cpp:306
Isis::AdvancedStretchDialog::hideEvent
void hideEvent(QHideEvent *)
This is implemented to send a signal when visibility changes.
Definition: AdvancedStretchDialog.cpp:328
Isis::AdvancedStretchDialog::getGrayStretch
CubeStretch getGrayStretch()
This returns the advanced stretch's stretch for gray.
Definition: AdvancedStretchDialog.cpp:350
CubeStretch.h
Isis::AdvancedStretchDialog::updateStretch
void updateStretch(CubeViewport *)
This calls setStretch on all applicable advanced stretches.
Definition: AdvancedStretchDialog.cpp:260
Isis::Stretch
Pixel value mapper.
Definition: Stretch.h:58
Isis::AdvancedStretch::getStretch
CubeStretch getStretch()
This returns the current stretch type's stretch.
Definition: AdvancedStretch.cpp:102
Isis::AdvancedStretchDialog
Advanced Stretch Dialog.
Definition: AdvancedStretchDialog.h:30
Isis::AdvancedStretchDialog::deleteFromCube
void deleteFromCube()
Isis::AdvancedStretch::setHistogram
void setHistogram(const Histogram &newHist)
This is called when the visible area changes, so that the histogram can be updated.
Definition: AdvancedStretch.cpp:158
Isis::AdvancedStretch::restoreSavedStretch
void restoreSavedStretch(CubeStretch newStretch)
Used to restore a saved Stretch from a cube.
Definition: AdvancedStretch.cpp:129
Isis::AdvancedStretchDialog::visibilityChanged
void visibilityChanged()
Emitted when this dialog is shown or hidden.
AdvancedStretch.h
Isis::CubeStretch
Stores stretch information for a cube.
Definition: CubeStretch.h:27
Isis::CubeViewport::greenStretch
CubeStretch greenStretch() const
Return the green band stretch.
Definition: CubeViewport.cpp:1674
CubeViewport.h
Isis::CubeViewport::redStretch
CubeStretch redStretch() const
Return the red band stretch.
Definition: CubeViewport.cpp:1668
Isis::AdvancedStretchDialog::stretchChanged
void stretchChanged()
Emitted when an advanced stretch has changed.
Isis::AdvancedStretchDialog::getBluStretch
CubeStretch getBluStretch()
This returns the advanced stretch's stretch for blue.
Definition: AdvancedStretchDialog.cpp:398
Isis::AdvancedStretchDialog::restoreGrayStretch
void restoreGrayStretch(CubeStretch stretch)
Restores a saved grayscale stretch from the cube.
Definition: AdvancedStretchDialog.cpp:176
Isis::CubeViewport::blueStretch
CubeStretch blueStretch() const
Return the blue band stretch.
Definition: CubeViewport.cpp:1680
Isis::AdvancedStretchDialog::updateHistograms
void updateHistograms(const Histogram &redHist, const Histogram &grnHist, const Histogram &bluHist)
This calls setHistogram on all of the advanced stretches.
Definition: AdvancedStretchDialog.cpp:284
_FILEINFO_
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:24
Isis::CubeViewport::grayStretch
CubeStretch grayStretch() const
Return the gray band stretch.
Definition: CubeViewport.cpp:1662
Isis::AdvancedStretchDialog::loadStretch
void loadStretch()
Isis::AdvancedStretchDialog::getRedStretch
CubeStretch getRedStretch()
This returns the advanced stretch's stretch for red.
Definition: AdvancedStretchDialog.cpp:366
Isis::AdvancedStretchDialog::AdvancedStretchDialog
AdvancedStretchDialog(QWidget *parent)
This constructs an advanced stretch.
Definition: AdvancedStretchDialog.cpp:18
Isis::IException
Isis exception class.
Definition: IException.h:91
Isis::CubeViewport
Widget to display Isis cubes for qt apps.
Definition: CubeViewport.h:122
Isis::AdvancedStretchDialog::showEvent
void showEvent(QShowEvent *)
This is implemented to send a signal when visibility changes.
Definition: AdvancedStretchDialog.cpp:317
Isis::AdvancedStretchDialog::enable
void enable(bool enable)
Sets the enabled state to enable.
Definition: AdvancedStretchDialog.h:74
Isis::IException::Programmer
@ Programmer
This error is for when a programmer made an API call that was illegal.
Definition: IException.h:146
Isis::AdvancedStretchDialog::enableGrayMode
void enableGrayMode(Stretch &grayStretch, Histogram &grayHist)
This displays a gray advanced stretch.
Definition: AdvancedStretchDialog.cpp:151
Isis::AdvancedStretchDialog::updateForRGBMode
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.
Definition: AdvancedStretchDialog.cpp:122
Isis::Histogram
Container of a cube histogram.
Definition: Histogram.h:74
Isis::AdvancedStretchDialog::~AdvancedStretchDialog
~AdvancedStretchDialog()
This destroys the advanced stretch dialog.
Definition: AdvancedStretchDialog.cpp:37
QFrame
Isis::AdvancedStretch::setStretch
void setStretch(Stretch newStretch)
This is called when the user creates a stretch outside of the advanced stretch.
Definition: AdvancedStretch.cpp:115
QDialog
Isis::AdvancedStretchDialog::enabled
bool enabled()
Returns true if the advanced stretch is enabled.
Definition: AdvancedStretchDialog.h:65
AdvancedStretchDialog.h
Isis::AdvancedStretchDialog::getGrnStretch
CubeStretch getGrnStretch()
This returns the advanced stretch's stretch for green.
Definition: AdvancedStretchDialog.cpp:382
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::AdvancedStretchDialog::enableRgbMode
void enableRgbMode(Stretch &redStretch, Histogram &redHist, Stretch &grnStretch, Histogram &grnHist, Stretch &bluStretch, Histogram &bluHist)
This displays RGB advanced stretches.
Definition: AdvancedStretchDialog.cpp:52