Commit 45d7f5f1 authored by Kristin Berry's avatar Kristin Berry
Browse files

Fixed numPointsBelowMeasureThreshold() to return the correct value

parent 68238c98
Loading
Loading
Loading
Loading
+13 −9
Original line number Diff line number Diff line
@@ -568,15 +568,19 @@ namespace Isis {
   *  @return The number of points with number of measures less than the threshold.
   */
  int ControlNetVitals::numPointsBelowMeasureThreshold(int num) {
    // int count = 0;
    // foreach(int measureCount, m_pointMeasureCounts) {
    //   if (measureCount >= num) {
    //     continue;
    //   }
    //   count += m_pointMeasureCounts[measureCount];
    // }
    // return count;
    return getPointsBelowMeasureThreshold(num).size();
    int count = 0;

    QMap<int, int>::const_iterator i = m_pointMeasureCounts.constBegin();
    while (i != m_pointMeasureCounts.constEnd()) {
      if (i.key() >= num ) {
        break;
      }
      count += i.value();
      ++i;
    }

    return count;
    //return getPointsBelowMeasureThreshold(num).size();
  }


+3 −1
Original line number Diff line number Diff line
@@ -56,7 +56,9 @@ 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()
  *    @history 2018-06-25 Kristin Berry - Fixed problem with getImagesBelowMeasureThreshold().size()
  *                           not matching numImagesBelowMeasureThreshold(). Fixed a similar
  *                           problem with numPointsBelowMeasureThreshold(). 
  */
  class ControlNetVitals : public QObject {
    Q_OBJECT