Isis 3 Programmer Reference
SpectralPlotTool.h
1#ifndef SpectralPlotTool_h
2#define SpectralPlotTool_h
3
4#include "AbstractPlotTool.h"
5
6#include <vector>
7
8#include <QMap>
9
10class QMainWindow;
11
12namespace geos {
13 namespace geom {
14 class Envelope;
15 class Polygon;
16 }
17}
18
19namespace Isis {
20 class CubePlotCurve;
21 class PlotWindow;
22 class RubberBandComboBox;
23 class Statistics;
24
58 Q_OBJECT
59
60 public:
62
63 protected:
64 void addTo(QMenu *menu);
65 QWidget *createToolBarWidget(QStackedWidget *parent);
66 virtual PlotWindow *createWindow();
67 virtual void detachCurves();
71 void updateTool();
72
73 protected slots:
74 virtual void rubberBandComplete();
75 void viewportSelected();
76
77 public slots:
78 void refreshPlot();
79
80 private slots:
81 void selectCurvesToPlot();
82
83 private:
84 void getSpectralStatistics(QVector<double> &labels,
85 QVector<Statistics> &data,
86 MdiCubeViewport *viewport);
87 void validatePlotCurves();
88
90 QPointer<QComboBox> m_displayCombo;
91
93 QPointer<RubberBandComboBox> m_rubberBandCombo;
94
96 QPointer<QAction> m_toolPadAction;
97
99 QPointer<QAction> m_plotAvgAction;
101 QPointer<QAction> m_plotMinAction;
103 QPointer<QAction> m_plotMaxAction;
105 QPointer<QAction> m_plotStdDev1Action;
107 QPointer<QAction> m_plotStdDev2Action;
109 QPointer<QAction> m_plotStdErr1Action;
111 QPointer<QAction> m_plotStdErr2Action;
112
114 QScopedPointer<
115 QMap< MdiCubeViewport *, QPointer<CubePlotCurve> > > m_maxCurves;
116
118 QScopedPointer<
119 QMap< MdiCubeViewport *, QPointer<CubePlotCurve> > > m_minCurves;
120
122 QScopedPointer<
123 QMap< MdiCubeViewport *, QPointer<CubePlotCurve> > > m_avgCurves;
124
126 QScopedPointer<
127 QMap< MdiCubeViewport *, QPointer<CubePlotCurve> > > m_stdDev1Curves;
128
130 QScopedPointer<
131 QMap< MdiCubeViewport *, QPointer<CubePlotCurve> > > m_stdDev2Curves;
132
134 QScopedPointer<
135 QMap< MdiCubeViewport *, QPointer<CubePlotCurve> > > m_stdErr1Curves;
136
138 QScopedPointer<
139 QMap< MdiCubeViewport *, QPointer<CubePlotCurve> > > m_stdErr2Curves;
140
141
143 QPointer<QAction> m_showHideBandMarkers;
144 };
145};
146
147#endif
Parent class for plotting tools which provides common functionality.
Cube display widget for certain Isis MDI applications.
Plot cube DN statistics against the cube band numbers.
void viewportSelected()
This protected slot is called when user selects a viewport.
QScopedPointer< QMap< MdiCubeViewport *, QPointer< CubePlotCurve > > > m_stdErr2Curves
Plot curves for avg. - std. err.
QComboBox * spectralDisplayCombo() const
Get the combo box which toggles between units of wavelength and band number.
void getSpectralStatistics(QVector< double > &labels, QVector< Statistics > &data, MdiCubeViewport *viewport)
This method processes the spectral plot tool's selection and creates statistics for the selected pixe...
QPointer< QAction > m_toolPadAction
Plot tool's action.
void validatePlotCurves()
This method sets up the names, line style, and color of the all the CubePlotCurves that will be used ...
void enableRubberBandTool()
This method is called when the tool is activated by the parent, or when the plot mode is changed.
SpectralPlotTool(QWidget *parent)
This constructs a spectral plot tool.
void addTo(QMenu *menu)
Adds the plot tool to the menu.
void selectCurvesToPlot()
This prompts the user for which curves they want to plot.
QWidget * createToolBarWidget(QStackedWidget *parent)
Creates the widgets for the tool bar.
QPointer< QAction > m_plotMaxAction
This QAction actives/deactivates plotting the max values.
QScopedPointer< QMap< MdiCubeViewport *, QPointer< CubePlotCurve > > > m_avgCurves
Plot curves for average values.
QScopedPointer< QMap< MdiCubeViewport *, QPointer< CubePlotCurve > > > m_stdDev2Curves
Plot curves for avg. - std. dev.
void refreshPlot()
This method replots the data, with current settings and rubber band, in the plot window.
QPointer< QAction > m_plotStdErr2Action
This QAction actives/deactivates plotting the avg-std dev values.
QPointer< QAction > m_showHideBandMarkers
Hide/show lines action.
QPointer< QAction > m_plotAvgAction
This QAction actives/deactivates plotting the average values.
QScopedPointer< QMap< MdiCubeViewport *, QPointer< CubePlotCurve > > > m_stdErr1Curves
Plot curves for avg. + std. err.
QPointer< QComboBox > m_displayCombo
wavelength vs band #
QScopedPointer< QMap< MdiCubeViewport *, QPointer< CubePlotCurve > > > m_stdDev1Curves
Plot curves for avg. + std. dev.
virtual void rubberBandComplete()
Called when the user has finished drawing with the rubber band.
virtual void detachCurves()
Forget about all existing plot curves.
virtual PlotWindow * createWindow()
Creates a new plot window compatible with the curves in this tool.
QAction * toolPadAction(ToolPad *pad)
This method configures the QAction for this tool.
QPointer< QAction > m_plotMinAction
This QAction actives/deactivates plotting the min values.
QPointer< QAction > m_plotStdDev1Action
This QAction actives/deactivates plotting the avg+std dev values.
QPointer< RubberBandComboBox > m_rubberBandCombo
Combo box with all rubber banding types.
QScopedPointer< QMap< MdiCubeViewport *, QPointer< CubePlotCurve > > > m_maxCurves
Plot curves for max values.
QScopedPointer< QMap< MdiCubeViewport *, QPointer< CubePlotCurve > > > m_minCurves
Plot curves for min values.
QPointer< QAction > m_plotStdDev2Action
This QAction actives/deactivates plotting the avg-std dev values.
void updateTool()
Updates plot tool.
QPointer< QAction > m_plotStdErr1Action
This QAction actives/deactivates plotting the avg+std dev values.
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16