Commit 212dd1f6 authored by Summer Stapleton's avatar Summer Stapleton
Browse files

Added check for Isis::Null in Histogram::rangesFromNet(). Fixes #5123, #1673

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/trunk@8102 41f8697f-d340-4b68-9986-7bafba869bb8
parent 1e6ef375
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@
#include "ControlPoint.h"
#include "LineManager.h"
#include "Message.h"
#include "SpecialPixel.h"

#include <iostream>
#include <math.h>
@@ -250,8 +251,8 @@ namespace Isis {
        if (measure->IsIgnored())  continue;

        temp = (measure->*statFunc)();  //get the data using the passed ControlMeasure acessor function pointer
        if (temp > max) max = temp;
        if (temp < min) min = temp;
        if ( !IsSpecial(temp) && temp > max ) max = temp;
        if ( !IsSpecial(temp) && temp < min ) min = temp;
      }
    }

+15 −12
Original line number Diff line number Diff line
@@ -76,6 +76,9 @@ namespace Isis {
   *   @history 2017-05-19 Christopher Combs - Modified unitTest.cpp: Removed path of output file
   *                            name in output PVL to allow the test to pass when not using the
   *                            standard data areas. Fixes #4738.
   *   @history 2017-09-08 Summer Stapleton - Included test for Isis::Null being returned from
   *                            accessor method call in Histogram::rangesFromNet(). Fixes #5123,
   *                            #1673.
   */

  class Histogram : public Statistics {
+7 −1
Original line number Diff line number Diff line
@@ -762,7 +762,13 @@ namespace Isis {
  }


  //! Return Residual magnitude
  /**
   * Return Residual magnitude. Returns Isis:Null when p_lineResidual or p_sampleResidual not
   * specifically set after call to constructor. (This calculation is normally done within the
   * jigsaw app)
   * 
   * @returns (double) The residual magnitude
   */
  double ControlMeasure::GetResidualMagnitude() const {
    if(IsSpecial(p_lineResidual) || IsSpecial(p_sampleResidual))
      return Null;