Isis 3.0
Back | Home
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 
57  class StereoTool : public AbstractPlotTool {
58  Q_OBJECT
59 
60  public:
61  StereoTool(QWidget *parent);
62  void paintViewport(MdiCubeViewport *cvp, QPainter *painter);
63  static QString lastPtIdValue;
64 
65  signals:
66  void tieToolSave();
67  void editPointChanged();
69 
70  public slots:
71  void createPoint(double lat, double lon);
72  void modifyPoint(ControlPoint *point);
73  void deletePoint(ControlPoint *point);
74 
75  protected:
76  QWidget *createToolBarWidget(QStackedWidget *parent);
78  void enableRubberBandTool();
80  void detachCurves();
81 
82  protected slots:
83  void rubberBandComplete();
84  void activateTool();
85 
86  private slots:
87  void showHelp();
88  void paintAllViewports();
89  void calculateElevation();
90  void profile();
91  void saveElevations();
92  void saveAsElevations();
93 
94  void userBaseRadius();
95  void updateRadiusLineEdit();
96 
97  void measureSaved();
98 
99  void setTemplateFile();
100  void viewTemplateFile();
101 
102  void clearProfile();
103  void createStartPoint();
104  void createEndPoint();
105 
106  private:
107  void createStereoTool(QWidget *parent);
108  void setupFiles();
109  void clearNetData();
110  void setFiles(Cube *leftCube, Cube *rightCube);
111  void clearFiles();
112  void paintProfile(MdiCubeViewport *vp, QPainter *painter,
113  QString serialNumber);
114  void calculateElevation(ControlPoint *point);
115 
116  void createMenus();
117 
118  void loadPoint();
119  void updateLabels();
120 
121  void warningDialog();
122  void readSettings();
123  void writeSettings();
124 
125  QMainWindow *m_stereoTool;
126  QComboBox *m_radiusBox;
127  QLineEdit *m_radiusLineEdit;
128  ControlPointEdit *m_pointEditor;
129  QLabel *m_ptIdValue;
130  QLabel *m_leftCubeLabel;
131  QLabel *m_rightCubeLabel;
132  QLabel *m_elevationLabel;
133  QLabel *m_elevationErrorLabel;
134  QLabel *m_baseRadiiLabel;
135  QLabel *m_leftDemRadiiLabel;
136  QLabel *m_rightDemRadiiLabel;
137 
138  bool m_showWarning;
139 
140  ControlPoint *m_startPoint;
141  ControlPoint *m_endPoint;
142 
143  enum CubeIndex {
144  Left,
145  Right
146  };
147 
148  SerialNumberList *m_serialNumberList;
149  QPointer<ControlNet> m_controlNet;
150  Distance m_targetRadius;
151  Distance m_baseRadius;
152  ControlPoint *m_editPoint;
153  int m_ptIdIndex;
154 
155  QList<CubeViewport *> m_linkedViewports;
156 
157  Cube *m_leftCube;
158  Cube *m_rightCube;
159  QString m_leftSN;
160  QString m_rightSN;
161  UniversalGroundMap *m_leftGM;
162  UniversalGroundMap *m_rightGM;
163 
164  QFile m_currentFile;
165  QAction *m_save;
166 
167 
168  ProfileDialog *m_profileDialog;
169 
170  };
171 };
172 
173 #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:63
void stretchChipViewport(Stretch *, CubeViewport *)
Definition: moc_StereoTool.cpp:253
Universal Ground Map.
Definition: UniversalGroundMap.h:83
void createPoint(double lat, double lon)
Create control point at given lat,lon.
Definition: StereoTool.cpp:1162
void tieToolSave()
Definition: moc_StereoTool.cpp:241
Definition: PlotWindow.h:86
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:121
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
void editPointChanged()
Definition: moc_StereoTool.cpp:247
Definition: ProfileDialog.h:13
Distance measurement, usually in meters.
Definition: Distance.h:47
void rubberBandComplete()
Definition: StereoTool.cpp:894
void modifyPoint(ControlPoint *point)
Modify given control point.
Definition: StereoTool.cpp:1316
void activateTool()
Definition: StereoTool.cpp:341
Pixel value mapper.
Definition: Stretch.h:72
A single control point.
Definition: ControlPoint.h:339
StereoTool(QWidget *parent)
Construct the StereoTool.
Definition: StereoTool.cpp:74
void paintViewport(MdiCubeViewport *cvp, QPainter *painter)
Repaint the given CubeViewport.
Definition: StereoTool.cpp:1374
void deletePoint(ControlPoint *point)
Delete given control point.
Definition: StereoTool.cpp:1293
void detachCurves()
This will be called when the selected plot window changes.
Definition: StereoTool.cpp:357
Definition: BoxcarCachingAlgorithm.h:29
QAction * toolPadAction(ToolPad *pad)
Put the StereoTool icon on the main window Toolpad.
Definition: StereoTool.cpp:250
Point Editor Widget.
Definition: ControlPointEdit.h:144
Parent class for plotting tools which provides common functionality.
Definition: AbstractPlotTool.h:35
Serial Number list generator.
Definition: SerialNumberList.h:78
void enableRubberBandTool()
This methods enables the RubberBandTool, it also sets the RubberBandTool to allow points and to allow...
Definition: StereoTool.cpp:885
Tool for computing parallax.
Definition: StereoTool.h:57
Definition: ToolPad.h:14
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:29:34