Isis Developer Reference
JigsawRunWidget.h
Go to the documentation of this file.
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();
142 
143  private:
144  bool m_bRunning;
145  QThread *m_bundleThread;
155  class CopyImageToResultsFunctor :
156  public std::unary_function<const FileName &, Cube *> {
157  public:
158  CopyImageToResultsFunctor(const QDir &destination);
159  ~CopyImageToResultsFunctor();
160  Cube *operator()(const FileName &image);
161  private:
162  CopyImageToResultsFunctor &operator=(const CopyImageToResultsFunctor &other);
163  QDir m_destinationFolder;
164  };
165 
166  private slots:
167  void on_JigsawSetupButton_clicked();
168  void on_JigsawRunButton_clicked();
169  void on_JigsawAcceptButton_clicked();
170  void clearDialog();
171  void updateScrollBar();
172 
173  private:
175  BundleSolutionInfo *m_bundleSolutionInfo;
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::JigsawRunWidget::m_bundleAdjust
BundleAdjust * m_bundleAdjust
Definition: JigsawRunWidget.h:136
Isis::BundleAdjust
An image bundle adjustment object.
Definition: BundleAdjust.h:318
FileName.h
QWidget
Isis::JigsawRunWidget::m_selectedControlName
QString m_selectedControlName
Definition: JigsawRunWidget.h:139
Isis::ImageList::path
QString path() const
Get the path to the images in the image list (relative to project root).
Definition: ImageList.cpp:735
Cube.h
Isis::BundleSolutionInfo::outputPointsCSV
bool outputPointsCSV()
Outputs point data to a csv file.
Definition: BundleSolutionInfo.cpp:1404
Isis::PvlObject
Contains Pvl Groups and Pvl Objects.
Definition: PvlObject.h:61
Isis::BundleSolutionInfo::addAdjustedImages
void addAdjustedImages(ImageList *images)
Adds a list of images that were adjusted (their labels were updated).
Definition: BundleSolutionInfo.cpp:166
Isis::Directory
Definition: Directory.h:271
QList
This is free and unencumbered software released into the public domain.
Definition: BoxcarCachingAlgorithm.h:13
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
Project.h
JigsawRunWidget.h
Isis::Table::Label
PvlObject & Label()
The Table's label.
Definition: Table.cpp:260
Isis::JigsawRunWidget::m_outputControlName
QString m_outputControlName
Definition: JigsawRunWidget.h:140
Isis::FileName::name
QString name() const
Returns the name of the file excluding the path and the attributes in the file name.
Definition: FileName.cpp:162
Isis::BundleResults::sigmaCoord1StatisticsRms
double sigmaCoord1StatisticsRms() const
Returns the RMS of the adjusted sigmas for coordinate 1.
Definition: BundleResults.cpp:1085
Isis::FileName
File name manipulation and expansion.
Definition: FileName.h:100
Process.h
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
Directory.h
Isis::Cube::copy
Cube * copy(FileName newFile, const CubeAttributeOutput &newFileAttributes)
Copies the cube to the new fileName.
Definition: Cube.cpp:276
Isis::ImageList::append
void append(Image *const &value)
Appends an image to the image list.
Definition: ImageList.cpp:153
Isis::Process
Base class for all cube processing derivatives.
Definition: Process.h:143
Isis::BundleSolutionInfo::outputImagesCSV
bool outputImagesCSV()
Outputs the bundleout_images.csv file which contains Jigsaw data about the images within each observa...
Definition: BundleSolutionInfo.cpp:1085
Isis::BundleAdjust::abortBundle
void abortBundle()
Flag to abort when bundle is threaded.
Definition: BundleAdjust.cpp:707
BundleSettings.h
JigsawSetupDialog.h
Isis::JigsawSetupDialog
Definition: JigsawSetupDialog.h:97
Isis::BundleAdjust::spVector
Table spVector(int index)
Return the updated instrument position table for the ith cube in the cube list given to the construct...
Definition: BundleAdjust.cpp:2846
Isis::iTime::CurrentLocalTime
static QString CurrentLocalTime()
Returns the current local time This time is taken directly from the system clock, so if the system cl...
Definition: iTime.cpp:513
Isis::JigsawRunWidget::~JigsawRunWidget
~JigsawRunWidget()
Destructor.
Definition: JigsawRunWidget.cpp:110
Isis::CubeAttributeOutput
Manipulate and parse attributes of output cube filenames.
Definition: CubeAttribute.h:473
Isis::Image::fileName
QString fileName() const
Get the file name of the cube that this image represents.
Definition: Image.cpp:340
Image.h
Isis::Control
This represents an ISIS control net in a project-based GUI interface.
Definition: Control.h:66
QSharedPointer< BundleSettings >
Isis::PvlObject::object
PvlObject & object(const int index)
Return the object at the specified index.
Definition: PvlObject.cpp:489
Isis::Project::addBundleSolutionInfo
void addBundleSolutionInfo(BundleSolutionInfo *bundleSolutionInfo)
Add the given BundleSolutionInfo to the current project.
Definition: Project.cpp:1194
QStringList
Isis::BundleAdjust::controlNet
ControlNetQsp controlNet()
Returns a pointer to the output control network.
Definition: BundleAdjust.cpp:2773
Isis::BundleSolutionInfo::setOutputControl
void setOutputControl(Control *outputControl)
Returns the name of the output control network.
Definition: BundleSolutionInfo.cpp:298
Isis::IException::what
const char * what() const
Returns a string representation of this exception in its current state.
Definition: IException.cpp:375
Isis::Project
The main project for ipce.
Definition: Project.h:289
Isis::ImageList
Internalizes a list of images and allows for operations on the entire list.
Definition: ImageList.h:55
Isis::JigsawRunWidget::m_bundleSettings
BundleSettingsQsp m_bundleSettings
Definition: JigsawRunWidget.h:141
Isis::Project::images
static QStringList images(QStringList)
Verify that the input fileNames are image files.
Definition: Project.cpp:894
Isis::BundleSolutionInfo::inputControlNetFileName
QString inputControlNetFileName() const
Returns the name of the input control network.
Definition: BundleSolutionInfo.cpp:274
Isis::BundleAdjust::isAborted
bool isAborted()
Returns if the BundleAdjust has been aborted.
Definition: BundleAdjust.cpp:2959
Isis::FileName::expanded
QString expanded() const
Returns a QString of the full file name including the file path, excluding the attributes.
Definition: FileName.cpp:196
Isis::BundleSolutionInfo::bundleResults
BundleResults bundleResults()
Returns the bundle results.
Definition: BundleSolutionInfo.cpp:349
Isis::BundleAdjust::cMatrix
Table cMatrix(int index)
Return the updated instrument pointing table for the ith cube in the cube list given to the construct...
Definition: BundleAdjust.cpp:2831
Isis::Project::addBundleSolutionInfoFolder
QDir addBundleSolutionInfoFolder(QString folder)
Create and return the name of a folder for placing BundleSolutionInfo.
Definition: Project.cpp:1174
Isis::BundleSolutionInfo
Container class for BundleAdjustment results.
Definition: BundleSolutionInfo.h:159
Isis::BundleResults::outputControlNet
ControlNetQsp outputControlNet() const
Returns a shared pointer to the output control network.
Definition: BundleResults.cpp:1287
Isis::BundleSolutionInfo::runTime
QString runTime() const
Returns the run time.
Definition: BundleSolutionInfo.cpp:264
Isis::Process::SetInputCube
virtual Isis::Cube * SetInputCube(const QString &parameter, const int requirements=0)
Opens an input cube specified by the user and verifies requirements are met.
Definition: Process.cpp:136
Isis::Table
Class for storing Table blobs information.
Definition: Table.h:61
Isis::BundleResults::sigmaCoord3StatisticsRms
double sigmaCoord3StatisticsRms() const
Returns the RMS of the adjusted sigmas for coordinate 3.
Definition: BundleResults.cpp:1105
Isis::BundleSolutionInfo::setRunTime
void setRunTime(QString runTime)
Sets the run time, and the name if a name is not already set.
Definition: BundleSolutionInfo.cpp:242
Isis::Image::closeCube
void closeCube()
Cleans up the Cube pointer.
Definition: Image.cpp:307
Isis::ImageList::name
QString name() const
Get the human-readable name of this image list.
Definition: ImageList.cpp:724
Isis::JigsawRunWidget::bundleFinished
void bundleFinished(BundleSolutionInfo *bundleSolutionInfo)
This method will be called when the bundle is complete.
Definition: JigsawRunWidget.cpp:643
ImageList.h
Isis::Cube
IO Handler for Isis Cubes.
Definition: Cube.h:167
Isis::PvlContainer::name
QString name() const
Returns the container name.
Definition: PvlContainer.h:63
Isis::Image
This represents a cube in a project-based GUI interface.
Definition: Image.h:107
Isis::IException
Isis exception class.
Definition: IException.h:91
Isis::JigsawRunWidget::JigsawRunWidget
JigsawRunWidget(Project *project, QWidget *parent=0)
Constructor.
Definition: JigsawRunWidget.cpp:38
Isis::BundleResults::sigmaCoord2StatisticsRms
double sigmaCoord2StatisticsRms() const
Returns the RMS of the adjusted sigmas for coordinate 2.
Definition: BundleResults.cpp:1095
Isis::FileName::toString
QString toString() const
Returns a QString of the full file name including the file path, excluding the attributes with any Is...
Definition: FileName.cpp:515
Isis::BundleSolutionInfo::imageList
QList< ImageList * > imageList()
Returns the images used in the bundle.
Definition: BundleSolutionInfo.cpp:366
Isis::BundleAdjust::numberOfImages
int numberOfImages() const
Returns the number of images.
Definition: BundleAdjust.cpp:2793
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
Isis::Project::bundleSolutionInfo
QList< BundleSolutionInfo * > bundleSolutionInfo()
Return BundleSolutionInfo objects in Project.
Definition: Project.cpp:2223
Isis::PvlContainer::addComment
void addComment(const QString &comment)
Definition: PvlContainer.h:269
Ui
Definition: JigsawRunWidget.h:15
Isis::PvlObject::hasObject
bool hasObject(const QString &name) const
Returns a boolean value based on whether the object exists in the current PvlObject or not.
Definition: PvlObject.h:323
Isis::BundleSolutionInfo::outputText
bool outputText()
Outputs a text file with the results of the BundleAdjust.
Definition: BundleSolutionInfo.cpp:1201
IException.h
BundleAdjust.h
QThread
Isis::PvlObject::deleteObject
void deleteObject(const QString &name)
Remove an object from the current PvlObject.
Definition: PvlObject.cpp:366
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::Cube::label
Pvl * label() const
Returns a pointer to the IsisLabel object associated with the cube.
Definition: Cube.cpp:1701
Isis::Cube::write
void write(Blob &blob, bool overwrite=true)
This method will write a blob of data (e.g.
Definition: Cube.cpp:971
Isis::JigsawRunWidget
This dialog allows the user to select the bundle adjust parameters, run the bundle,...
Definition: JigsawRunWidget.h:109
Control.h
Isis::JigsawRunWidget::m_project
Project * m_project
Definition: JigsawRunWidget.h:137
Isis::JigsawRunWidget::m_selectedControl
Control * m_selectedControl
Definition: JigsawRunWidget.h:138
iTime.h
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
BundleSolutionInfo.h
QDockWidget
Isis::JigsawRunWidget::init
void init()
Constructor delegate.
Definition: JigsawRunWidget.cpp:78
Isis::Project::bundleSolutionInfoRoot
static QString bundleSolutionInfoRoot(QString projectRoot)
Appends the root directory name 'bundle' to the project results directory.
Definition: Project.cpp:2233
Isis::Project::setClean
void setClean(bool value)
Function to change the clean state of the project.
Definition: Project.cpp:1595
Isis::Cube::relocateDnData
void relocateDnData(FileName dnDataFile)
Relocates the DN data for a cube to an external cube label file.
Definition: Cube.cpp:1366
Isis::BundleSolutionInfo::bundleSettings
BundleSettingsQsp bundleSettings()
Returns bundle settings.
Definition: BundleSolutionInfo.cpp:337
Isis::FileName::path
QString path() const
Returns the path of the file name.
Definition: FileName.cpp:103
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
Isis::BundleSolutionInfo::outputResiduals
bool outputResiduals()
Outputs image coordinate residuals to a csv file.
Definition: BundleSolutionInfo.cpp:1517
Isis::Control::fileName
QString fileName() const
Access the name of the control network file associated with this Control.
Definition: Control.cpp:272