Isis Developer Reference
SpectralPlotTool.h
Go to the documentation of this file.
1 #ifndef SpectralPlotTool_h
2 #define SpectralPlotTool_h
3 
4 #include "AbstractPlotTool.h"
5 
6 #include <vector>
7 
8 #include <QMap>
9 
10 class QMainWindow;
11 
12 namespace geos {
13  namespace geom {
14  class Envelope;
15  class Polygon;
16  }
17 }
18 
19 namespace Isis {
20  class CubePlotCurve;
21  class PlotWindow;
22  class RubberBandComboBox;
23  class Statistics;
24 
58  Q_OBJECT
59 
60  public:
61  SpectralPlotTool(QWidget *parent);
62 
63  protected:
64  void addTo(QMenu *menu);
65  QWidget *createToolBarWidget(QStackedWidget *parent);
66  virtual PlotWindow *createWindow();
67  virtual void detachCurves();
68  void enableRubberBandTool();
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<
116 
118  QScopedPointer<
120 
122  QScopedPointer<
124 
126  QScopedPointer<
128 
130  QScopedPointer<
132 
134  QScopedPointer<
136 
138  QScopedPointer<
140 
141 
143  QPointer<QAction> m_showHideBandMarkers;
144  };
145 };
146 
147 #endif
Isis::AbstractPlotTool::addWindow
PlotWindow * addWindow()
This creates and initializes everything about a plot window.
Definition: AbstractPlotTool.cpp:303
Isis::AbstractPlotTool::updateTool
virtual void updateTool()
This forwards all update calls to the plot windows.
Definition: AbstractPlotTool.cpp:118
CubePlotCurve.h
Isis::SpectralPlotTool::createWindow
virtual PlotWindow * createWindow()
Creates a new plot window compatible with the curves in this tool.
Definition: SpectralPlotTool.cpp:300
Isis::MdiCubeViewport
Cube display widget for certain Isis MDI applications.
Definition: MdiCubeViewport.h:39
Isis::RubberBandTool::PolygonMode
@ PolygonMode
Definition: RubberBandTool.h:64
QWidget
Isis::Statistics
This class is used to accumulate statistics on double arrays.
Definition: Statistics.h:94
Cube.h
Isis::PlotCurve::CubeDN
@ CubeDN
The data is a Cube DN value.
Definition: PlotCurve.h:67
Isis::RubberBandComboBox
Combo box for choosing a rubber band type.
Definition: RubberBandComboBox.h:26
Isis::SpectralPlotTool::SpectralPlotTool
SpectralPlotTool(QWidget *parent)
This constructs a spectral plot tool.
Definition: SpectralPlotTool.cpp:45
MdiCubeViewport.h
Isis::RubberBandTool::setDrawActiveViewportOnly
void setDrawActiveViewportOnly(bool activeOnly=false)
This called to set whether rubber band is drawn on active viewport only rather than all linked viewpo...
Definition: RubberBandTool.cpp:333
Isis::RubberBandTool::RectangleMode
@ RectangleMode
Definition: RubberBandTool.h:62
Isis::AbstractPlotTool::createCurve
static CubePlotCurve * createCurve(QString name, QPen pen, PlotCurve::Units xUnits, PlotCurve::Units yUnits)
This is a helper method for children.
Definition: AbstractPlotTool.cpp:233
Isis::Average
Functor for reduce using average functionality.
Definition: Reduce.h:107
QList< QAction * >
Isis::Tool::viewportChanged
void viewportChanged()
Isis::CubePlotCurve
This is a plot curve with information relating it to a particular cube or region of a cube.
Definition: CubePlotCurve.h:53
Isis::SpectralPlotTool::addTo
void addTo(QMenu *menu)
Adds the plot tool to the menu.
Definition: SpectralPlotTool.cpp:243
geos
Definition: Image.h:43
QMenu
Isis::Tool::toolIconDir
QString toolIconDir() const
returns the path to the icon directory.
Definition: Tool.h:113
Isis::RubberBandComboBox::Polygon
@ Polygon
Polygon.
Definition: RubberBandComboBox.h:41
QMainWindow
Isis::Tool::rubberBandTool
RubberBandTool * rubberBandTool()
Definition: Tool.cpp:57
Isis::RubberBandTool::currentMode
RubberBandMode currentMode()
Definition: RubberBandTool.cpp:1161
Isis::PvlContainer::hasKeyword
bool hasKeyword(const QString &name) const
Check to see if a keyword exists.
Definition: PvlContainer.cpp:159
Isis::Pvl
Container for cube-like labels.
Definition: Pvl.h:119
Isis::globalFactory
static geos::geom::GeometryFactory::Ptr globalFactory
Definition: PolygonTools.h:51
Isis::AbstractPlotTool::viewportsToPlot
QList< MdiCubeViewport * > viewportsToPlot()
Get a list of linked viewports that should be plotting when a new plot is requested.
Definition: AbstractPlotTool.cpp:133
Isis::RubberBandComboBox::Rectangle
@ Rectangle
Rectangle.
Definition: RubberBandComboBox.h:39
Isis::PlotWindow::defaultWindowTitle
static QString defaultWindowTitle()
This is the typical suffix for plot windows, it's here in case we want to update all plot windows to ...
Definition: PlotWindow.cpp:1810
Isis::AbstractPlotTool::selectedWindow
PlotWindow * selectedWindow(bool createIfNeeded=true)
Get the 'active' plot window (the window selected by the user to contain new curves).
Definition: AbstractPlotTool.cpp:256
ToolPad.h
Isis::PlotCurve::Units
Units
These are all the possible units for the x or y data in a plot curve.
Definition: PlotCurve.h:54
AbstractPlotTool.h
Isis::PlotWindow::add
virtual void add(CubePlotCurve *pc)
This method adds the curves to the plot.
Definition: PlotWindow.cpp:436
Isis::IsSpecial
bool IsSpecial(const double d)
Returns if the input pixel is special.
Definition: SpecialPixel.h:197
QComboBox
Isis::PlotWindow::xAxisUnits
PlotCurve::Units xAxisUnits() const
This is the data-type of the curves' x data in this plot window.
Definition: PlotWindow.cpp:266
Isis::SpectralPlotTool::toolPadAction
QAction * toolPadAction(ToolPad *pad)
This method configures the QAction for this tool.
Definition: SpectralPlotTool.cpp:152
Isis::SpectralPlotTool::refreshPlot
void refreshPlot()
This method replots the data, with current settings and rubber band, in the plot window.
Definition: SpectralPlotTool.cpp:352
SpectralPlotWindow.h
Isis::PlotCurve::Band
@ Band
The data is a band number.
Definition: PlotCurve.h:63
Isis::PvlGroup
Contains multiple PvlContainers.
Definition: PvlGroup.h:41
Pvl.h
Isis::toInt
int toInt(const QString &string)
Global function to convert from a string to an integer.
Definition: IString.cpp:93
Isis::SpectralPlotTool
Plot cube DN statistics against the cube band numbers.
Definition: SpectralPlotTool.h:57
Isis::SpectralPlotTool::updateTool
void updateTool()
Updates plot tool.
Definition: SpectralPlotTool.cpp:252
Isis::PvlObject::findObject
PvlObjectIterator findObject(const QString &name, PvlObjectIterator beg, PvlObjectIterator end)
Find the index of object with a specified name, between two indexes.
Definition: PvlObject.h:274
Isis::PlotCurve::Wavelength
@ Wavelength
The data is a wavelength.
Definition: PlotCurve.h:92
ASSERT
#define ASSERT(x)
Definition: IsisDebug.h:134
Isis::Cube::bandCount
virtual int bandCount() const
Returns the number of virtual bands for the cube.
Definition: Cube.cpp:1410
Isis::AbstractPlotTool
Parent class for plotting tools which provides common functionality.
Definition: AbstractPlotTool.h:43
round
#define round(x)
This is free and unencumbered software released into the public domain.
Definition: ViewportBuffer.cpp:29
Isis::Null
const double Null
Value for an Isis Null pixel.
Definition: SpecialPixel.h:95
Isis::SpectralPlotTool::detachCurves
virtual void detachCurves()
Forget about all existing plot curves.
Definition: SpectralPlotTool.cpp:316
Brick.h
Isis::ToolPad
Definition: ToolPad.h:14
Statistics.h
Isis::toDouble
double toDouble(const QString &string)
Global function to convert from a string to a double.
Definition: IString.cpp:149
Isis::SpectralPlotWindow
Definition: SpectralPlotWindow.h:29
Isis::Cube::label
Pvl * label() const
Returns a pointer to the IsisLabel object associated with the cube.
Definition: Cube.cpp:1701
RubberBandTool.h
QMap
This is free and unencumbered software released into the public domain.
Definition: CubeIoHandler.h:22
Isis::SpectralPlotTool::spectralDisplayCombo
QComboBox * spectralDisplayCombo() const
Get the combo box which toggles between units of wavelength and band number.
Definition: SpectralPlotTool.cpp:74
QDialog
Isis::SpectralPlotTool::rubberBandComplete
virtual void rubberBandComplete()
Called when the user has finished drawing with the rubber band.
Definition: SpectralPlotTool.cpp:333
Isis::SpectralPlotTool::viewportSelected
void viewportSelected()
This protected slot is called when user selects a viewport.
Definition: SpectralPlotTool.cpp:64
PolygonTools.h
SpectralPlotTool.h
QVector< double >
InterestOperator.h
Isis::SpectralPlotTool::createToolBarWidget
QWidget * createToolBarWidget(QStackedWidget *parent)
Creates the widgets for the tool bar.
Definition: SpectralPlotTool.cpp:171
Isis::SpectralPlotTool::enableRubberBandTool
void enableRubberBandTool()
This method is called when the tool is activated by the parent, or when the plot mode is changed.
Definition: SpectralPlotTool.cpp:87
Isis::PlotWindow::replot
void replot()
Reset the scale of the plot, replot it and emit plot changed.
Definition: PlotWindow.cpp:1797
IsisDebug.h
Isis::PlotWindow
Definition: PlotWindow.h:88
QAction
Isis::CubeViewport::cube
Cube * cube() const
Definition: CubeViewport.h:338
Isis::AbstractPlotTool::createToolBarWidget
QWidget * createToolBarWidget(QStackedWidget *parent)
This provides the standard plot tool options, such as selecting an active plot window.
Definition: AbstractPlotTool.cpp:103
Isis::Tool::cubeViewport
MdiCubeViewport * cubeViewport() const
Return the current cubeviewport.
Definition: Tool.h:197
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
RubberBandComboBox.h
Isis::RubberBandTool::vertices
QList< QPoint > vertices()
This method returns the vertices.
Definition: RubberBandTool.cpp:672