Loading [MathJax]/jax/output/NativeMML/config.js
Isis 3 Programmer Reference
ScatterPlotWindow.h
1 #ifndef ScatterPlotWindow_h
2 #define ScatterPlotWindow_h
3 
4 // Only Parents of classes defined in this file should be included in this file!
5 #include "PlotWindow.h"
6 
7 #include <QList>
8 #include <QScopedPointer>
9 
10 class QwtPlotSpectrogram;
11 class QwtPlotMarker;
12 
13 namespace Isis {
14  class Cube;
15  class ScatterPlotTool;
16 
28  class ScatterPlotWindow : public PlotWindow {
29  Q_OBJECT
30 
31  public:
41  };
42 
43  ScatterPlotWindow(QString title,
44  Cube *xAxisCube, int xAxisBand, int xAxisBinCount,
45  Cube *yAxisCube, int yAxisBand, int yAxisBinCount,
46  QwtInterval sampleRange, QwtInterval lineRange,
47  QWidget *parent);
48  virtual ~ScatterPlotWindow();
49 
50  bool alarmingPlot() const;
51  bool alarmingViewport() const;
56 
57  bool eventFilter(QObject *o, QEvent *e);
58 
59  virtual void paint(MdiCubeViewport *vp, QPainter *painter);
60 
61  void setMousePosition(MdiCubeViewport *vp, QPoint mouseLoc);
62 
63  void setAlarmingPlot(bool);
64  void setAlarmingViewport(bool);
65  void setAlarmPlotBoxSize(int, int);
67  void setAlarmViewportScreenBoxSize(int, int);
68  void setAlarmViewportDnBoxSize(double, double);
69 
70  public slots:
71  void forgetCubes();
72 
73  protected slots:
74  void colorPlot();
75  void showHideContour();
76 
77  private:
78  bool isXCube(MdiCubeViewport *vp) const;
79  bool isYCube(MdiCubeViewport *vp) const;
80 
81  void mouseMoveEvent(QMouseEvent *e);
82  void mouseLeaveEvent(QMouseEvent *e);
83  void updateContourPen();
84 
85  private slots:
86  void configureAlarming();
87 
88  private:
90  QwtPlotSpectrogram *m_spectrogram;
91 
93  QPointer<QAction> m_colorize;
95  QPointer<QAction> m_contour;
96 
110  QwtInterval m_sampleRange;
112  QwtInterval m_lineRange;
113 
118 
123 
134  };
135 }
136 
137 #endif
138 
Isis::ScatterPlotWindow::m_yAxisCubeBand
int m_yAxisCubeBand
The band on the Y-Axis cube used for the scatter plot.
Definition: ScatterPlotWindow.h:108
Isis::ScatterPlotWindow::configureAlarming
void configureAlarming()
Give the users an alarm config dialog to change the alarming settings.
Definition: ScatterPlotWindow.cpp:711
Isis::ScatterPlotWindow::setAlarmViewportUnits
void setAlarmViewportUnits(AlarmRangeUnits)
This sets the units to be used for alarming plot->viewport.
Definition: ScatterPlotWindow.cpp:495
Isis::MdiCubeViewport
Cube display widget for certain Isis MDI applications.
Definition: MdiCubeViewport.h:39
QWidget
Isis::ScatterPlotWindow::m_contour
QPointer< QAction > m_contour
The action for switching on and off contour lines.
Definition: ScatterPlotWindow.h:95
Isis::ScatterPlotWindow::mouseMoveEvent
void mouseMoveEvent(QMouseEvent *e)
When the mosue moves, this updates the alarming information and causes repaints on the cube viewports...
Definition: ScatterPlotWindow.cpp:635
Isis::ScatterPlotWindow::m_alarmViewportScreenWidth
int m_alarmViewportScreenWidth
Alarm plot->viewport X (screen pixels) box size.
Definition: ScatterPlotWindow.h:127
Isis::ScatterPlotWindow::m_alarmViewport
bool m_alarmViewport
Alarm onto viewport... aka alarm plot->viewport.
Definition: ScatterPlotWindow.h:117
Isis::ScatterPlotWindow::setAlarmingPlot
void setAlarmingPlot(bool)
This enables or disables alarming viewport->plot.
Definition: ScatterPlotWindow.cpp:460
Isis::ScatterPlotWindow::m_alarmViewportUnits
AlarmRangeUnits m_alarmViewportUnits
Alarm plot->viewport current units.
Definition: ScatterPlotWindow.h:125
Isis::ScatterPlotWindow::alarmPlotBoxSize
QPair< int, int > alarmPlotBoxSize() const
This is the sample/line box sizes for alarming from viewport to plot.
Definition: ScatterPlotWindow.cpp:228
Isis::ScatterPlotWindow::m_yCubeDnAlarmRange
QPair< double, double > m_yCubeDnAlarmRange
The DN range of the Y-Axis Cube to be alarmed when painting.
Definition: ScatterPlotWindow.h:104
Isis::ScatterPlotWindow::colorPlot
void colorPlot()
This method switches the color mode of the scatter plot from black and white to color and visa versa.
Definition: ScatterPlotWindow.cpp:551
PlotWindow.h
Isis::ScatterPlotWindow::m_colorize
QPointer< QAction > m_colorize
The action for switching the scatter plot from B/W to color.
Definition: ScatterPlotWindow.h:93
Isis::ScatterPlotWindow::m_alarmPlotSamples
int m_alarmPlotSamples
Alarm viewport->plot viewport sample box size.
Definition: ScatterPlotWindow.h:120
Isis::ScatterPlotWindow::alarmViewportUnits
AlarmRangeUnits alarmViewportUnits() const
This is the active alarming units for plot->viewport.
Definition: ScatterPlotWindow.cpp:240
Isis::ScatterPlotWindow::m_alarmViewportScreenHeight
int m_alarmViewportScreenHeight
Alarm plot->viewport Y (screen pixels) box size.
Definition: ScatterPlotWindow.h:129
Isis::ScatterPlotWindow::m_alarmPlotLines
int m_alarmPlotLines
Alarm viewport->plot viewport line box size.
Definition: ScatterPlotWindow.h:122
Isis::ScatterPlotWindow::m_alarmViewportYDnBoxSize
double m_alarmViewportYDnBoxSize
Alarm plot->viewport Y (Cube DN) box size.
Definition: ScatterPlotWindow.h:133
Isis::ScatterPlotWindow::ScatterPlotWindow
ScatterPlotWindow(QString title, Cube *xAxisCube, int xAxisBand, int xAxisBinCount, Cube *yAxisCube, int yAxisBand, int yAxisBinCount, QwtInterval sampleRange, QwtInterval lineRange, QWidget *parent)
Create a scatter plot window with the given data.
Definition: ScatterPlotWindow.cpp:44
Isis::ScatterPlotWindow::m_alarmPlot
bool m_alarmPlot
Alarm onto plot... aka alarm viewport->plot.
Definition: ScatterPlotWindow.h:115
Isis::ScatterPlotWindow::m_xAxisCube
Cube * m_xAxisCube
The cube associated with the X-Axis DN values.
Definition: ScatterPlotWindow.h:98
Isis::ScatterPlotWindow::alarmViewportScreenBoxSize
QPair< int, int > alarmViewportScreenBoxSize() const
This is the alarming box size for plot->viewport in screen units.
Definition: ScatterPlotWindow.cpp:254
Isis::ScatterPlotWindow
Scatter Plot Window.
Definition: ScatterPlotWindow.h:28
Isis::ScatterPlotWindow::paint
virtual void paint(MdiCubeViewport *vp, QPainter *painter)
If the viewport is showing the x axis cube data or y axis cube data, and alarming is enabled,...
Definition: ScatterPlotWindow.cpp:316
Isis::ScatterPlotWindow::m_sampleRange
QwtInterval m_sampleRange
The sample range (1-based inclusive) of data used for the scatter plot.
Definition: ScatterPlotWindow.h:110
Isis::ScatterPlotWindow::setAlarmPlotBoxSize
void setAlarmPlotBoxSize(int, int)
This sets the box size for alarming viewport->plot in cube samples/lines.
Definition: ScatterPlotWindow.cpp:484
Isis::ScatterPlotWindow::alarmViewportDnBoxSize
QPair< double, double > alarmViewportDnBoxSize() const
This is the alarming box size for plot->viewport in cube units (number of samples/lines).
Definition: ScatterPlotWindow.cpp:270
Isis::ScatterPlotWindow::m_xAxisCubeBand
int m_xAxisCubeBand
The band on the X-Axis cube used for the scatter plot.
Definition: ScatterPlotWindow.h:106
Isis::ScatterPlotWindow::m_alarmViewportXDnBoxSize
double m_alarmViewportXDnBoxSize
Alarm plot->viewport X (Cube DN) box size.
Definition: ScatterPlotWindow.h:131
Isis::ScatterPlotWindow::setAlarmViewportDnBoxSize
void setAlarmViewportDnBoxSize(double, double)
This sets the cube DN box size for alarming plot->viewport.
Definition: ScatterPlotWindow.cpp:528
Isis::ScatterPlotWindow::AlarmRangeUnits
AlarmRangeUnits
This enumeration differentiates alarming a strict cube DN box size from a screen region.
Definition: ScatterPlotWindow.h:36
Isis::ScatterPlotWindow::m_yAxisCube
Cube * m_yAxisCube
The cube associated with the Y-Axis DN values.
Definition: ScatterPlotWindow.h:100
Isis::Cube
IO Handler for Isis Cubes.
Definition: Cube.h:167
Isis::ScatterPlotWindow::CubeUnits
@ CubeUnits
Alarming is a DN range around the mouse.
Definition: ScatterPlotWindow.h:38
Isis::ScatterPlotWindow::updateContourPen
void updateContourPen()
This sets the contour pen to an appropriate color based on the color of the plot (B/W v.
Definition: ScatterPlotWindow.cpp:698
Isis::ScatterPlotWindow::forgetCubes
void forgetCubes()
This causes the window to lose it's pointers to the input cubes.
Definition: ScatterPlotWindow.cpp:540
Isis::ScatterPlotWindow::setAlarmViewportScreenBoxSize
void setAlarmViewportScreenBoxSize(int, int)
This sets the screen pixel box size for alarming plot->viewport.
Definition: ScatterPlotWindow.cpp:511
Isis::ScatterPlotWindow::alarmingViewport
bool alarmingViewport() const
This indicates if we are alarming from plot to viewport.
Definition: ScatterPlotWindow.cpp:218
Isis::ScatterPlotWindow::m_xCubeDnAlarmRange
QPair< double, double > m_xCubeDnAlarmRange
The DN range of the X-Axis Cube to be alarmed when painting.
Definition: ScatterPlotWindow.h:102
QPair
This is free and unencumbered software released into the public domain.
Definition: CubeIoHandler.h:23
Isis::ScatterPlotWindow::setMousePosition
void setMousePosition(MdiCubeViewport *vp, QPoint mouseLoc)
Saves the current mouse position in the viewport so that the plot can be alarmed around that position...
Definition: ScatterPlotWindow.cpp:405
Isis::ScatterPlotWindow::mouseLeaveEvent
void mouseLeaveEvent(QMouseEvent *e)
When the mouse leaves the plot canvas we disable all alarming from plot->viewport.
Definition: ScatterPlotWindow.cpp:683
Isis::ScatterPlotWindow::isXCube
bool isXCube(MdiCubeViewport *vp) const
Returns true if the viewport's cube is the cube currently being used on the x-axis.
Definition: ScatterPlotWindow.cpp:607
Isis::ScatterPlotWindow::ScreenUnits
@ ScreenUnits
Alarming is a visible area around the mouse.
Definition: ScatterPlotWindow.h:40
QObject
Isis::ScatterPlotWindow::m_lineRange
QwtInterval m_lineRange
The line range (1-based inclusive) of data used for the scatter plot.
Definition: ScatterPlotWindow.h:112
Isis::PlotWindow
Definition: PlotWindow.h:88
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::ScatterPlotWindow::showHideContour
void showHideContour()
This method hides or displays the contour lines on the spectrogram.
Definition: ScatterPlotWindow.cpp:585
Isis::ScatterPlotWindow::eventFilter
bool eventFilter(QObject *o, QEvent *e)
We override events done on the plot canvas for alarming purposes.
Definition: ScatterPlotWindow.cpp:284
Isis::ScatterPlotWindow::m_spectrogram
QwtPlotSpectrogram * m_spectrogram
This is the scatter plot's Qwt plot item.
Definition: ScatterPlotWindow.h:90
Isis::ScatterPlotWindow::alarmingPlot
bool alarmingPlot() const
This indicates if we are alarming from viewport to plot.
Definition: ScatterPlotWindow.cpp:208
Isis::ScatterPlotWindow::isYCube
bool isYCube(MdiCubeViewport *vp) const
Returns true if the viewport's cube is the cube currently being used on the y-axis.
Definition: ScatterPlotWindow.cpp:621
Isis::ScatterPlotWindow::setAlarmingViewport
void setAlarmingViewport(bool)
This enables or disables alarming plot->viewport.
Definition: ScatterPlotWindow.cpp:471

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 USGS Astrogeology Discussion Board
To report a bug, or suggest a feature go to: ISIS Github
File Modified: 03/21/2022 06:56:14