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 
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();
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);
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
Isis::StereoTool::createToolBarWidget
QWidget * createToolBarWidget(QStackedWidget *parent)
Attaches this tool to the toolbar.
Definition: StereoTool.cpp:280
Isis::StereoTool::createStereoTool
void createStereoTool(QWidget *parent)
Design the StereoTool widget.
Definition: StereoTool.cpp:103
Isis::MdiCubeViewport
Cube display widget for certain Isis MDI applications.
Definition: MdiCubeViewport.h:39
QWidget
Isis::UniversalGroundMap
Universal Ground Map.
Definition: UniversalGroundMap.h:69
Isis::StereoTool::loadPoint
void loadPoint()
Load control point into the ControlPointEdit widget.
Definition: StereoTool.cpp:1332
Isis::StereoTool::setTemplateFile
void setTemplateFile()
Allows user to set a new template file.
Definition: StereoTool.cpp:1534
Isis::StereoTool::enableRubberBandTool
void enableRubberBandTool()
This methods enables the RubberBandTool, it also sets the RubberBandTool to allow points and to allow...
Definition: StereoTool.cpp:886
Isis::StereoTool::viewTemplateFile
void viewTemplateFile()
Allows the user to view the template file that is currently set.
Definition: StereoTool.cpp:1558
QList
This is free and unencumbered software released into the public domain.
Definition: BoxcarCachingAlgorithm.h:13
Isis::StereoTool::createWindow
PlotWindow * createWindow()
This needs to be implemented by children to instantiate a plot window of the appropriate child class ...
Definition: StereoTool.cpp:348
Isis::Stretch
Pixel value mapper.
Definition: Stretch.h:58
Isis::StereoTool::modifyPoint
void modifyPoint(ControlPoint *point)
Modify given control point.
Definition: StereoTool.cpp:1317
QMainWindow
Isis::StereoTool::setFiles
void setFiles(Cube *leftCube, Cube *rightCube)
Setup the stereo cubes.
Definition: StereoTool.cpp:783
Isis::SerialNumberList
Serial Number list generator.
Definition: SerialNumberList.h:64
ProfileDialog
Definition: ProfileDialog.h:13
QComboBox
Isis::StereoTool::createMenus
void createMenus()
Create the menus for StereoTool.
Definition: StereoTool.cpp:178
Isis::StereoTool::createPoint
void createPoint(double lat, double lon)
Create control point at given lat,lon.
Definition: StereoTool.cpp:1163
Isis::Distance
Distance measurement, usually in meters.
Definition: Distance.h:34
Isis::StereoTool::measureSaved
void measureSaved()
Save control measures under crosshairs of ChipViewports.
Definition: StereoTool.cpp:850
Isis::ControlPoint
A single control point.
Definition: ControlPoint.h:354
Isis::StereoTool::StereoTool
StereoTool(QWidget *parent)
Construct the StereoTool.
Definition: StereoTool.cpp:74
Isis::StereoTool::detachCurves
void detachCurves()
This will be called when the selected plot window changes.
Definition: StereoTool.cpp:357
Isis::Cube
IO Handler for Isis Cubes.
Definition: Cube.h:167
Isis::StereoTool::paintAllViewports
void paintAllViewports()
This method will repaint the control measures in each viewport.
Definition: StereoTool.cpp:1453
Isis::StereoTool::saveAsElevations
void saveAsElevations()
Save the elevation information to file.
Definition: StereoTool.cpp:1582
Isis::CubeViewport
Widget to display Isis cubes for qt apps.
Definition: CubeViewport.h:122
Isis::AbstractPlotTool
Parent class for plotting tools which provides common functionality.
Definition: AbstractPlotTool.h:43
Isis::StereoTool::clearFiles
void clearFiles()
New files selected, clean up old file info.
Definition: StereoTool.cpp:760
Isis::ToolPad
Definition: ToolPad.h:14
Isis::StereoTool::toolPadAction
QAction * toolPadAction(ToolPad *pad)
Put the StereoTool icon on the main window Toolpad.
Definition: StereoTool.cpp:250
Isis::ControlPointEdit
Point Editor Widget.
Definition: ControlPointEdit.h:155
Isis::PlotWindow
Definition: PlotWindow.h:88
QAction
Isis::StereoTool
Tool for computing parallax.
Definition: StereoTool.h:59
Isis::StereoTool::paintViewport
void paintViewport(MdiCubeViewport *cvp, QPainter *painter)
Repaint the given CubeViewport.
Definition: StereoTool.cpp:1375
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::StereoTool::deletePoint
void deletePoint(ControlPoint *point)
Delete given control point.
Definition: StereoTool.cpp:1294