Commit f2619986 authored by dcookastrog's avatar dcookastrog
Browse files

Merged Astrog:dev into my devRadii clone and fixed conflict in ControlNet.h

parents 0a9d19be 5d3ac014
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
APPNAME = photomet

angleSourceDemUsedemFalse.cub.TOLERANCE = 0.0005
angleSourceDemUsedemTrue.cub.TOLERANCE = 0.0005
angleSourceDemUsedemFalse.cub.TOLERANCE = 0.001
angleSourceDemUsedemTrue.cub.TOLERANCE = 0.001

include $(ISISROOT)/make/isismake.tsts

+14 −0
Original line number Diff line number Diff line
@@ -68,6 +68,10 @@ namespace Isis {
   * @param cube The Pvl label from the cube is used to create the Camera object.
   */
  Camera::Camera(Cube &cube) : Sensor(cube) {
    
    m_instrumentId = cube.label()->findGroup("Instrument", 
                        PvlObject::FindOptions::Traverse).findKeyword("InstrumentId")[0];
    
    m_instrumentNameLong = "Unknown";
    m_instrumentNameShort = "Unknown";
    m_spacecraftNameLong = "Unknown";
@@ -2876,6 +2880,16 @@ namespace Isis {
  }
  
  
  /**
   * This method returns the InstrumentId as it appears in the cube.
   *
   * @return QString Returns m_instrumentId
   */
  QString Camera::instrumentId() {
    return m_instrumentId;
  }


  /**
   * This method returns the full instrument name.
   *
+7 −0
Original line number Diff line number Diff line
@@ -241,6 +241,9 @@ namespace Isis {
   *   @history 2017-08-30 Summer Stapleton - Updated documentation. References #4807.
   *   @history 2017-01-11 Christopher Combs - Added bool deleteExisting to SetDistortionMap to 
   *                           prevent a segfault when the distortion map is incomplete. Fixes $5163.
   *   @history 2018-07-12 Summer Stapleton - Added m_instrumentId and instrumentId() in order to 
   *                           collect the InstrumentId from the original cube label for 
   *                           comparisons related to image imports in ipce. References #5460.
   */

  class Camera : public Sensor {
@@ -329,6 +332,8 @@ namespace Isis {
      CameraGroundMap *GroundMap();
      CameraSkyMap *SkyMap();
      
      QString instrumentId();

      QString instrumentNameLong() const;
      QString instrumentNameShort() const;
      QString spacecraftNameLong() const;
@@ -497,6 +502,8 @@ namespace Isis {
      friend class RadarGroundMap;      //!< A friend class to calculate focal length
      friend class RadarSlantRangeMap;  //!< A friend class to calculate focal length
      
      QString m_instrumentId;        //!< The InstrumentId as it appears on the cube.

      QString m_instrumentNameLong;  //!< Full instrument name
      QString m_instrumentNameShort; //!< Shortened instrument name
      QString m_spacecraftNameLong;  //!< Full spacecraft name
+18 −5
Original line number Diff line number Diff line
@@ -61,7 +61,6 @@ namespace Isis {
    p_modified = Application::DateTime();
  }


  ControlNet::ControlNet(const ControlNet &other) {

    nullify();
@@ -384,7 +383,6 @@ namespace Isis {
    // Make sure there is a node for every measure
    for (int i = 0; i < point->GetNumMeasures(); i++) {
      QString sn = point->GetMeasure(i)->GetCubeSerialNumber();

      // If the graph doesn't have the sn, add a node for it
      if (!m_vertexMap.contains(sn)) {
        Image newImage;
@@ -756,7 +754,6 @@ namespace Isis {
    // Conceptually, I think this belongs in measureIgnored, but it isn't done
    // for the old graph.
    m_controlGraph[m_vertexMap[serial]].measures.remove(measure->Parent());

  }


@@ -1728,6 +1725,7 @@ namespace Isis {
  void ControlNet::swap(ControlNet &other) {
    std::swap(points, other.points);
    std::swap(pointIds, other.pointIds);
    m_controlGraph.swap(other.m_controlGraph);
    std::swap(m_mutex, other.m_mutex);
    std::swap(p_targetName, other.p_targetName);
    std::swap(p_networkId, other.p_networkId);
@@ -1740,7 +1738,7 @@ namespace Isis {
    std::swap(p_cameraRejectedMeasuresMap, other.p_cameraRejectedMeasuresMap);
    std::swap(p_cameraList, other.p_cameraList);

    // points have parent pointers that need updated too...
    // points have parent pointers that need to be updated too...
    QHashIterator< QString, ControlPoint * > i(*points);
    while (i.hasNext()) {
      i.next().value()->parentNetwork = this;
@@ -1751,8 +1749,23 @@ namespace Isis {
      i2.next().value()->parentNetwork = &other;
    }

    emit networkModified(ControlNet::Swapped);
    m_vertexMap.clear();
    VertexIterator v, vend;
    for (boost::tie(v, vend) = vertices(m_controlGraph); v != vend; ++v) {
      ImageVertex imVertex = *v;
      QString serialNum = m_controlGraph[*v].serial;
      m_vertexMap[serialNum] = imVertex;
    }

    other.m_vertexMap.clear();
    VertexIterator v2, vend2;
    for (boost::tie(v2, vend2) = vertices(other.m_controlGraph); v2 != vend2; ++v2) {
      ImageVertex imVertex = *v2;
      QString serialNum = other.m_controlGraph[*v2].serial;
      other.m_vertexMap[serialNum] = imVertex;
    }

    emit networkModified(ControlNet::Swapped);
  }


+3 −1
Original line number Diff line number Diff line
@@ -261,6 +261,7 @@ namespace Isis {
   *                           SurfacePoints now use their local radii to do sigma distance
   *                           conversions instead of the target equatorial and polar radii.
   *                           Fixes #5457.
   *   @history 2018-07-22 Kristin Berry - Updated swap to include the graph and vertex map.
   */
  class ControlNet : public QObject {
      Q_OBJECT
@@ -437,8 +438,8 @@ namespace Isis {

      //! Used to define the edges of the graph.
      struct Connection {
        int strength;
        Connection() : strength(0) {}
        int strength;
      };

      //! Defines the graph type as an undirected graph that uses Images for verticies,
@@ -461,6 +462,7 @@ namespace Isis {

      //! Iterates over adjacent verticies
      typedef boost::graph_traits<Network>::adjacency_iterator AdjacencyIterator;
      typedef boost::graph_traits<Network>::vertex_iterator VertexIterator;

      QHash<QString, ImageVertex> m_vertexMap; //! The serial number -> vertex hash used by the graph
      Network m_controlGraph; //! The ControlNet graph
Loading