Unverified Commit e0801ed8 authored by Jesse Mapel's avatar Jesse Mapel Committed by GitHub
Browse files

Merge pull request #286 from kberryUSGS/ipceCnetHealth

Updated ControlNet and ControlNetVitals to fix problem with numImages…
parents c27fb8d1 68238c98
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1381,8 +1381,12 @@ namespace Isis {
   *                         returning a count of only valid measures (Ignore=False).
   */
  int ControlNet::GetNumberOfValidMeasuresInImage(const QString &serialNumber) {
    // If SetImage was called, use the map that has been populated with valid measures
    if (p_cameraList.size() > 0) {
      return p_cameraValidMeasuresMap[serialNumber];
    }
    return GetValidMeasuresInCube(serialNumber).size();     
  }


  /**
+6 −3
Original line number Diff line number Diff line
@@ -224,10 +224,10 @@ namespace Isis {
   *                           image. Previously, this had to be done throug the graph.
   *   @history 2018-01-26 Kristin Berry - Added pointAdded() function to eliminate redundant measure
   *                           adds to the control network.
   *   @history 2018-01-26 Kristin Berry - Removed unused methods and associated code:
   *   @history 2018-06-10 Kristin Berry - Removed unused methods and associated code:
   *                           MinimumSpanningTree(), GetNodeConnections(), RandomBFS(), Shuffle(),
   *                           CalcBWAndCE(), CubeGraphToString(), getGraphNode(). References #5434
   *  @history 2018-01-26 Kristin Berry - Updated to use the boost graph library instead of our
   *   @history 2018-06-10 Kristin Berry - Updated to use the boost graph library instead of our
   *                           custom graph structure ControlCubeGraphNode.
   *   @history 2018-04-05 Adam Goins - Added a check to the versionedReader targetRadii
   *                           group to set radii values to those ingested from the versioner
@@ -245,7 +245,10 @@ namespace Isis {
   *                           These signals exist for the purpose of communication between the
   *                           ControlNetVitals class, and the network that it is observing.
   *                           Fixes #5435.

   *  @history 2018-06-25 Kristin Berry - Updated GetNumberOfValidMeasuresInImage() to use
   *                           GetValidMeasuresInCube() if SetImage has not yet been called to populate
   *                           the p_cameraValidMeasuresMap.
   *
   */
  class ControlNet : public QObject {
      Q_OBJECT
+9 −4
Original line number Diff line number Diff line
@@ -610,11 +610,14 @@ namespace Isis {
   */
  int ControlNetVitals::numImagesBelowMeasureThreshold(int num) {
    int count = 0;
    foreach(int measureCount, m_imageMeasureCounts) {
      if (measureCount > num) {

    QMap<int, int>::const_iterator i = m_imageMeasureCounts.constBegin();
    while (i != m_imageMeasureCounts.constEnd()) {
      if (i.key() >= num ) {
        break;
      }
      count += m_imageMeasureCounts[measureCount];
      count += i.value();
      ++i;
    }
    return count;
  }
@@ -753,7 +756,9 @@ namespace Isis {
  QList<QString> ControlNetVitals::getImagesBelowMeasureThreshold(int num) {
    QList<QString> imagesBelowThreshold;
    foreach(QString serial, m_controlNet->GetCubeSerials()) {
      if (m_controlNet->GetMeasuresInCube(serial).size() < num) imagesBelowThreshold.append(serial);
      if (m_controlNet->GetValidMeasuresInCube(serial).size() < num) {
        imagesBelowThreshold.append(serial);
      }
    }
    return imagesBelowThreshold;
  }
+1 −0
Original line number Diff line number Diff line
@@ -56,6 +56,7 @@ namespace Isis {
  *    @history 2018-05-28 Adam Goins - Initial Creation.
  *    @history 2018-06-14 Adam Goins & Jesse Maple - Refactored method calls and Signal/Slot usage.
  *    @history 2018-06-15 Adam Goins - Added documentation.
  *    @history 2018-06-25 Kristin Berry - Fixed problem with getImagesBelowMeasureThreshold()
  */
  class ControlNetVitals : public QObject {
    Q_OBJECT
+3 −3
Original line number Diff line number Diff line
@@ -3,8 +3,8 @@ Testing Control Net Vitals
Loading Network
Calculating Network Vitals
Network ID: "LROC_NAC_LRPAIR_AUTO"
Network Status: "Healthy!"
Status Details: "This network is healthy."
Network Status: "Weak!"
Status Details: "This network has 4 image(s) with less than 3 measures\n"
Network has additional islands? no
Number of islands in network: 1
Serials in island  0
@@ -54,7 +54,7 @@ Number of free points in network: 75
Number of points without measures: 0
Number of points with less than 3 measures: 0
Number of images without measures: 0
Number of images with less than 2 measures: 0
Number of images with less than 2 measures: 1
Number of images with less 75 percent hull coverage: 0
Testing getters...

Loading