Isis 3 Programmer Reference
JigsawRunWidget.h
1 #ifndef JigsawRunWidget_h
2 #define JigsawRunWidget_h
3 
4 #include <QDialog>
5 #include <QDir>
6 #include <QDockWidget>
7 #include <QFrame>
8 #include <QMessageBox>
9 #include <QPointer>
10 #include <QWidget>
11 
12 #include "BundleSettings.h"
13 #include "IException.h"
14 
15 namespace Ui {
16  class JigsawRunWidget;
17 }
18 
19 class QString;
20 class QThread;
21 
22 namespace Isis {
23  class BundleAdjust;
24  class BundleSolutionInfo;
25  class Control;
26  class Cube;
27  class Directory;
28  class FileName;
29  class Project;
30 
109  class JigsawRunWidget : public QDockWidget {
110  Q_OBJECT
111 
112  public:
113  explicit JigsawRunWidget(Project *project, QWidget *parent = 0);
114  explicit JigsawRunWidget(Project *project,
115  BundleSettingsQsp bundleSettings,
116  Control *selectedControl,
117  QString outputControlFileName,
118  QWidget *parent = 0);
119 
121  void closeEvent(QCloseEvent *event);
122 
123 
124  public slots:
125  void outputBundleStatus(QString status);
126  void errorString(QString error);
127  void reportException(QString exception);
128  void updateIteration(int iteration);
129  void updatePoint(int point);
130  void updateStatus(QString status);
131  void bundleFinished(BundleSolutionInfo *bundleSolutionInfo);
132  void notifyThreadFinished();
133 
134  protected:
135  void init();
136  BundleAdjust *m_bundleAdjust;
137  Project *m_project;
138  Control *m_selectedControl;
139  QString m_selectedControlName;
140  QString m_outputControlName;
141  BundleSettingsQsp m_bundleSettings;
142 
143  private:
144  bool m_bRunning;
156  public std::unary_function<const FileName &, Cube *> {
157  public:
158  CopyImageToResultsFunctor(const QDir &destination);
160  Cube *operator()(const FileName &image);
161  private:
162  CopyImageToResultsFunctor &operator=(const CopyImageToResultsFunctor &other);
164  };
165 
166  private slots:
167  void on_JigsawSetupButton_clicked();
168  void on_JigsawRunButton_clicked();
170  void clearDialog();
171  void updateScrollBar();
172 
173  private:
177  Ui::JigsawRunWidget *m_ui;
178  };
179 };
180 #endif
Isis::JigsawRunWidget::notifyThreadFinished
void notifyThreadFinished()
Notifies the widget that the bundle thread has finished.
Definition: JigsawRunWidget.cpp:591
Isis::BundleAdjust
An image bundle adjustment object.
Definition: BundleAdjust.h:318
QWidget
Isis::JigsawRunWidget::CopyImageToResultsFunctor::operator()
Cube * operator()(const FileName &image)
Callable operator that copies an image to the bundle solution info results.
Definition: JigsawRunWidget.cpp:424
Isis::Directory
Definition: Directory.h:271
Isis::JigsawRunWidget::updateStatus
void updateStatus(QString status)
Update the label or text edit area with the error message by appending to list and refreshing.
Definition: JigsawRunWidget.cpp:578
Isis::FileName
File name manipulation and expansion.
Definition: FileName.h:100
Isis::JigsawRunWidget::CopyImageToResultsFunctor
Functor used to copy images to a specified destination directory.
Definition: JigsawRunWidget.h:156
Isis::JigsawRunWidget::errorString
void errorString(QString error)
Update the label or text edit area with the error message by appending to list and refreshing.
Definition: JigsawRunWidget.cpp:526
Isis::JigsawRunWidget::CopyImageToResultsFunctor::CopyImageToResultsFunctor
CopyImageToResultsFunctor(const QDir &destination)
Constructs a image copier functor for copying images used in the bundle adjustment to the bundle solu...
Definition: JigsawRunWidget.cpp:400
Isis::JigsawRunWidget::~JigsawRunWidget
~JigsawRunWidget()
Destructor.
Definition: JigsawRunWidget.cpp:110
Isis::Control
This represents an ISIS control net in a project-based GUI interface.
Definition: Control.h:66
QSharedPointer< BundleSettings >
Isis::JigsawRunWidget::m_ui
Ui::JigsawRunWidget * m_ui
Reference to self's UI generated with QtDesigner.
Definition: JigsawRunWidget.h:177
Isis::Project
The main project for ipce.
Definition: Project.h:289
Isis::JigsawRunWidget::m_bRunning
bool m_bRunning
Indicates whether or not the bundle adjust is running.
Definition: JigsawRunWidget.h:144
Isis::JigsawRunWidget::updateScrollBar
void updateScrollBar()
Updates the scroll bar to position to its maximum setting (the bottom).
Definition: JigsawRunWidget.cpp:498
Isis::JigsawRunWidget::m_bundleThread
QThread * m_bundleThread
separate thread for running bundle adjust calculations in.
Definition: JigsawRunWidget.h:145
Isis::BundleSolutionInfo
Container class for BundleAdjustment results.
Definition: BundleSolutionInfo.h:159
Isis::JigsawRunWidget::on_JigsawAcceptButton_clicked
void on_JigsawAcceptButton_clicked()
Accepts the bundle results and saves them to the project.
Definition: JigsawRunWidget.cpp:277
Isis::JigsawRunWidget::bundleFinished
void bundleFinished(BundleSolutionInfo *bundleSolutionInfo)
This method will be called when the bundle is complete.
Definition: JigsawRunWidget.cpp:643
Isis::Cube
IO Handler for Isis Cubes.
Definition: Cube.h:167
Isis::JigsawRunWidget::JigsawRunWidget
JigsawRunWidget(Project *project, QWidget *parent=0)
Constructor.
Definition: JigsawRunWidget.cpp:38
Isis::JigsawRunWidget::reportException
void reportException(QString exception)
Update the label or text edit area with the error message by appending to list and refreshing.
Definition: JigsawRunWidget.cpp:541
QThread
Isis::JigsawRunWidget::outputBundleStatus
void outputBundleStatus(QString status)
Update the label or text edit area with the most recent status update by appending to list and refres...
Definition: JigsawRunWidget.cpp:510
Isis::JigsawRunWidget::clearDialog
void clearDialog()
Resets the dialog's status widgets to their default state.
Definition: JigsawRunWidget.cpp:477
Isis::JigsawRunWidget::CopyImageToResultsFunctor::~CopyImageToResultsFunctor
~CopyImageToResultsFunctor()
Destructor.
Definition: JigsawRunWidget.cpp:408
Isis::JigsawRunWidget::CopyImageToResultsFunctor::m_destinationFolder
QDir m_destinationFolder
Directory to copy the image to.
Definition: JigsawRunWidget.h:163
Isis::JigsawRunWidget
This dialog allows the user to select the bundle adjust parameters, run the bundle,...
Definition: JigsawRunWidget.h:109
Isis::JigsawRunWidget::updateIteration
void updateIteration(int iteration)
Update the label or text edit area with the error message by appending to list and refreshing.
Definition: JigsawRunWidget.cpp:556
QDockWidget
Isis::JigsawRunWidget::init
void init()
Constructor delegate.
Definition: JigsawRunWidget.cpp:78
Isis::JigsawRunWidget::m_bundleSolutionInfo
BundleSolutionInfo * m_bundleSolutionInfo
Captures the most recent results of a bundle.
Definition: JigsawRunWidget.h:175
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::JigsawRunWidget::closeEvent
void closeEvent(QCloseEvent *event)
This method is called whenever the widget recieves a close request.
Definition: JigsawRunWidget.cpp:660
Isis::JigsawRunWidget::updatePoint
void updatePoint(int point)
Update the label or text edit area with the error message by appending to list and refreshing.
Definition: JigsawRunWidget.cpp:567