Isis 3 Developer Reference
StereoTool.h
Go to the documentation of this file.
1 #ifndef StereoTool_h
2 #define StereoTool_h
3 
4 #include "Tool.h"
5 
6 #include <QFile>
7 #include <QPointer>
8 #include <QString>
9 
10 #include "AbstractPlotTool.h"
11 #include "Distance.h"
12 
13 class QAction;
14 class QCheckBox;
15 class QComboBox;
16 class QLabel;
17 class QLineEdit;
18 class QMainWindow;
19 
20 class ProfileDialog;
21 
22 namespace Isis {
23  class ControlMeasure;
24  class ControlNet;
25  class ControlPoint;
26  class ControlPointEdit;
27  class Cube;
28  class CubeViewport;
29  class MdiCubeViewport;
30  class SerialNumberList;
31  class Stretch;
32  class UniversalGroundMap;
33 
59  class StereoTool : public AbstractPlotTool {
60  Q_OBJECT
61 
62  public:
63  StereoTool(QWidget *parent);
64  void paintViewport(MdiCubeViewport *cvp, QPainter *painter);
65  static QString lastPtIdValue;
66 
67  signals:
68  void tieToolSave();
69  void editPointChanged();
71 
72  public slots:
73  void createPoint(double lat, double lon);
74  void modifyPoint(ControlPoint *point);
75  void deletePoint(ControlPoint *point);
76 
77  protected:
78  QWidget *createToolBarWidget(QStackedWidget *parent);
80  void enableRubberBandTool();
82  void detachCurves();
83 
84  protected slots:
85  void rubberBandComplete();
86  void activateTool();
87 
88  private slots:
89  void showHelp();
90  void paintAllViewports();
91  void calculateElevation();
92  void profile();
93  void saveElevations();
94  void saveAsElevations();
95 
96  void userBaseRadius();
97  void updateRadiusLineEdit();
98 
99  void measureSaved();
100 
101  void setTemplateFile();
102  void viewTemplateFile();
103 
104  void clearProfile();
105  void createStartPoint();
106  void createEndPoint();
107 
108  private:
109  void createStereoTool(QWidget *parent);
110  void setupFiles();
111  void clearNetData();
112  void setFiles(Cube *leftCube, Cube *rightCube);
113  void clearFiles();
114  void paintProfile(MdiCubeViewport *vp, QPainter *painter,
115  QString serialNumber);
116  void calculateElevation(ControlPoint *point);
117 
118  void createMenus();
119 
120  void loadPoint();
121  void updateLabels();
122 
123  void warningDialog();
124  void readSettings();
125  void writeSettings();
126 
127  QMainWindow *m_stereoTool;
128  QComboBox *m_radiusBox;
129  QLineEdit *m_radiusLineEdit;
130  ControlPointEdit *m_pointEditor;
131  QLabel *m_ptIdValue;
132  QLabel *m_leftCubeLabel;
133  QLabel *m_rightCubeLabel;
134  QLabel *m_elevationLabel;
135  QLabel *m_elevationErrorLabel;
136  QLabel *m_baseRadiiLabel;
137  QLabel *m_leftDemRadiiLabel;
138  QLabel *m_rightDemRadiiLabel;
139 
140  bool m_showWarning;
141 
142  ControlPoint *m_startPoint;
143  ControlPoint *m_endPoint;
144 
145  enum CubeIndex {
146  Left,
147  Right
148  };
149 
150  SerialNumberList *m_serialNumberList;
151  QPointer<ControlNet> m_controlNet;
152  Distance m_targetRadius;
153  Distance m_baseRadius;
154  ControlPoint *m_editPoint;
155  int m_ptIdIndex;
156 
157  QList<CubeViewport *> m_linkedViewports;
158 
159  Cube *m_leftCube;
160  Cube *m_rightCube;
161  QString m_leftSN;
162  QString m_rightSN;
163  UniversalGroundMap *m_leftGM;
164  UniversalGroundMap *m_rightGM;
165 
166  QFile m_currentFile;
167  QAction *m_save;
168 
169 
170  ProfileDialog *m_profileDialog;
171 
172  };
173 };
174 
175 #endif
Cube display widget for certain Isis MDI applications.
Definition: MdiCubeViewport.h:53
PlotWindow * createWindow()
This needs to be implemented by children to instantiate a plot window of the appropriate child class ...
Definition: StereoTool.cpp:348
static QString lastPtIdValue
Definition: StereoTool.h:65
void stretchChipViewport(Stretch *, CubeViewport *)
Universal Ground Map.
Definition: UniversalGroundMap.h:85
void createPoint(double lat, double lon)
Create control point at given lat,lon.
Definition: StereoTool.cpp:1163
Definition: PlotWindow.h:88
QWidget * createToolBarWidget(QStackedWidget *parent)
Attaches this tool to the toolbar.
Definition: StereoTool.cpp:280
Widget to display Isis cubes for qt apps.
Definition: CubeViewport.h:132
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
void editPointChanged()
Definition: ProfileDialog.h:13
Distance measurement, usually in meters.
Definition: Distance.h:47
void rubberBandComplete()
Definition: StereoTool.cpp:895
void modifyPoint(ControlPoint *point)
Modify given control point.
Definition: StereoTool.cpp:1317
void activateTool()
Definition: StereoTool.cpp:341
Pixel value mapper.
Definition: Stretch.h:72
A single control point.
Definition: ControlPoint.h:369
StereoTool(QWidget *parent)
Construct the StereoTool.
Definition: StereoTool.cpp:74
void paintViewport(MdiCubeViewport *cvp, QPainter *painter)
Repaint the given CubeViewport.
Definition: StereoTool.cpp:1375
void deletePoint(ControlPoint *point)
Delete given control point.
Definition: StereoTool.cpp:1294
void detachCurves()
This will be called when the selected plot window changes.
Definition: StereoTool.cpp:357
Definition: BoxcarCachingAlgorithm.h:29
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
QAction * toolPadAction(ToolPad *pad)
Put the StereoTool icon on the main window Toolpad.
Definition: StereoTool.cpp:250
Point Editor Widget.
Definition: ControlPointEdit.h:147
Parent class for plotting tools which provides common functionality.
Definition: AbstractPlotTool.h:35
Serial Number list generator.
Definition: SerialNumberList.h:80
void enableRubberBandTool()
This methods enables the RubberBandTool, it also sets the RubberBandTool to allow points and to allow...
Definition: StereoTool.cpp:886
Tool for computing parallax.
Definition: StereoTool.h:59
Definition: ToolPad.h:14
IO Handler for Isis Cubes.
Definition: Cube.h:170