Isis 3 Programmer Reference
StereoTool.h
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
13class QAction;
14class QCheckBox;
15class QComboBox;
16class QLabel;
17class QLineEdit;
18class QMainWindow;
19
20class ProfileDialog;
21
22namespace 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
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();
70 void stretchChipViewport(Stretch *, CubeViewport *);
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);
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
Parent class for plotting tools which provides common functionality.
Point Editor Widget.
A single control point.
IO Handler for Isis Cubes.
Definition Cube.h:168
Widget to display Isis cubes for qt apps.
Distance measurement, usually in meters.
Definition Distance.h:34
Cube display widget for certain Isis MDI applications.
Serial Number list generator.
Tool for computing parallax.
Definition StereoTool.h:59
QAction * toolPadAction(ToolPad *pad)
Put the StereoTool icon on the main window Toolpad.
void measureSaved()
Save control measures under crosshairs of ChipViewports.
void createPoint(double lat, double lon)
Create control point at given lat,lon.
void detachCurves()
This will be called when the selected plot window changes.
StereoTool(QWidget *parent)
Construct the StereoTool.
void modifyPoint(ControlPoint *point)
Modify given control point.
void setTemplateFile()
Allows user to set a new template file.
void deletePoint(ControlPoint *point)
Delete given control point.
void loadPoint()
Load control point into the ControlPointEdit widget.
void viewTemplateFile()
Allows the user to view the template file that is currently set.
void enableRubberBandTool()
This methods enables the RubberBandTool, it also sets the RubberBandTool to allow points and to allow...
void createStereoTool(QWidget *parent)
Design the StereoTool widget.
QWidget * createToolBarWidget(QStackedWidget *parent)
Attaches this tool to the toolbar.
void createMenus()
Create the menus for StereoTool.
PlotWindow * createWindow()
This needs to be implemented by children to instantiate a plot window of the appropriate child class ...
void paintAllViewports()
This method will repaint the control measures in each viewport.
void setFiles(Cube *leftCube, Cube *rightCube)
Setup the stereo cubes.
void paintViewport(MdiCubeViewport *cvp, QPainter *painter)
Repaint the given CubeViewport.
void saveAsElevations()
Save the elevation information to file.
void clearFiles()
New files selected, clean up old file info.
Pixel value mapper.
Definition Stretch.h:58
Universal Ground Map.
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16