Isis 3 Programmer Reference
|
This dialog allows the user to select the bundle adjust parameters, run the bundle, and view the results. More...
#include <JigsawRunWidget.h>
Classes | |
class | CopyImageToResultsFunctor |
Functor used to copy images to a specified destination directory. More... | |
Public Slots | |
void | outputBundleStatus (QString status) |
Update the label or text edit area with the most recent status update by appending to list and refreshing. More... | |
void | errorString (QString error) |
Update the label or text edit area with the error message by appending to list and refreshing. More... | |
void | reportException (QString exception) |
Update the label or text edit area with the error message by appending to list and refreshing. More... | |
void | updateIteration (int iteration) |
Update the label or text edit area with the error message by appending to list and refreshing. More... | |
void | updatePoint (int point) |
Update the label or text edit area with the error message by appending to list and refreshing. More... | |
void | updateStatus (QString status) |
Update the label or text edit area with the error message by appending to list and refreshing. More... | |
void | bundleFinished (BundleSolutionInfo *bundleSolutionInfo) |
This method will be called when the bundle is complete. More... | |
void | notifyThreadFinished () |
Notifies the widget that the bundle thread has finished. More... | |
Public Member Functions | |
JigsawRunWidget (Project *project, QWidget *parent=0) | |
Constructor. More... | |
JigsawRunWidget (Project *project, BundleSettingsQsp bundleSettings, Control *selectedControl, QString outputControlFileName, QWidget *parent=0) | |
Constructor that takes bundle settings and a selected control. More... | |
~JigsawRunWidget () | |
Destructor. More... | |
void | closeEvent (QCloseEvent *event) |
This method is called whenever the widget recieves a close request. More... | |
Protected Member Functions | |
void | init () |
Constructor delegate. More... | |
Protected Attributes | |
BundleAdjust * | m_bundleAdjust |
Project * | m_project |
Control * | m_selectedControl |
QString | m_selectedControlName |
QString | m_outputControlName |
BundleSettingsQsp | m_bundleSettings |
Private Slots | |
void | on_JigsawSetupButton_clicked () |
void | on_JigsawRunButton_clicked () |
void | on_JigsawAcceptButton_clicked () |
Accepts the bundle results and saves them to the project. More... | |
void | clearDialog () |
Resets the dialog's status widgets to their default state. More... | |
void | updateScrollBar () |
Updates the scroll bar to position to its maximum setting (the bottom). More... | |
Private Attributes | |
bool | m_bRunning |
Indicates whether or not the bundle adjust is running. More... | |
QThread * | m_bundleThread |
separate thread for running bundle adjust calculations in. More... | |
BundleSolutionInfo * | m_bundleSolutionInfo |
Captures the most recent results of a bundle. More... | |
Ui::JigsawRunWidget * | m_ui |
Reference to self's UI generated with QtDesigner. More... | |
This dialog allows the user to select the bundle adjust parameters, run the bundle, and view the results.
2014-09-18 Kimberly Oyama - Added code to thread the bundle run. It is currently commented out but it works.
2015-02-20 Jeannie Backer - Replaced BundleResults references with BundleSolutionInfo and BundleStatistics references with BundleResults due to class name changes.
2015-09-03 Jeannie Backer - Modified to create JigsawSetupDialog object using the value for the useLastSettings checkbox. When the Run button is clicked, the run time will now be used to create a uniquely named directory to contain the output files for the bundle solution.
2017-04-17 Ian Humphrey - Added second constructor that can be used when the JigsawWorkOrder initially creates a setup dialog so it can pass information to this dialog. Added init() delegate method for constructors to use to reduce code duplication. Modified notifyThreadFinished to update the Run button. References #4748.
2017-04-18 Ian Humphrey - Added members for an Accept, Reject, and Close button to determine when to save a successful bundle adjust's results to the project (or when to discard the results). Added placeholder private slots for accepting and rejecting the results. Removed default OK and Cancel buttons from UI file. Fixes #4781.
2017-04-18 Tracie Sucharski - Write the updated control net to the runtime folder under results folder. Fixes #4783.
2017-04-25 Ian Humphrey - Updated the setup clicked slot to load the current settings into the setup dialog if we are not using the last (most recent) settings in the project. Fixes #4817.
2017-04-26 Ian Humphrey - Added updateScrollBar() and clearDialog() to reduce code duplication. Modified the run clicked slot to clear the dialog display anytime that a bundle adjust is re-ran. Fixes #4808.
2017-04-27 Ian Humphrey - Modified to track the last used control net to properly update the jigsaw setup dialog's cnet combo box. References #4817.
2017-05-04 Ian Humphrey & Makayla Shepherd - Updated acceptBundleResults() to concurrently save the bundled images (ecub's) to the project. Fixes #4804, #4837.
2017-05-04 Ian Humphrey & Makayla Shepherd - Removed connection handling deleting the bundle adjust later. This prevents a segfault from occuring when the bundle adjust was accessed in the acceptBundleResults() slot, Since its memory may have been deleted by then. Now manually managing the memory for m_bundleAdjust. Fixes #4849.
2017-05-15 Tracie Sucharski - Commented out code in acceptBundleResults which was not being used and causing compile warnings. Add creation of BundleSolutionInfo folder to the acceptBundleResults method.
2017-05-16 Tracie Sucharski - Disable Close button if jigsaw has been run, force selection of accept or reject. Once a choice has been made, re-enable the Close button.
2017-06-14 Ken Edmundson - Write text summary file.
2017-07-27 Cole Neubauer - Added a project->setClean call if the bundle results are accepted. Fixes #4960
2017-11-01 Ian Humphrey - Create ecubs in the bundle results directory which contain updated SPICE. Fixes #4804, #4849.
2018-03-22 Ken Edmundson - Added member variable QString m_outputControlName. Added argument QString outputControlFileName to constructor. Modified acceptBundleResults method to take output control network filename from the JigsawSetupDialog.
2018-05-22 Ken Edmundson - Modified init() method to not set m_BundleSolutionInfo to NULL because JigsawDialog no longer owns it. Modified destructor to not delete m_BundleSolutionInfo or set it to NULL. Note this is NOT ideal, m_BundleSolutionInfo should be a QSharedPointer, not a raw pointer.
2018-05-31 Christopher Combs - Name changed from JigsawDialog to JigsawRunWidget. Now inherits from QFrame instead of QDialog. Added support for new workflow in which JigsawSetupDialog is only ever called from a button on this widget. Fixes #5428.
2018-06-14 Christopher Combs - Made changes according to new design mockup. Added status bar, control net info, and rms adj point sigmas sections. Removed buttons for close and reject. Now inherits from QDockWidget instead of QFrame, and handles close event if a bundle is running.
2018-06-15 Christopher Combs - Implemented "Write detached labels" checkbox. made changes to on_JigsawAcceptButton_clicked to reflect this.
2018-07-26 Tracie Sucharski - Reformated the widget to get rid of fixed sizes and use layouts to handle sizing instead. Also put entire widget in a scrolled area.
Definition at line 109 of file JigsawRunWidget.h.
Constructor.
Creates a widget for running a jigsaw (bundle adjustment) and changing the solve settings.
Project | *project Pointer to the project this widget belongs to. |
QWidget | *parent Pointer to parent widget. |
Definition at line 38 of file JigsawRunWidget.cpp.
References init(), and m_bundleThread.
|
explicit |
Constructor that takes bundle settings and a selected control.
Creates a widget after the jigsaw solve settings have been set up and a control has been selected.
Project | *project Pointer to the project this widget belongs to. |
BundleSettingsQsp | bundleSettings Settings to give to this widget to use for a jigsaw. |
Control | *selectedControl Pointer to the selected control to adjust. |
QWidget | *parent Pointer to the parent widget. |
Definition at line 57 of file JigsawRunWidget.cpp.
References Isis::Control::fileName(), init(), and m_bundleThread.
Isis::JigsawRunWidget::~JigsawRunWidget | ( | ) |
Destructor.
Definition at line 110 of file JigsawRunWidget.cpp.
References m_bundleThread, and m_ui.
|
slot |
This method will be called when the bundle is complete.
This method will only be used when the bundle is threaded. It can be used when the bundle is not threaded but we don't need it because we have solveCholeskyBR().
bundleSolutionInfo | The results of the bundle run. |
Definition at line 643 of file JigsawRunWidget.cpp.
References Isis::iTime::CurrentLocalTime(), m_bundleSolutionInfo, m_ui, and Isis::BundleSolutionInfo::setRunTime().
|
privateslot |
Resets the dialog's status widgets to their default state.
This will clear the status text, reset the lcd displays to 0, and update the scroll on the scroll bar. This does NOT affect the state of the buttons.
Definition at line 477 of file JigsawRunWidget.cpp.
References m_ui, and updateScrollBar().
void Isis::JigsawRunWidget::closeEvent | ( | QCloseEvent * | event | ) |
This method is called whenever the widget recieves a close request.
If a bundle is running, the user will be asked if they want to abort the bundle. In this case, the bundle thread must be scheduled to delete when it has finished aborting. Otherwise, the event will accept.
event | The close event being handled. |
Definition at line 660 of file JigsawRunWidget.cpp.
References Isis::BundleAdjust::abortBundle(), m_bRunning, and m_bundleThread.
|
slot |
Update the label or text edit area with the error message by appending to list and refreshing.
error | Error status of bundle. |
Definition at line 526 of file JigsawRunWidget.cpp.
References m_ui, and updateScrollBar().
|
protected |
Constructor delegate.
Delegate method that helps the constructors. This is used to reduce repeated code.
Definition at line 78 of file JigsawRunWidget.cpp.
References Isis::Project::bundleSolutionInfo(), m_bRunning, and m_ui.
Referenced by JigsawRunWidget().
|
slot |
Notifies the widget that the bundle thread has finished.
This slot is used to notify the widget that the bundle has finished. The bundle thread finishes when the bundle adjust finishes (either successfully or unsuccessfully, or if the user aborts the run).
Definition at line 591 of file JigsawRunWidget.cpp.
References Isis::BundleSolutionInfo::bundleResults(), Isis::BundleAdjust::isAborted(), m_bRunning, m_bundleSolutionInfo, m_ui, Isis::BundleResults::sigmaCoord1StatisticsRms(), Isis::BundleResults::sigmaCoord2StatisticsRms(), Isis::BundleResults::sigmaCoord3StatisticsRms(), and updateScrollBar().
|
privateslot |
Accepts the bundle results and saves them to the project.
The "Accept" button will be disabled.
Definition at line 277 of file JigsawRunWidget.cpp.
References Isis::BundleSolutionInfo::addAdjustedImages(), Isis::Project::addBundleSolutionInfo(), Isis::Project::addBundleSolutionInfoFolder(), Isis::ImageList::append(), Isis::BundleSolutionInfo::bundleResults(), Isis::BundleSolutionInfo::bundleSettings(), Isis::Project::bundleSolutionInfoRoot(), Isis::Image::closeCube(), Isis::BundleAdjust::cMatrix(), Isis::PvlObject::deleteObject(), Isis::FileName::expanded(), Isis::Image::fileName(), Isis::PvlObject::hasObject(), Isis::BundleSolutionInfo::imageList(), Isis::BundleSolutionInfo::inputControlNetFileName(), Isis::Blob::Label(), Isis::Cube::label(), m_bundleSolutionInfo, m_ui, Isis::PvlContainer::name(), Isis::ImageList::name(), Isis::PvlObject::object(), Isis::PvlObject::objects(), Isis::BundleResults::outputControlNet(), Isis::BundleSolutionInfo::outputImagesCSV(), Isis::BundleSolutionInfo::outputPointsCSV(), Isis::BundleSolutionInfo::outputResiduals(), Isis::BundleSolutionInfo::outputText(), Isis::ImageList::path(), Isis::BundleSolutionInfo::runTime(), Isis::Project::setClean(), Isis::Process::SetInputCube(), Isis::BundleSolutionInfo::setOutputControl(), Isis::BundleAdjust::spVector(), Isis::FileName::toString(), and Isis::Cube::write().
|
slot |
Update the label or text edit area with the most recent status update by appending to list and refreshing.
status | Current status of bundle. |
Definition at line 510 of file JigsawRunWidget.cpp.
References m_ui, and updateScrollBar().
|
slot |
Update the label or text edit area with the error message by appending to list and refreshing.
error | Error status of bundle. |
Definition at line 541 of file JigsawRunWidget.cpp.
References m_ui, and updateScrollBar().
|
slot |
Update the label or text edit area with the error message by appending to list and refreshing.
error | Error status of bundle. |
Definition at line 556 of file JigsawRunWidget.cpp.
References m_ui.
|
slot |
Update the label or text edit area with the error message by appending to list and refreshing.
error | Error status of bundle. |
Definition at line 567 of file JigsawRunWidget.cpp.
References m_ui.
|
privateslot |
Updates the scroll bar to position to its maximum setting (the bottom).
Definition at line 498 of file JigsawRunWidget.cpp.
References m_ui.
Referenced by clearDialog(), errorString(), notifyThreadFinished(), outputBundleStatus(), and reportException().
|
slot |
Update the label or text edit area with the error message by appending to list and refreshing.
error | Error status of bundle. |
Definition at line 578 of file JigsawRunWidget.cpp.
References m_ui.
|
private |
Indicates whether or not the bundle adjust is running.
Definition at line 144 of file JigsawRunWidget.h.
Referenced by closeEvent(), init(), and notifyThreadFinished().
|
private |
Captures the most recent results of a bundle.
JigsawRunWidget owns this pointer.
Definition at line 175 of file JigsawRunWidget.h.
Referenced by bundleFinished(), notifyThreadFinished(), and on_JigsawAcceptButton_clicked().
|
private |
separate thread for running bundle adjust calculations in.
Definition at line 145 of file JigsawRunWidget.h.
Referenced by closeEvent(), JigsawRunWidget(), and ~JigsawRunWidget().
|
private |
Reference to self's UI generated with QtDesigner.
Definition at line 177 of file JigsawRunWidget.h.
Referenced by bundleFinished(), clearDialog(), errorString(), init(), notifyThreadFinished(), on_JigsawAcceptButton_clicked(), outputBundleStatus(), reportException(), updateIteration(), updatePoint(), updateScrollBar(), updateStatus(), and ~JigsawRunWidget().