Commit 80c5d719 authored by Jesse Mapel's avatar Jesse Mapel
Browse files

Merged revision 6773 from IPCE to trunk

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/trunk@6774 41f8697f-d340-4b68-9986-7bafba869bb8
parent 3c25dd7e
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -290,12 +290,12 @@ namespace Isis {

    ControlNetFileHeaderV0002 &header = fileData->GetNetworkHeader();

    header.set_networkid(p_networkId.toAscii().data());
    header.set_targetname(p_targetName.toAscii().data());
    header.set_username(p_userName.toAscii().data());
    header.set_created(p_created.toAscii().data());
    header.set_lastmodified(p_modified.toAscii().data());
    header.set_description(p_description.toAscii().data());
    header.set_networkid(p_networkId.toLatin1().data());
    header.set_targetname(p_targetName.toLatin1().data());
    header.set_username(p_userName.toLatin1().data());
    header.set_created(p_created.toLatin1().data());
    header.set_lastmodified(p_modified.toLatin1().data());
    header.set_description(p_description.toLatin1().data());

    QList< ControlPointFileEntryV0002 > &fileDataPoints =
      fileData->GetNetworkPoints();
+7 −1
Original line number Diff line number Diff line
@@ -25,8 +25,8 @@

// This is needed for the QVariant macro
#include <QMetaType>

#include <QObject> // parent class
#include <QSharedPointer>

#include <map>
#include <vector>
@@ -185,6 +185,7 @@ namespace Isis {
   *                           method to GetNumberOfValidMeasuresInImage and the private
   *                           variable p_cameraMeasuresMap to p_cameraValidMeasuresMap. References
   *                           #1603.
   *   @history 2015-09-05 Ken Edmundson - Added QSharedPointer and typedef for later use.
   *   @history 2016-02-15 Kris Becker - Added feature to take ownership of
   *                           points from ControlNet. To support this option,
   *                           added clear() and take() methods.
@@ -194,8 +195,10 @@ namespace Isis {
   *                           now set to Isis:Null. Added SetTarget(Pvl), SetTarget(ControlNet),
   *                           and SetTarget(QString, vector) methods to attempt to read radii from
   *                           various sources, if not found using the TargetName. References #3892
   *   @history 2016-04-28 Tracie Sucharski - Updated toAscii() calls to toLatin1() for QT 5 upgrade.
   *   @history 2016-05-10 Jeannie Backer - Replaced calls to TProjection::TargetRadii() with calls
   *                           to Target::radiiGroup(). References #3934
   *   @history 2016-06-08 Jesse Mapel - Merged changes from IPCE to ISIS.  Fixes #3948.
   */
  class ControlNet : public QObject {
      Q_OBJECT
@@ -434,6 +437,9 @@ namespace Isis {
      bool p_invalid;  //!< If the Control Network is currently invalid
      bool m_ownPoints; //!< Specifies ownership of point list. True if owned by this object. 
  };

  //! This typedef is for future implementation of target body
  typedef QSharedPointer<ControlNet> ControlNetQsp;
}

//! This allows ControlNet *'s to be stored in a QVariant.
+3 −3
Original line number Diff line number Diff line
@@ -78,9 +78,9 @@ testing point deletion.................................
******* Done testing cube graph ***************


testing GetCubeSerials...
  DELTA
testing GetCubeSerials... (NOTE: unittest sorts the results)
  ALPHA
  DELTA

testing set target.................................
Set target/radii directly. Invalid radii.
@@ -365,8 +365,8 @@ Reading ControlNet from temp2.bin
Diffing temp.bin and temp2.bin
Read/Write of binary files OK.
Testing GetCubeGraphNodes
    DELTA
    ALPHA
    DELTA

Testing getGraphNode: ALPHA

+15 −4
Original line number Diff line number Diff line
@@ -278,10 +278,15 @@ int main() {

  cout << "******* Done testing cube graph ***************\n\n\n";

  cout << "testing GetCubeSerials...\n";
  cout << "testing GetCubeSerials... (NOTE: unittest sorts the results)\n";
  QList< QString > serials = net.GetCubeSerials();
  for (int i = 0; i < serials.size(); i++)
    cout << "  " << qPrintable(serials[i]) << "\n";
  
  // Let's sort the data since GetCubeSerials relies on a QHash 
  QStringList sortedSerials(serials);
  sortedSerials.sort();

  for (int i = 0; i < sortedSerials.size(); i++)
    cout << "  " << qPrintable(sortedSerials[i]) << "\n";
  cout << "\n";


@@ -529,8 +534,14 @@ int main() {
  cout << "Testing GetCubeGraphNodes\n";

  QList< ControlCubeGraphNode * > graphnodes = net.GetCubeGraphNodes();
  // Use this to sort the output
  QList<QString> sortedSNs;
  foreach ( ControlCubeGraphNode * node, graphnodes ) {
    cout << "    " << node->getSerialNumber() << "\n";
    sortedSNs.append(node->getSerialNumber());
  }
  sort(sortedSNs.begin(), sortedSNs.end());
  foreach ( QString sn, sortedSNs ) {
    cout << "    " << sn << "\n";
  }
  
  cout << "\nTesting getGraphNode: "