Commit efd2d04b authored by Jesse Mapel's avatar Jesse Mapel
Browse files

Removed BundleControlPointVector class. Fixes #4099.

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/branches/ipce@6901 41f8697f-d340-4b68-9986-7bafba869bb8
parent ee32779a
Loading
Loading
Loading
Loading
+15 −14
Original line number Diff line number Diff line
@@ -365,7 +365,8 @@ namespace Isis {
        if (point->IsIgnored())
          continue;

        BundleControlPoint* bundleControlPoint = m_bundleControlPoints.addControlPoint(point);
        BundleControlPointQsp bundleControlPoint(new BundleControlPoint(point));
        m_bundleControlPoints.append(bundleControlPoint);

        bundleControlPoint->setWeights(m_bundleSettings, m_dMTR);

@@ -950,7 +951,7 @@ namespace Isis {

    for (int i = 0; i < n3DPoints; i++) {

      BundleControlPoint *point = m_bundleControlPoints.at(i);
      BundleControlPointQsp point = m_bundleControlPoints.at(i);

      if (point->isRejected()) {
        nRejected3DPoints++;
@@ -1205,7 +1206,7 @@ namespace Isis {
                                          SparseBlockColumnMatrix &N12,
                                          vector<double> &n2,
                                          vector<double> &nj,
                                          BundleControlPoint *bundleControlPoint) {
                                          BundleControlPointQsp &bundleControlPoint) {

//N12.printClean(std::cout);

@@ -1423,7 +1424,7 @@ namespace Isis {
//    printf("%s", buf);

    for (int i = 0; i < n3DPoints; i++) {
      BundleControlPoint *point = m_bundleControlPoints.at(i);
      BundleControlPointQsp point = m_bundleControlPoints.at(i);

      if ( point->isRejected() ) {
        nRejected3DPoints++;
@@ -2922,7 +2923,7 @@ namespace Isis {
    int nPointIndex = 0;
    int nControlPoints = m_bundleControlPoints.size();
    for (int i = 0; i < nControlPoints; i++) {
      BundleControlPoint *point = m_bundleControlPoints.at(i);
      BundleControlPointQsp point = m_bundleControlPoints.at(i);

      if (point->isRejected()) {
          nPointIndex++;
@@ -3240,7 +3241,7 @@ namespace Isis {

    for (int i = 0; i < nObjectPoints; i++) {

      BundleControlPoint *bundleControlPoint = m_bundleControlPoints.at(i);
      BundleControlPointQsp bundleControlPoint = m_bundleControlPoints.at(i);
      ControlPoint* point = bundleControlPoint->rawControlPoint();

      point->ComputeResiduals();
@@ -3281,7 +3282,7 @@ namespace Isis {
    // add vtpv from constrained 3D points
    int nPointIndex = 0;
    for (int i = 0; i < nObjectPoints; i++) {
      BundleControlPoint *bundleControlPoint = m_bundleControlPoints.at(i);
      BundleControlPointQsp bundleControlPoint = m_bundleControlPoints.at(i);

      // get weight and correction vector for this point
      boost::numeric::ublas::bounded_vector<double, 3> weights = bundleControlPoint->weights();
@@ -3841,7 +3842,7 @@ namespace Isis {
      int nPointIndex = 0;
      for (j = 0; j < nObjectPoints; j++) {

        BundleControlPoint *point = m_bundleControlPoints.at(nPointIndex);
        BundleControlPointQsp point = m_bundleControlPoints.at(nPointIndex);
        if ( point->isRejected() )
          continue;

@@ -3926,7 +3927,7 @@ namespace Isis {
    int nPointIndex = 0;
    for (j = 0; j < nObjectPoints; j++) {

      BundleControlPoint *point = m_bundleControlPoints.at(nPointIndex);
      BundleControlPointQsp point = m_bundleControlPoints.at(nPointIndex);

      if ( point->isRejected() )
        continue;
@@ -4761,7 +4762,7 @@ namespace Isis {

    int nPoints = m_bundleControlPoints.size();
    for (int i = 0; i < nPoints; i++) {
      BundleControlPoint *bundleControlPoint = m_bundleControlPoints.at(i);
      BundleControlPointQsp bundleControlPoint = m_bundleControlPoints.at(i);

      QString pointSummaryString =
          bundleControlPoint->formatBundleOutputSummaryString(berrorProp);
@@ -4773,7 +4774,7 @@ namespace Isis {
    fp_out << buf;

    for (int i = 0; i < nPoints; i++) {
      BundleControlPoint *bundleControlPoint = m_bundleControlPoints.at(i);
      BundleControlPointQsp bundleControlPoint = m_bundleControlPoints.at(i);

      QString pointDetailString =
          bundleControlPoint->formatBundleOutputDetailString(berrorProp, m_dRTM);
@@ -4831,7 +4832,7 @@ namespace Isis {
    fp_out << buf;

    for (int i = 0; i < nPoints; i++) {
      BundleControlPoint *bundlecontrolpoint = m_bundleControlPoints.at(i);
      BundleControlPointQsp bundlecontrolpoint = m_bundleControlPoints.at(i);

      const ControlPoint *point = bundlecontrolpoint->rawControlPoint();

+6 −3
Original line number Diff line number Diff line
@@ -31,8 +31,8 @@

#include <cholmod.h>

#include "BundleControlPoint.h"
#include "BundleObservationSolveSettings.h"
#include "BundleControlPointVector.h"
#include "BundleObservationVector.h"
#include "BundleResults.h"
#include "BundleSettings.h"
@@ -193,6 +193,9 @@ namespace Isis {
   *                           the prefix can be used to specify the path of the location where the
   *                           matrix file should be written. Some improvements made to comply with
   *                           coding standards.
   *   @history 2016-07-11 Jesse Mapel - Changed m_bundleControlPoints to be a vector of
   *                           QSharedPointers to BundleControlPoints instead of a
   *                           BundleControlPointVector.  Fixes #4099.
   */
  class BundleAdjust : public QObject {
      Q_OBJECT
@@ -320,7 +323,7 @@ namespace Isis {
                                SparseBlockColumnMatrix  &N12,
                                boost::numeric::ublas::vector< double >  &n2,
                                boost::numeric::ublas::vector< double >  &nj,
                                BundleControlPoint *point);
                                BundleControlPointQsp &point);

      bool formNormals3_CHOLMOD(boost::numeric::ublas::compressed_vector< double >  &n1,
                                boost::numeric::ublas::vector< double >  &nj);
@@ -446,7 +449,7 @@ namespace Isis {
      double m_dError;                                  //!< error

      BundleObservationVector m_bundleObservations;
      BundleControlPointVector m_bundleControlPoints;
      QVector <BundleControlPointQsp> m_bundleControlPoints;
      BundleTargetBodyQsp m_bundleTargetBody;

      double m_dRTM;                                    //!< radians to meters conversion factor (body specific)
+0 −44
Original line number Diff line number Diff line
#include "BundleControlPointVector.h"

#include "BundleControlPoint.h"
#include "BundleObservationVector.h"
#include "Camera.h"
#include "ControlPoint.h"
#include "ControlMeasure.h"

#include "IException.h"


namespace Isis {

  /**
   * constructor
   */
  BundleControlPointVector::BundleControlPointVector() {
  }


  /**
   * destructor
   */
  BundleControlPointVector::~BundleControlPointVector() {
    qDeleteAll(*this);
    clear();
  }


  /**
   * add new BundleControlPoint method
   */
  BundleControlPoint *BundleControlPointVector::addControlPoint(ControlPoint *point) {

    BundleControlPoint *bundleControlPoint = new BundleControlPoint(point);

    append(bundleControlPoint);

    return bundleControlPoint;
  } 

}

+0 −56
Original line number Diff line number Diff line
#ifndef BundleControlPointVector_h
#define BundleControlPointVector_h
/**
 * @file
 * $Revision: 1.20 $
 * $Date: 2014/5/22 01:35:17 $
 *
 *   Unless noted otherwise, the portions of Isis written by the USGS are
 *   public domain. See individual third-party library and package descriptions
 *   for intellectual property information, user agreements, and related
 *   information.
 *
 *   Although Isis has been used by the USGS, no warranty, expressed or
 *   implied, is made by the USGS as to the accuracy and functioning of such
 *   software and related material nor shall the fact of distribution
 *   constitute any such warranty, and no responsibility is assumed by the
 *   USGS in connection therewith.
 *
 *   For additional information, launch
 *   $ISISROOT/doc//documents/Disclaimers/Disclaimers.html
 *   in a browser or see the Privacy &amp; Disclaimers page on the Isis website,
 *   http://isis.astrogeology.usgs.gov, and the USGS privacy and disclaimers on
 *   http://www.usgs.gov/privacy.html.
 */

//#include <QMap>
#include <QVector>

#include "BundleObservationVector.h"
#include "BundleControlPoint.h"

namespace Isis {
  class ControlPoint;
  /**
   * @author 2014-05-22 Ken Edmundson
   *
   * @internal
   *   @history 2014-05-22 Ken Edmundson - Original version.
   *   @history 2015-02-20 Jeannie Backer - Added copy constructor and
   *            assignment operator. Brought closer to ISIS coding standards.
   */

  class BundleControlPointVector : public QVector < BundleControlPoint *> {

    public:
      BundleControlPointVector();
      BundleControlPointVector(const BundleControlPointVector &src);
      ~BundleControlPointVector();

      BundleControlPointVector &operator=(const BundleControlPointVector &src);

      BundleControlPoint *addControlPoint(ControlPoint *point);
  };
}

#endif // BundleControlPointVector_h
+0 −20
Original line number Diff line number Diff line
@@ -830,26 +830,6 @@ Coordinate Value Correction Correction



XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Testing BundleControlPointVector...
FreePoint
       FreePoint           FREE    2 of 2  3.54      0.00000000      0.00000000      0.01000000             N/A             N/A             N/A

       FreePoint           FREE    2 of 2  3.54      0.00000000      0.00000000      0.01000000             N/A             N/A             N/A

FixedPoint
      FixedPoint          FIXED    0 of 0  0.00     90.00000000    180.00000000      0.01000000             N/A             N/A             N/A

      FixedPoint          FIXED    0 of 0  0.00     90.00000000    180.00000000      0.01000000             N/A             N/A             N/A

ConstrainedPoint
ConstrainedPoint    CONSTRAINED    0 of 0  0.00     32.00000000    120.00000000      1.00000000     28.65696503     36.78815890     38.45488734

ConstrainedPoint    CONSTRAINED    0 of 0  0.00     32.00000000    120.00000000      1.00000000     28.65696503     36.78815890     38.45488734


XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Loading