Isis 3.0 Programmer Reference
Back
|
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
Isis::StretchTool::m_preGlobalStretches
Stretch * m_preGlobalStretches
Stretches before global button pressed.
Definition:
StretchTool.h:213
Isis::MdiCubeViewport
Cube display widget for certain Isis MDI applications.
Definition:
MdiCubeViewport.h:53
Isis::StretchTool::setCubeViewport
void setCubeViewport(CubeViewport *)
This updates the advanced stretch to use the given viewport.
Definition:
StretchTool.cpp:386
Isis::StretchTool::stretchGlobal
void stretchGlobal()
Does a global stretch for the active viewport.
Definition:
StretchTool.cpp:741
Isis::ViewportBuffer
Reads and stores visible DN values.
Definition:
ViewportBuffer.h:78
Isis::StretchTool::stretchBuffer
static Stretch stretchBuffer(ViewportBuffer *buffer, QRect rect)
This method computes the stretch over a region using the viewport buffer.
Definition:
StretchTool.cpp:1018
Isis::StretchTool::createToolBarWidget
QWidget * createToolBarWidget(QStackedWidget *parent)
Creates the widget to add to the tool bar.
Definition:
StretchTool.cpp:133
Isis::StretchTool::stretchChipViewport
void stretchChipViewport(Stretch *, CubeViewport *)
when a viewport is stretched, send the stretch and the viewport associated with it to any ChipViewpor...
Isis::StretchTool::updateHistograms
void updateHistograms()
This updates the visible histograms in the advanced stretch, if present.
Definition:
StretchTool.cpp:302
Isis::StretchTool::Gray
Gray Band.
Definition:
StretchTool.h:111
Isis::StretchTool::stretchGlobalAllBands
void stretchGlobalAllBands()
This resets the stretch across all bands.
Definition:
StretchTool.cpp:752
Isis::StretchTool::~StretchTool
~StretchTool()
Destructor.
Definition:
StretchTool.cpp:82
Isis::StretchTool
Stretch image edit tool.
Definition:
StretchTool.h:99
Isis::StretchTool::m_stretchRegional
QAction * m_stretchRegional
Regional stretch action.
Definition:
StretchTool.h:201
Isis::StretchTool::m_stretchBandComboBox
QComboBox * m_stretchBandComboBox
Stretch combo box.
Definition:
StretchTool.h:205
Isis::StretchTool::screenPixelsChanged
void screenPixelsChanged()
This is called when the visible area changes.
Definition:
StretchTool.cpp:376
Isis::StretchTool::menuName
QString menuName() const
This let's Tool know which Menu the actions this class has should be added to.
Definition:
StretchTool.h:137
Isis::StretchTool::statsFromBuffer
static Statistics statsFromBuffer(ViewportBuffer *buffer, QRect rect)
This method will calculate and return the statistics for a given region and viewport buffer...
Definition:
StretchTool.cpp:1114
Isis::StretchTool::stretchBand
static Stretch stretchBand(CubeViewport *cvp, StretchBand band)
This method computes the stretch over the entire cube.
Definition:
StretchTool.cpp:1048
Isis::StretchTool::warningSignal
void warningSignal(std::string &pStr, const std::string pExStr)
Shows a warning.
Isis::StretchTool::stretchRect
void stretchRect(CubeViewport *cvp, QRect rect)
stretch the specified CubeViewport with the given rect
Definition:
StretchTool.cpp:838
Isis::StretchTool::Green
Green Band.
Definition:
StretchTool.h:113
Isis::StretchTool::m_stretchGlobal
QAction * m_stretchGlobal
Global stretch action.
Definition:
StretchTool.h:200
Isis::CubeViewport
Widget to display Isis cubes for qt apps.
Definition:
CubeViewport.h:121
Isis::StretchTool::m_stretchManual
QAction * m_stretchManual
Manual stretch action.
Definition:
StretchTool.h:202
Isis::StretchTool::showAdvancedDialog
void showAdvancedDialog()
This methods shows and updates the advanced dialog.
Definition:
StretchTool.cpp:725
Isis::StretchTool::setStretchAcrossBands
void setStretchAcrossBands()
Sets the stretch for all the bands in the active viewport to the current stretch. ...
Definition:
StretchTool.cpp:923
Isis::StretchTool::m_flashButton
QPushButton * m_flashButton
Button to press for global stretch.
Definition:
StretchTool.h:198
Isis::StretchTool::histFromBuffer
static Histogram histFromBuffer(ViewportBuffer *buffer)
Given a viewport buffer, this calculates a histogram.
Definition:
StretchTool.cpp:1171
Isis::StretchTool::Red
Red Band.
Definition:
StretchTool.h:112
Isis::StretchTool::m_chipViewportStretch
Stretch * m_chipViewportStretch
ChipViewport's stretch.
Definition:
StretchTool.h:215
Isis::AdvancedStretchDialog
Advanced Stretch Dialog.
Definition:
AdvancedStretchDialog.h:29
Isis::Statistics
This class is used to accumulate statistics on double arrays.
Definition:
Statistics.h:109
Tool.h
QComboBox
Isis::StretchTool::m_stretchBand
StretchBand m_stretchBand
Current stretch band.
Definition:
StretchTool.h:210
Isis::StretchTool::changeStretch
void changeStretch()
This method is called when the stretch has changed and sets the min/max text fields to the correct va...
Definition:
StretchTool.cpp:663
Isis::StretchTool::advancedStretchChanged
void advancedStretchChanged()
This is called when one of the advanced stretches changed.
Definition:
StretchTool.cpp:623
Isis::StretchTool::m_stretchRegionalButton
QToolButton * m_stretchRegionalButton
Regional Stretch Button.
Definition:
StretchTool.h:197
Isis::StretchTool::m_advancedStretch
AdvancedStretchDialog * m_advancedStretch
The advanced dialog.
Definition:
StretchTool.h:193
Isis::Histogram
Container of a cube histogram.
Definition:
Histogram.h:78
Isis::StretchTool::enableRubberBandTool
void enableRubberBandTool()
This method enables the RubberBandTool.
Definition:
StretchTool.cpp:912
Isis::StretchTool::updateAdvStretchDialogforAll
void updateAdvStretchDialogforAll(void)
Update the streches and corresponding histograms for all the colors Red, Green and Blue for Stretch A...
Definition:
StretchTool.cpp:349
Isis::StretchTool::histFromCube
static Histogram histFromCube(Cube *cube, int band, double min, double max)
This method will calculate and return the histogram for a given cube and band.
Definition:
StretchTool.cpp:1149
Isis::Stretch
Pixel value mapper.
Definition:
Stretch.h:72
Isis::StretchTool::rubberBandComplete
void rubberBandComplete()
This method is called when the RubberBandTool is complete.
Definition:
StretchTool.cpp:819
Isis::StretchTool::m_copyButton
QToolButton * m_copyButton
Copy Button.
Definition:
StretchTool.h:195
Isis::StretchTool::stretchRequested
void stretchRequested(MdiCubeViewport *cvp, int bandId)
The cube viewport requested a stretch at this time, give it to the viewport.
Definition:
StretchTool.cpp:477
Isis::StretchTool::m_globalButton
QToolButton * m_globalButton
Global Button.
Definition:
StretchTool.h:196
Isis::StretchTool::All
All Bands.
Definition:
StretchTool.h:115
Isis::StretchTool::stretchRegional
void stretchRegional()
Does a regional stretch for the active viewport.
Definition:
StretchTool.cpp:788
Isis::StretchTool::StretchBand
StretchBand
Enum to store the bands.
Definition:
StretchTool.h:110
Isis::StretchTool::addTo
void addTo(QMenu *menu)
Adds the stretch action to the given menu.
Definition:
StretchTool.cpp:119
Isis::StretchTool::m_stretchMinEdit
QLineEdit * m_stretchMinEdit
Min. line edit.
Definition:
StretchTool.h:207
Isis::StretchTool::StretchTool
StretchTool(QWidget *parent)
StretchTool constructor.
Definition:
StretchTool.cpp:42
Isis::StretchTool::toolPadAction
QAction * toolPadAction(ToolPad *pad)
Adds the stretch action to the toolpad.
Definition:
StretchTool.cpp:99
Isis::Tool
Base class for the Qisis tools.
Definition:
Tool.h:81
Isis::StretchTool::m_stretchMaxEdit
QLineEdit * m_stretchMaxEdit
Max. line edit.
Definition:
StretchTool.h:208
Isis::StretchTool::statsFromCube
static Statistics statsFromCube(Cube *cube, int band)
This method will calculate and return the statistics for a given cube and band.
Definition:
StretchTool.cpp:1091
Isis::StretchTool::updateTool
void updateTool()
Updates the stretch tool.
Definition:
StretchTool.cpp:424
QAction
Isis::StretchTool::stretchGlobalAllViewports
void stretchGlobalAllViewports()
Does a global stretch for all the viewports.
Definition:
StretchTool.cpp:775
Isis::StretchTool::mouseButtonRelease
void mouseButtonRelease(QPoint p, Qt::MouseButton s)
This method will call a global stretch if the right mouse button is released.
Definition:
StretchTool.cpp:888
QWidget
Isis::StretchTool::Blue
Blue Band.
Definition:
StretchTool.h:114
Isis::ToolPad
Definition:
ToolPad.h:14
Isis::StretchTool::m_copyBands
QAction * m_copyBands
Copy band stretch action.
Definition:
StretchTool.h:203
Isis::StretchTool::setStretchAllViewports
void setStretchAllViewports()
Sets the stretch for all the viewports to the current stretch in the active viewport.
Definition:
StretchTool.cpp:974
Isis::StretchTool::stretchBandChanged
void stretchBandChanged(int)
The selected band for stretching changed.
Definition:
StretchTool.cpp:1223
Isis::StretchTool::stretchChanged
void stretchChanged()
This method is called when the stretch has changed and sets the min/max text fields to the correct va...
Definition:
StretchTool.cpp:539
Isis::Cube
IO Handler for Isis Cubes.
Definition:
Cube.h:158
U.S. Department of the Interior
|
U.S. Geological Survey
ISIS
|
Privacy & Disclaimers
|
Astrogeology Research Program
To contact us, please post comments and questions on the
ISIS Support Center
File Modified: 07/12/2023 23:30:06