Unverified Commit 5d216f70 authored by jcwbacker's avatar jcwbacker Committed by GitHub
Browse files

Merge pull request #189 from USGS-Astrogeology/ipce

Merge ipce branch into dev, Fixes #5423
parents dbffb2d9 f4a8589e
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -267,12 +267,12 @@ void IsisMain() {
      QObject::connect( bundleAdjust, SIGNAL( statusUpdate(QString) ),
                        bundleAdjust, SLOT( outputBundleStatus(QString) ) );

      BundleSolutionInfo bundleSolution = bundleAdjust->solveCholeskyBR();
      BundleSolutionInfo *bundleSolution = bundleAdjust->solveCholeskyBR();


      // Output bundle adjust files
      bundleSolution.outputText();
      bundleSolution.outputResiduals();
      bundleSolution->outputText();
      bundleSolution->outputResiduals();

      Table cmatrix = bundleAdjust->cMatrix(0);

@@ -285,6 +285,9 @@ void IsisMain() {
      //cmatrix.Label().findObject("Table",Pvl::Traverse).addKeyword(description);

      c.write(cmatrix);
      
      delete bundleAdjust;
      delete bundleSolution;
    }

    // Now do final clean up as the update was successful if we reach here...
+5 −1
Original line number Diff line number Diff line
@@ -190,7 +190,11 @@
      method to apply. The default is METHOD=BUNDLE which chooses pre-existing 
      behavor. Updated documentation to reflect these new changes. Fixes #4868. 
    </change>
    
    <change name="Ken Edmundson" date="2018-05-23">
      Modifed call to bundleAdjustment->solveCholeskyBR() to return a raw pointer to a
      BundleSolutionInfo object. Am also deleting this pointer because jigsaw.cpp takes
      ownership from BundleAdjust.
    </change>    
  </history>

  <groups>
+6 −5
Original line number Diff line number Diff line
@@ -80,24 +80,24 @@ void IsisMain() {

    QObject::connect( bundleAdjustment, SIGNAL( statusUpdate(QString) ),
                      bundleAdjustment, SLOT( outputBundleStatus(QString) ) );
    BundleSolutionInfo bundleSolution = bundleAdjustment->solveCholeskyBR();
    BundleSolutionInfo *bundleSolution = bundleAdjustment->solveCholeskyBR();
    
    cout << "\nGenerating report files\n" << endl;

    // write output files
    if (ui.GetBoolean("BUNDLEOUT_TXT")) {
      bundleSolution.outputText();
      bundleSolution->outputText();
    }

    if (ui.GetBoolean("IMAGESCSV")) {
      bundleSolution.outputImagesCSV();
      bundleSolution->outputImagesCSV();
    }

    if (ui.GetBoolean("OUTPUT_CSV")) {
      bundleSolution.outputPointsCSV();
      bundleSolution->outputPointsCSV();
    }
    if (ui.GetBoolean("RESIDUALS_CSV")) {
      bundleSolution.outputResiduals();
      bundleSolution->outputResiduals();
    }
    
    // write updated control net
@@ -147,6 +147,7 @@ void IsisMain() {
      gp += PvlKeyword("Status", "Camera pointing NOT updated");
    }
    Application::Log(gp);
    delete bundleSolution;
  }
  catch(IException &e) {
    bundleAdjustment->controlNet()->Write(ui.GetFileName("ONET"));
+5 −0
Original line number Diff line number Diff line
@@ -252,6 +252,11 @@
    <change name="Summer Stapleton" date="2017-08-09">
      Fixed bug where an invalid control net was not throwing exception. Fixes #5068.
    </change>
    <change name="Ken Edmundson" date="2018-05-23">
      Modifed call to bundleAdjustment->solveCholeskyBR() to return a raw pointer to a
      BundleSolutionInfo object. Am also deleting this pointer because jigsaw.cpp takes
      ownership from BundleAdjust.
    </change>
  </history>

  <groups>
+13 −8
Original line number Diff line number Diff line
@@ -680,7 +680,7 @@ namespace Isis {
   *
   * @TODO make solveCholesky return a BundleSolutionInfo object and delete this placeholder ???
   */
  BundleSolutionInfo BundleAdjust::solveCholeskyBR() {
  BundleSolutionInfo* BundleAdjust::solveCholeskyBR() {
    solveCholesky();
    return bundleSolveInformation();
  }
@@ -976,8 +976,7 @@ namespace Isis {
      m_bundleResults.setObservations(m_bundleObservations);
      m_bundleResults.setBundleControlPoints(m_bundleControlPoints);

      BundleSolutionInfo *results = new BundleSolutionInfo(bundleSolveInformation());
      emit resultsReady(results);
      emit resultsReady(bundleSolveInformation());

      emit statusUpdate("\nBundle Complete");

@@ -999,12 +998,18 @@ namespace Isis {
  /**
   * Create a BundleSolutionInfo containing the settings and results from the bundle adjustment.
   *
   * @return @b BundleSolutionInfo A container with solve information from the adjustment.
   * @return @b BundleSolutionInfo A container with solve information from the adjustment. NOTE:
   *            Caller takes ownership and is responsible for memory management of returned
   *            BundleSolutionInfo raw pointer.
   *
   */
  BundleSolutionInfo BundleAdjust::bundleSolveInformation() {
    BundleSolutionInfo results(m_bundleSettings, FileName(m_cnetFileName), m_bundleResults, imageLists());
    results.setRunTime("");
    return results;
  BundleSolutionInfo *BundleAdjust::bundleSolveInformation() {
    BundleSolutionInfo *bundleSolutionInfo = new BundleSolutionInfo(m_bundleSettings,
                                                                    FileName(m_cnetFileName),
                                                                    m_bundleResults,
                                                                    imageLists());
    bundleSolutionInfo->setRunTime("");
    return bundleSolutionInfo;
  }


Loading