Isis 3 Programmer Reference
AdvancedStretchDialog.h
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:
96 
97  private:
98  bool p_enabled;
103 
104  };
105 };
106 
107 
108 #endif
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
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
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::AdvancedStretchDialog
Advanced Stretch Dialog.
Definition: AdvancedStretchDialog.h:30
Isis::AdvancedStretchDialog::visibilityChanged
void visibilityChanged()
Emitted when this dialog is shown or hidden.
Isis::CubeStretch
Stores stretch information for a cube.
Definition: CubeStretch.h:27
Isis::AdvancedStretchDialog::p_grnStretch
AdvancedStretch * p_grnStretch
Green stretch pane.
Definition: AdvancedStretchDialog.h:101
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::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
Isis::AdvancedStretchDialog::p_enabled
bool p_enabled
True if advanced stretch should be used.
Definition: AdvancedStretchDialog.h:98
Isis::AdvancedStretchDialog::p_bluStretch
AdvancedStretch * p_bluStretch
Blue stretch pane.
Definition: AdvancedStretchDialog.h:102
Isis::AdvancedStretchDialog::getRedStretch
CubeStretch getRedStretch()
This returns the advanced stretch's stretch for red.
Definition: AdvancedStretchDialog.cpp:366
Isis::AdvancedStretchDialog::p_redStretch
AdvancedStretch * p_redStretch
Red stretch pane.
Definition: AdvancedStretchDialog.h:100
Isis::AdvancedStretchDialog::AdvancedStretchDialog
AdvancedStretchDialog(QWidget *parent)
This constructs an advanced stretch.
Definition: AdvancedStretchDialog.cpp:18
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::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
Isis::AdvancedStretchDialog::p_grayStretch
AdvancedStretch * p_grayStretch
Gray stretch pane.
Definition: AdvancedStretchDialog.h:99
QDialog
Isis::AdvancedStretchDialog::enabled
bool enabled()
Returns true if the advanced stretch is enabled.
Definition: AdvancedStretchDialog.h:65
Isis::AdvancedStretchDialog::getGrnStretch
CubeStretch getGrnStretch()
This returns the advanced stretch's stretch for green.
Definition: AdvancedStretchDialog.cpp:382
Isis::AdvancedStretchDialog::destroyCurrentStretches
void destroyCurrentStretches()
This cleans up memory from currently displayed advanced stretches.
Definition: AdvancedStretchDialog.cpp:219
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