Isis 3 Programmer Reference
JigsawRunWidget.cpp
1 #include "JigsawRunWidget.h"
2 
3 #include <QtConcurrent>
4 #include <QCloseEvent>
5 #include <QDebug>
6 #include <QDir>
7 #include <QFuture>
8 #include <QScrollBar>
9 #include <QThread>
10 
11 #include "JigsawSetupDialog.h"
12 
13 #include "BundleAdjust.h"
14 #include "BundleSolutionInfo.h"
15 #include "Cube.h"
16 #include "Directory.h"
17 #include "FileName.h"
18 #include "IException.h"
19 #include "Image.h"
20 #include "ImageList.h"
21 #include "JigsawSetupDialog.h"
22 #include "Control.h"
23 #include "iTime.h"
24 #include "Process.h"
25 #include "Project.h"
26 #include "ui_JigsawRunWidget.h"
27 
28 namespace Isis {
29 
39  m_project = project;
40  m_selectedControl = NULL;
41  m_bundleThread = NULL;
42  init();
43  }
44 
45 
58  BundleSettingsQsp bundleSettings,
59  Control *selectedControl,
60  QString outputControlFileName,
61  QWidget *parent) : m_ui(new Ui::JigsawRunWidget) {
62 
63  m_project = project;
64  m_bundleSettings = bundleSettings;
65  m_selectedControl = selectedControl;
66  m_selectedControlName = FileName(selectedControl->fileName()).name();
67  m_outputControlName = outputControlFileName;
68  m_bundleThread = NULL;
69  init();
70  }
71 
72 
79  m_ui->setupUi(this);
80 
81  // Note: The buttons are added to the UI setup from the JigsawRunWidget.ui file.
82  // These could have been added to the UI file itself (as XML).
83 
84 
85  // After a bundle is successfully run, accept is enabled.
86  m_ui->JigsawRunButton->setEnabled(false);
87 
88  m_bundleAdjust = NULL;
89 // m_bundleSolutionInfo = NULL;
90 
91  m_bRunning = false;
92 
93  QList<BundleSolutionInfo *> bundleSolutionInfo = m_project->bundleSolutionInfo();
94  if (bundleSolutionInfo.size() <= 0) {
95  m_ui->useLastSettings->setEnabled(false);
96  }
97 
98  QString lastSettingsToolTip("Use the settings from the most recently accepted bundle adjust.");
99  QString lastSettingsWhat("When checked, the settings from the most recently accepted bundle "
100  "adjust (i.e. the most recent bundle results in the project) will be "
101  "used for running the next bundle adjust when \"Run\" is clicked.");
102  m_ui->useLastSettings->setToolTip(lastSettingsToolTip);
103  m_ui->useLastSettings->setWhatsThis(lastSettingsWhat);
104  }
105 
106 
111 // if (m_bundleSolutionInfo) {
112 // delete m_bundleSolutionInfo;
113 // m_bundleSolutionInfo = NULL;
114 // }
115  if (m_bundleAdjust) {
116  m_bundleAdjust->deleteLater();
117  m_bundleAdjust = NULL;
118  }
119  if (m_bundleThread) {
120  m_bundleThread->quit();
121  m_bundleThread->deleteLater();
122  m_bundleThread = NULL;
123  }
124  if (m_ui) {
125  delete m_ui;
126  m_ui = NULL;
127  }
128  }
129 
130 
131  void JigsawRunWidget::on_JigsawSetupButton_clicked() {
132 
133  // Each time the SetUp button is pressed, create JigsawSetupDialog object with
134  // project,
135  // useLastSettings = matches check box
136  // readOnly = false,
137  // parent = this
138  JigsawSetupDialog setupdlg(m_project,
139  m_ui->useLastSettings->isChecked(),
140  false,
141  this);
142 
143  // We want to use the current settings if not use the most recently accepted bundle settings.
144  // This allows user to click "Setup", make changes, "OK", then click "Setup", and those changes
145  // are present in the setup dialog.
146  if (m_ui->useLastSettings->isChecked() && m_project->bundleSolutionInfo().size() > 0) {
147  QList<BundleSolutionInfo *> bundleSolutionInfo = m_project->bundleSolutionInfo();
148  BundleSettingsQsp lastBundleSettings = (bundleSolutionInfo.last())->bundleSettings();
149  setupdlg.loadSettings(lastBundleSettings);
150  // We also tell the setup dialog what the last selected control is.
151  setupdlg.selectControl(m_selectedControlName);
152  }
153  else if (m_bundleSettings) {
154  setupdlg.loadSettings(m_bundleSettings);
155  // We also tell the setup dialog what the last selected control is.
156  setupdlg.selectControl(m_selectedControlName);
157  }
158 
159  if (setupdlg.exec() == QDialog::Accepted) {
160  m_selectedControlName = setupdlg.selectedControlName();
161  m_outputControlName = setupdlg.outputControlName();
162  m_selectedControl = setupdlg.selectedControl();
163  m_bundleSettings = setupdlg.bundleSettings();
164  // The settings have been modified, might be misleading to keep this check after setup.
165  m_ui->useLastSettings->setChecked(false);
166  m_ui->JigsawRunButton->setEnabled(true);
167  }
168  }
169 
170 
171  void JigsawRunWidget::on_JigsawRunButton_clicked() {
172  // Once a bundle is run, the previous results cannot be accepted or rejected.
173  m_ui->JigsawAcceptButton->setEnabled(false);
174  m_ui->statusOutputLabel->setText("Initialization");
175 
176  if (!m_bRunning) {
177  // ??? warning dialogs ???
178  if (m_selectedControl == NULL) {
179  }
180 
181  if (m_project->images().size() == 0) {
182  }
183 
184  // assume defaults or send warning???
185  if (m_bundleSettings == NULL) {
186  }
187 
188  QList<BundleSolutionInfo *> bundleSolutionInfo = m_project->bundleSolutionInfo();
189  if (m_ui->useLastSettings->isChecked() && bundleSolutionInfo.size() > 0) {
190  BundleSettingsQsp lastBundleSettings = (bundleSolutionInfo.last())->bundleSettings();
191 
192  if (lastBundleSettings) {
193  m_bundleSettings = lastBundleSettings;
194  }
195 
196  // Grab the control name that was used in that bundle adjustment.
197  m_selectedControlName
198  = FileName(bundleSolutionInfo.last()->inputControlNetFileName()).name();
199  }
200 
201  // Clear the dialog displays.
202  clearDialog();
203 
204  m_bundleThread = new QThread;
205 
206  // Make sure to clean up any previously run bundle adjusts.
207  if (m_bundleAdjust) {
208  delete m_bundleAdjust;
209  m_bundleAdjust = NULL;
210  }
211 
212  m_bundleAdjust = new BundleAdjust(m_bundleSettings, *m_selectedControl, m_project->images(),
213  false);
214 
215  m_bundleAdjust->moveToThread(m_bundleThread);
216 
217  // Track the status updates bundle adjust gives and update the dialog.
218  connect( m_bundleAdjust, SIGNAL( statusUpdate(QString) ),
219  this, SLOT( outputBundleStatus(QString) ) );
220 
221  // Track any errors that may occur during the bundle adjust and update the dialog.
222  connect( m_bundleAdjust, SIGNAL( error(QString) ),
223  this, SLOT( errorString(QString) ) );
224 
225  // Update the iteration dialog element when the bundle updates its iteration count.
226  connect( m_bundleAdjust, SIGNAL( iterationUpdate(int) ),
227  this, SLOT( updateIteration(int) ) );
228 
229  connect( m_bundleAdjust, SIGNAL( pointUpdate(int) ),
230  this, SLOT( updatePoint(int) ) );
231 
232  connect( m_bundleAdjust, SIGNAL( statusBarUpdate(QString) ),
233  this, SLOT( updateStatus(QString) ) );
234 
235  // When we start the bundle thread, run the bundle adjustment.
236  connect( m_bundleThread, SIGNAL( started() ),
237  m_bundleAdjust, SLOT( solveCholesky() ) );
238 
239  // When the bundle adjust says results are ready, we can allow the dialog to update the
240  // project as necessary.
241  connect( m_bundleAdjust, SIGNAL( resultsReady(BundleSolutionInfo *) ),
242  this, SLOT( bundleFinished(BundleSolutionInfo *) ) );
243 
244  // ken testing
245  // Notify the dialog that the bundle thread is finished, and update the gui elements.
246  connect( m_bundleThread, SIGNAL( finished() ),
247  this, SLOT( notifyThreadFinished() ) );
248 
249  // Tell the thread to quit (stop) when the bundle adjust finishes (successfully or not)
250  connect( m_bundleAdjust, SIGNAL( finished() ),
251  m_bundleThread, SLOT( quit() ) );
252 
253  m_ui->imagesLcdNumber->display(m_bundleAdjust->numberOfImages());
254  m_ui->pointsLcdNumber->display(m_bundleAdjust->controlNet()->GetNumPoints());
255  m_ui->measuresLcdNumber->display(m_bundleAdjust->controlNet()->GetNumMeasures());
256 
257  m_bundleThread->start();
258 
259  // change "Run" button text to "Abort" (or maybe pause)
260  m_bRunning = true;
261  m_ui->JigsawRunButton->setText("&Abort");
262  update();
263  }
264  else {
265  // Make sure to abort the bundle if it is currently running.
266  m_ui->JigsawRunButton->setText("&Aborting...");
267  m_ui->statusOutputLabel->setText("Aborting...");
268  m_bundleAdjust->abortBundle();
269  update();
270  }
271  }
272 
273 
278  m_ui->JigsawAcceptButton->setEnabled(false);
279 
280  // create bundle results folder
281  QString runTime = m_bundleSolutionInfo->runTime();
282  QDir bundleDir = m_project->addBundleSolutionInfoFolder(runTime); //???
283  // save solution information to a file
284 
285  m_bundleSolutionInfo->bundleSettings()->setOutputFilePrefix(bundleDir.absolutePath() + "/");
286 
287  // Write csv files
291 
292  // Write text summary file
294 
295  // create output control net file name
296  FileName outputControlName;
297  if (!m_outputControlName.isEmpty()) {
298  outputControlName
299  = FileName(m_project->bundleSolutionInfoRoot() + "/" + runTime + "/" +
300  m_outputControlName);
301  }
302  else {
303  outputControlName
304  = FileName(m_project->bundleSolutionInfoRoot() + "/" + runTime + "/Out-" + runTime + "-" +
306  }
307 
308  // Write output control net with correct path to results folder + runtime
309  m_bundleSolutionInfo->bundleResults().outputControlNet()->Write(outputControlName.toString());
310 
311  // create Control with output control net and add to m_bundleSolutionInfo
312  m_bundleSolutionInfo->setOutputControl(new Control(m_project, outputControlName.expanded()));
313 
314  if (m_ui->detachedLabelsCheckBox->isChecked()) {
315  // Iterate through all of the image lists (the "imports" in the project).
317  foreach (ImageList *imageList, imageLists) {
318  // Keep track of the file names of the images that were used in the bundle.
319  QStringList imagesToCopy;
320 
321  // Now, we iterate through each image in the current image list ("import"), and we determine
322  // the location of the image and where to copy it to (as an ecub).
323  foreach (Image *image, *imageList) {
324  FileName original(image->fileName());
325  // Update our list of tracked file names for the images we are going to copy.
326  imagesToCopy.append(original.expanded());
327  }
328  // Concurrently copy the bundled images as ecub's to the bundle solution info results.
329  CopyImageToResultsFunctor copyImage(m_project->bundleSolutionInfoRoot() + "/" +
330  m_bundleSolutionInfo->runTime() + "/images/" +
331  imageList->name());
332  QFuture<Cube *> copiedCubes = QtConcurrent::mapped(imagesToCopy, copyImage);
333 
334  // Prepare for our adjusted images (ecubs)
335  ImageList *adjustedImages = new ImageList(imageList->name(), imageList->path());
336 
337  // Update the adjusted images' labels
338  for (int i = 0; i < imagesToCopy.size(); i++) {
339  Cube *ecub = copiedCubes.resultAt(i);
340  if (ecub) {
341  Process propagateHistory;
342  propagateHistory.SetInputCube(ecub);
343 
344  // check for existing polygon, if exists delete it
345  if (ecub->label()->hasObject("Polygon")) {
346  ecub->label()->deleteObject("Polygon");
347  }
348 
349  // check for CameraStatistics Table, if exists, delete
350  for (int iobj = 0; iobj < ecub->label()->objects(); iobj++) {
351  PvlObject obj = ecub->label()->object(iobj);
352  if (obj.name() != "Table") continue;
353  if (obj["Name"][0] != QString("CameraStatistics")) continue;
354  ecub->label()->deleteObject(iobj);
355  break;
356  }
357 
358  // Timestamp and propagate the instrument pointing table and instrument position table
359  QString bundleTimestamp = "Jigged = " + m_bundleSolutionInfo->runTime();
360  Table cMatrix = m_bundleAdjust->cMatrix(i);
361  Table spVector = m_bundleAdjust->spVector(i);
362  cMatrix.Label().addComment(bundleTimestamp);
363  spVector.Label().addComment(bundleTimestamp);
364  ecub->write(cMatrix);
365  ecub->write(spVector);
366  // The ecub is now adjusted, add this to our list of adjusted images
367  Image *newImage = new Image(ecub);
368  adjustedImages->append(newImage);
369  newImage->closeCube();
370  }
371  }
372  // Tell the BundleSolutionInfo what the adjusted images are
373  m_bundleSolutionInfo->addAdjustedImages(adjustedImages);
374  }
375 
376  }
377 
378  // Tell the project about the BundleSolutionInfo
379  // m_project->addBundleSolutionInfo( new BundleSolutionInfo(*m_bundleSolutionInfo) );
381 
382  // Make sure that when we add our results, we let the use last settings box be checkable.
383  m_ui->useLastSettings->setEnabled(true);
384 
385  // m_ui->convergenceStatusLabel->setText("Bundle converged, camera pointing updated");
386  //This bundle was bad so we should delete all remenants.
387 
388  //TODO: delete correlation matrix cov file...
389  //TODO: delete bundle results object
390 
391 // m_ui->convergenceStatusLabel->setText("Bundle did not converge, camera pointing NOT updated");
392  m_project->setClean(false);
393  }
394 
395 
401  m_destinationFolder = destination;
402  }
403 
404 
409  m_destinationFolder = QDir();
410  }
411 
412 
425  try {
426  Cube *result = NULL;
427 
428  // Get the destination folder and create that path.
429  FileName destination(QFileInfo(m_destinationFolder, image.name()).absoluteFilePath());
430  m_destinationFolder.mkpath(destination.path());
431 
432  // The input FileName will be referencing an imported ecub file.
433  // Need to get the .cub file (via Cube::externalCubeFileName) to copy.
434  // This method returns whatever value is set for the ^DnFile keyword... will not contain
435  // a path if the .ecub and .cub are in the same directory.
436  Cube importCube(image, "r");
437  FileName dnCubeFileName;
438  // The .ecub's ^DnFile is cubeFileName.cub (.ecub sitting next to .cub)
439  if (importCube.externalCubeFileName().path() == ".") {
440 
441  QDir relative(m_destinationFolder.absolutePath());
442  dnCubeFileName = FileName(QDir(image.path()).canonicalPath() + "/" + importCube.externalCubeFileName().name());
443  QString s = relative.relativeFilePath(dnCubeFileName.toString());
444  // Locate the DnFile cube by using the input image's (ecub) path and the DnFile name (cub)
445  //dnCubeFileName = FileName(image.path() + "/" + importCube.externalCubeFileName().name());
446  // WHY DO WE NEED TO USE QDIR canonical path? why is the image.path relative and not abs?
447  //dnCubeFileName = FileName(s);
448  dnCubeFileName = FileName(QDir(image.path()).canonicalPath() + "/" +
449  importCube.externalCubeFileName().name());
450  Cube dnCube(dnCubeFileName, "r");
451 
452 
453  result = dnCube.copy(destination, CubeAttributeOutput("+External"));
454  result->relocateDnData(s);
455  }
456  // The .ecub's ^DnFile is an absolute path (.ecub potentially not located next to .cub)
457  else {
458  dnCubeFileName = importCube.externalCubeFileName();
459  Cube dnCube(dnCubeFileName, "r");
460  result = dnCube.copy(destination, CubeAttributeOutput("+External"));
461  }
462  return result;
463  }
464  // Error tracking should be more robust, see ImportImagesWorkOrder.
465  catch (IException &e) {
466  std::cout << "\nerror: " << e.what();
467  return NULL;
468  }
469  }
470 
471 
478  m_ui->statusUpdatesLabel->clear();
479  m_ui->iterationLcdNumber->display(0);
480  m_ui->pointLcdNumber->display(0);
481 
482  m_ui->imagesLcdNumber->display(0);
483  m_ui->pointsLcdNumber->display(0);
484  m_ui->measuresLcdNumber->display(0);
485 
486  m_ui->rmsAdjustedPointSigmasGroupBox->setEnabled(false);
487  m_ui->latitudeLcdNumber->display(0);
488  m_ui->longitudeLcdNumber->display(0);
489  m_ui->radiusLcdNumber->display(0);
490 
491  updateScrollBar();
492  }
493 
494 
499  m_ui->statusUpdateScrollArea->verticalScrollBar()->setSliderPosition(
500  m_ui->statusUpdateScrollArea->verticalScrollBar()->maximum());
501  }
502 
503 
510  void JigsawRunWidget::outputBundleStatus(QString status) {
511  QString updateStr = "\n" + status;
512 
513  m_ui->statusUpdatesLabel->setText( m_ui->statusUpdatesLabel->text().append(updateStr) );
514 
515  updateScrollBar();
516 
517  update();
518  }
519 
520 
526  void JigsawRunWidget::errorString(QString error) {
527  QString errorStr = "\n" + error;
528  m_ui->statusUpdatesLabel->setText( m_ui->statusUpdatesLabel->text().append(errorStr) );
529 
530  updateScrollBar();
531 
532  update();
533  }
534 
535 
541  void JigsawRunWidget::reportException(QString exception) {
542  QString exceptionStr = "\n" + exception;
543  m_ui->statusUpdatesLabel->setText( m_ui->statusUpdatesLabel->text().append(exceptionStr) );
544 
545  updateScrollBar();
546 
547  update();
548  }
549 
550 
556  void JigsawRunWidget::updateIteration(int iteration) {
557  m_ui->iterationLcdNumber->display(iteration);
558  update();
559  }
560 
561 
568  m_ui->pointLcdNumber->display(point);
569  update();
570  }
571 
572 
578  void JigsawRunWidget::updateStatus(QString status) {
579  m_ui->statusOutputLabel->setText(status);
580  update();
581  }
582 
583 
592  //QString str = "\nThread Finished signal received";
593  //m_ui->statusUpdatesLabel->setText( m_ui->statusUpdatesLabel->text().append(str) );
594 
595  // set Run button text back to "Run"
596  m_ui->JigsawRunButton->setText("&Run");
597 
598  if (m_bundleAdjust->isAborted()) {
599  m_ui->statusOutputLabel->setText("Aborted");
600  }
601 
602  if (m_bundleSettings->errorPropagation()) {
603  m_ui->rmsAdjustedPointSigmasGroupBox->setEnabled(true);
604  m_ui->latitudeLcdNumber->display(
606  m_ui->longitudeLcdNumber->display(
608 
609  if (m_bundleSettings->solveRadius()) {
610  m_ui->radiusLcdNumber->display(
612  m_ui->radiusLcdNumber->setEnabled(true);
613  m_ui->radiusLcdLabel->setEnabled(true);
614  }
615  else {
616  m_ui->radiusLcdNumber->setEnabled(false);
617  m_ui->radiusLcdLabel->setEnabled(false);
618  }
619 
620  }
621  else {
622  m_ui->rmsAdjustedPointSigmasGroupBox->setEnabled(false);
623  }
624 
625  // Since this slot is invoked when the thread finishes, the bundle adjustment is no longer
626  // running.
627  m_bRunning = false;
628  updateScrollBar();
629 
630  update();
631  }
632 
633 
644 
645  bundleSolutionInfo->setRunTime( Isis::iTime::CurrentLocalTime().toLatin1().data() );
646  m_bundleSolutionInfo = bundleSolutionInfo;
647 
648  // Since results are available, the user can accept (save) or reject(discard) the results.
649  m_ui->JigsawAcceptButton->setEnabled(true);
650  }
651 
652 
660  void JigsawRunWidget::closeEvent(QCloseEvent *event) {
661  if( m_bRunning ) {
662  QMessageBox::StandardButton resBtn =
663  QMessageBox::question(this,
664  "WARNING",
665  tr("You are about to abort the bundle adjustment. Are you sure?\n"),
666  QMessageBox::No | QMessageBox::Yes);
667  if (resBtn != QMessageBox::Yes) {
668  event->ignore();
669  return;
670  }
671  else if (m_bRunning) { // check m_bRunning again just in case the bundle has finished
672  // We need to wait for the bundle adjust thread to finish before deleting the
673  // JigsawRunWidget so that we dont close the widget before the thread is finished
674  connect(m_bundleThread, SIGNAL(finished()), this, SLOT(deleteLater()));
675  m_bundleAdjust->abortBundle();
676  return;
677  }
678  }
679  event->accept();
680  }
681 }
682 
PvlObject & object(const int index)
Return the object at the specified index.
Definition: PvlObject.cpp:460
This represents an ISIS control net in a project-based GUI interface.
Definition: Control.h:79
void updateStatus(QString status)
Update the label or text edit area with the error message by appending to list and refreshing...
void setRunTime(QString runTime)
Sets the run time, and the name if a name is not already set.
QString path() const
Returns the path of the file name.
Definition: FileName.cpp:119
const char * what() const
Returns a string representation of this exception in its current state.
Definition: IException.cpp:391
QString name() const
Get the human-readable name of this image list.
Definition: ImageList.cpp:724
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
Internalizes a list of images and allows for operations on the entire list.
Definition: ImageList.h:55
bool outputText()
Outputs a text file with the results of the BundleAdjust.
Functor used to copy images to a specified destination directory.
The main project for ipce.
Definition: Project.h:289
void closeEvent(QCloseEvent *event)
This method is called whenever the widget recieves a close request.
QList< ImageList * > imageList()
Returns the images used in the bundle.
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:503
File name manipulation and expansion.
Definition: FileName.h:116
Container class for BundleAdjustment results.
int objects() const
Returns the number of objects.
Definition: PvlObject.h:231
BundleSettingsQsp bundleSettings()
Returns bundle settings.
QDir m_destinationFolder
Directory to copy the image to.
double sigmaCoord1StatisticsRms() const
Returns the RMS of the adjusted sigmas for coordinate 1.
void updateIteration(int iteration)
Update the label or text edit area with the error message by appending to list and refreshing...
Table spVector(int index)
Return a table spacecraft vector for the ith cube in the cube list given to the constructor.
QThread * m_bundleThread
separate thread for running bundle adjust calculations in.
double sigmaCoord3StatisticsRms() const
Returns the RMS of the adjusted sigmas for coordinate 3.
QString name() const
Returns the name of the file excluding the path and the attributes in the file name.
Definition: FileName.cpp:178
void on_JigsawAcceptButton_clicked()
Accepts the bundle results and saves them to the project.
bool outputImagesCSV()
Outputs the bundleout_images.csv file which contains Jigsaw data about the images within each observa...
ControlNetQsp outputControlNet() const
Returns a shared pointer to the output control network.
static QStringList images(QStringList)
Verify that the input fileNames are image files.
Definition: Project.cpp:894
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:335
QString name() const
Returns the container name.
Definition: PvlContainer.h:77
void addBundleSolutionInfo(BundleSolutionInfo *bundleSolutionInfo)
Add the given BundleSolutionInfo to the current project.
Definition: Project.cpp:1194
QString runTime() const
Returns the run time.
void abortBundle()
Flag to abort when bundle is threaded.
void clearDialog()
Resets the dialog&#39;s status widgets to their default state.
double sigmaCoord2StatisticsRms() const
Returns the RMS of the adjusted sigmas for coordinate 2.
Table cMatrix(int index)
Return a table cmatrix for the ith cube in the cube list given to the constructor.
ControlNetQsp controlNet()
Returns a pointer to the output control network.
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:243
JigsawRunWidget(Project *project, QWidget *parent=0)
Constructor.
void reportException(QString exception)
Update the label or text edit area with the error message by appending to list and refreshing...
Manipulate and parse attributes of output cube filenames.
void addAdjustedImages(ImageList *images)
Adds a list of images that were adjusted (their labels were updated).
Cube * operator()(const FileName &image)
Callable operator that copies an image to the bundle solution info results.
QString expanded() const
Returns a QString of the full file name including the file path, excluding the attributes.
Definition: FileName.cpp:212
void init()
Constructor delegate.
~JigsawRunWidget()
Destructor.
This represents a cube in a project-based GUI interface.
Definition: Image.h:107
Cube * copy(FileName newFile, const CubeAttributeOutput &newFileAttributes)
Copies the cube to the new fileName.
Definition: Cube.cpp:193
QDir addBundleSolutionInfoFolder(QString folder)
Create and return the name of a folder for placing BundleSolutionInfo.
Definition: Project.cpp:1174
void setOutputControl(Control *outputControl)
Returns the name of the output control network.
bool isAborted()
Returns if the BundleAdjust has been aborted.
void updateScrollBar()
Updates the scroll bar to position to its maximum setting (the bottom).
void append(Image *const &value)
Appends an image to the image list.
Definition: ImageList.cpp:153
Ui::JigsawRunWidget * m_ui
Reference to self&#39;s UI generated with QtDesigner.
void deleteObject(const QString &name)
Remove an object from the current PvlObject.
Definition: PvlObject.cpp:337
QList< BundleSolutionInfo * > bundleSolutionInfo()
Return BundleSolutionInfo objects in Project.
Definition: Project.cpp:2223
bool outputResiduals()
Outputs image coordinate residuals to a csv file.
int numberOfImages() const
Returns the number of images.
bool m_bRunning
Indicates whether or not the bundle adjust is running.
QString toString() const
Returns a QString of the full file name including the file path, excluding the attributes with any Is...
Definition: FileName.cpp:531
Pvl * label() const
Returns a pointer to the IsisLabel object associated with the cube.
Definition: Cube.cpp:1346
Class for storing Table blobs information.
Definition: Table.h:77
QString path() const
Get the path to the images in the image list (relative to project root).
Definition: ImageList.cpp:735
void write(Blob &blob)
This method will write a blob of data (e.g.
Definition: Cube.cpp:763
BundleResults bundleResults()
Returns the bundle results.
void relocateDnData(FileName dnDataFile)
Relocates the DN data for a cube to an external cube label file.
Definition: Cube.cpp:1081
Isis exception class.
Definition: IException.h:107
BundleSolutionInfo * m_bundleSolutionInfo
Captures the most recent results of a bundle.
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
PvlObject & Label()
Accessor method that returns a PvlObject containing the Blob label.
Definition: Blob.cpp:167
static QString bundleSolutionInfoRoot(QString projectRoot)
Appends the root directory name &#39;bundle&#39; to the project results directory.
Definition: Project.cpp:2233
This dialog allows the user to select the bundle adjust parameters, run the bundle, and view the results.
void updatePoint(int point)
Update the label or text edit area with the error message by appending to list and refreshing...
QString inputControlNetFileName() const
Returns the name of the input control network.
void errorString(QString error)
Update the label or text edit area with the error message by appending to list and refreshing...
An image bundle adjustment object.
Definition: BundleAdjust.h:333
void notifyThreadFinished()
Notifies the widget that the bundle thread has finished.
void outputBundleStatus(QString status)
Update the label or text edit area with the most recent status update by appending to list and refres...
Contains Pvl Groups and Pvl Objects.
Definition: PvlObject.h:74
Base class for all cube processing derivatives.
Definition: Process.h:158
QString fileName() const
Access the name of the control network file associated with this Control.
Definition: Control.cpp:264
void bundleFinished(BundleSolutionInfo *bundleSolutionInfo)
This method will be called when the bundle is complete.
FileName externalCubeFileName() const
If this is an external cube label file, this will give you the cube dn file that this label reference...
Definition: Cube.cpp:1180
void closeCube()
Cleans up the Cube pointer.
Definition: Image.cpp:307
QString fileName() const
Get the file name of the cube that this image represents.
Definition: Image.cpp:340
CopyImageToResultsFunctor(const QDir &destination)
Constructs a image copier functor for copying images used in the bundle adjustment to the bundle solu...
bool outputPointsCSV()
Outputs point data to a csv file.
void setClean(bool value)
Function to change the clean state of the project.
Definition: Project.cpp:1595
IO Handler for Isis Cubes.
Definition: Cube.h:170