Isis 3.0 Object Programmers' Reference
Home
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
StretchTool.h
Go to the documentation of this file.
1
#ifndef StretchTool_h
2
#define StretchTool_h
3
4
// This is the only include allowed in this file!
5
#include "
Tool.h
"
6
7
class
QComboBox
;
8
class
QPushButton;
9
class
QLineEdit;
10
class
QRect;
11
class
QToolButton;
12
35
namespace
Isis {
36
class
AdvancedStretchDialog;
37
class
Cube;
38
class
CubeViewport;
39
class
Histogram;
40
class
Statistics;
41
class
Stretch;
42
class
ViewportBuffer;
43
99
class
StretchTool
:
public
Tool
{
100
Q_OBJECT
101
102
public
:
103
StretchTool
(
QWidget
*parent);
104
~StretchTool
();
105
void
addTo
(QMenu *menu);
106
110
enum
StretchBand
{
111
Gray
,
112
Red
,
113
Green
,
114
Blue
,
115
All
116
};
117
118
static
Stretch
stretchBuffer
(
ViewportBuffer
*buffer, QRect rect);
119
static
Stretch
stretchBand
(
CubeViewport
*cvp,
StretchBand
band);
120
121
static
Statistics
statsFromCube
(
Cube
*cube,
int
band);
122
static
Statistics
statsFromBuffer
(
ViewportBuffer
*buffer, QRect rect);
123
static
Histogram
histFromCube
(
Cube
*cube,
int
band,
124
double
min,
double
max);
125
static
Histogram
histFromBuffer
(
ViewportBuffer
*buffer);
126
static
Histogram
histFromBuffer
(
ViewportBuffer
*buffer, QRect rect,
127
double
min,
double
max);
128
void
updateAdvStretchDialogforAll
(
void
);
129
137
QString
menuName
()
const
{
138
return
"&View"
;
139
}
140
141
signals:
146
void
stretchChipViewport
(
Stretch
*,
CubeViewport
*);
147
156
void
warningSignal
(std::string &pStr,
const
std::string pExStr);
157
158
public
slots:
159
void
stretchGlobal
();
160
void
stretchGlobal
(
CubeViewport
*);
161
void
stretchGlobalAllBands
();
162
void
stretchGlobalAllViewports
();
163
void
stretchRegional
();
164
void
stretchRegional
(
CubeViewport
*);
165
166
protected
:
167
QAction
*
toolPadAction
(
ToolPad
*pad);
168
QWidget
*
createToolBarWidget
(QStackedWidget *parent);
169
void
updateTool
();
170
void
stretchRequested
(
MdiCubeViewport
*cvp,
int
bandId);
171
172
protected
slots:
173
void
mouseButtonRelease
(QPoint p, Qt::MouseButton s);
174
void
enableRubberBandTool
();
175
void
screenPixelsChanged
();
176
void
updateHistograms
();
177
void
rubberBandComplete
();
178
void
setCubeViewport
(
CubeViewport
*);
179
180
private
slots:
181
void
stretchChanged
();
182
void
advancedStretchChanged
();
183
void
changeStretch
();
184
void
showAdvancedDialog
();
185
void
setStretchAcrossBands
();
186
void
setStretchAllViewports
();
187
void
stretchBandChanged
(
int
);
188
189
private
:
190
void
stretchRect
(
CubeViewport
*cvp, QRect rect);
191
192
private
:
193
AdvancedStretchDialog
*
m_advancedStretch
;
194
195
QToolButton *
m_copyButton
;
196
QToolButton *
m_globalButton
;
197
QToolButton *
m_stretchRegionalButton
;
198
QPushButton *
m_flashButton
;
199
200
QAction
*
m_stretchGlobal
;
201
QAction
*
m_stretchRegional
;
202
QAction
*
m_stretchManual
;
203
QAction
*
m_copyBands
;
204
205
QComboBox
*
m_stretchBandComboBox
;
206
207
QLineEdit *
m_stretchMinEdit
;
208
QLineEdit *
m_stretchMaxEdit
;
209
210
StretchBand
m_stretchBand
;
211
213
Stretch
*
m_preGlobalStretches
;
214
215
Stretch
*
m_chipViewportStretch
;
216
};
217
};
218
219
#endif
220