Commit 7ca03dff authored by Jesse Mapel's avatar Jesse Mapel
Browse files

Moved all BundleAdjust method implementation to cpp file. Fixes #4185

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/branches/ipce@7011 41f8697f-d340-4b68-9986-7bafba869bb8
parent 051036f2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -75,7 +75,7 @@ void IsisMain() {
        gp += PvlKeyword("Status","Bundle did not converge, camera pointing NOT updated");
      }
      else {
        for (int i = 0; i < bundleAdjustment->images(); i++) {
        for (int i = 0; i < bundleAdjustment->numberOfImages(); i++) {
          Process p;
          CubeAttributeInput inAtt;
          Cube *c = p.SetInputCube(bundleAdjustment->fileName(i), inAtt, ReadWrite);
+66 −0
Original line number Diff line number Diff line
@@ -3978,6 +3978,36 @@ namespace Isis {
  }
*/

  /**
   * Returns a pointer to the output control network.
   * 
   * @return @b ControlNetQsp A shared pointer to the output control network.
   */
  ControlNetQsp BundleAdjust::controlNet() {
    return m_pCnet;
  }


  /**
   * Returns a pointer to the serial number list.
   * 
   * @return @b SerialNumberList* A pointer to the serial number list.
   */
  SerialNumberList *BundleAdjust::serialNumberList() {
    return m_pSnList;
  }


  /**
   * Returns the number of images.
   * 
   * @return @b int The number of images.
   */
  int BundleAdjust::numberOfImages() const {
    return m_pSnList->size();
  }


  /**
   * Return the ith filename in the cube list file given to constructor.
   *
@@ -4000,6 +4030,26 @@ namespace Isis {
  }


  /**
   * Returns the error.
   * 
   * @return @b double The error.
   */
  double BundleAdjust::error() const {
    return m_dError;
  }


  /**
   * Returns what iteration the BundleAdjust is currently on.
   * 
   * @return @b double The current iteration number.
   */
  double BundleAdjust::iteration() const {
    return m_nIteration;
  }


  /**
   * Return a table cmatrix for the ith cube in the cube list given to the constructor.
   *
@@ -4168,11 +4218,27 @@ namespace Isis {
    return sigma;
  }
#endif
  /**
   * Returns if the BundleAdjust converged.
   * 
   * @return @b bool If the BundleAdjust converged.
   */
  bool BundleAdjust::isConverged() {
    return m_bundleResults.converged();
  }


  /**
   * Returns the iteration summary string.
   * 
   * @return @b QString the iteration summary string.
   * 
   * @see iterationSummary()
   */
  QString BundleAdjust::iterationSummaryGroup() const {
    return m_iterationSummary;
  }


  /**
   * Slot for deltack and jigsaw to output the bundle status.
+8 −12
Original line number Diff line number Diff line
@@ -216,6 +216,8 @@ namespace Isis {
   *                           only add non-ignored ControlPoints to the BundleControlPoint, and
   *                           we only add non-ignored ControlMeasures to the BundleControlPoint.
   *                           Fixes #4173, #4201.
   *   @history 2016-08-17 Jesse Mapel - Moved all method implementations to the cpp file.
   *                           Fixes #4185.
   */
  class BundleAdjust : public QObject {
      Q_OBJECT
@@ -260,25 +262,19 @@ namespace Isis {
      void             abortBundle();
///////////////////////////////////////////////////////////////////////////////////////////////////
      // accessors
      ControlNetQsp    controlNet() { return m_pCnet; } // TODO: change from pointer to const ref???
      SerialNumberList *serialNumberList() { return m_pSnList; } // TODO: move implementation to cpp per ISIS standards
      int              images() const { return m_pSnList->size(); }// TODO: move implementation to cpp per ISIS standards
      ControlNetQsp    controlNet();
      SerialNumberList *serialNumberList();
      int              numberOfImages() const;
//      int              observations() const;
      QString          fileName(int index);
      bool             isHeld(int index);
      Table            cMatrix(int index);
      Table            spVector(int index);
      double error() const { // TODO: move implementation to cpp per ISIS standards
        return m_dError;
      }
      double iteration() const { // TODO: move implementation to cpp per ISIS standards
        return m_nIteration;
      }
      double           error() const;
      double           iteration() const;

      bool isConverged();
      QString iterationSummaryGroup() const {
        return m_iterationSummary;
      } // TODO: move implementation to cpp per ISIS standards
      QString iterationSummaryGroup() const;

    signals:
      void statusUpdate(QString);