Unverified Commit de865f67 authored by Amy Stamile's avatar Amy Stamile Committed by GitHub
Browse files

Added failure for images with missing original label in caminfo (#4999)

* Added error for no OriginalLabel in caminfo

* Added changelog entry.

* Updated caminfo tests
parent 5838acbb
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -48,6 +48,7 @@ release.
- Re-added and refactored the LRO photometry application lrowacphomap to be callable for testing purposes. Issue: [#4960](https://github.com/USGS-Astrogeology/ISIS3/issues/4960), PR: [#4961](https://github.com/USGS-Astrogeology/ISIS3/pull/4961)
- Added check to determine if poles were a valid projection point in ImagePolygon when generating footprint for a map projected image. [#4390](https://github.com/USGS-Astrogeology/ISIS3/issues/4390)
- Added changes to lronaccal to use time-dependent dark files for dark correction and use of specific dark files for images with exp code of zero. Also added GTests for lronaccal and refactored code to make callable. Added 3 truth cubes to testing directory.  PR[#4520](https://github.com/USGS-Astrogeology/ISIS3/pull/4520)
- Added failure for images with missing original label in caminfo. [#4817](https://github.com/USGS-Astrogeology/ISIS3/pull/4817)

### Deprecated

+12 −5
Original line number Diff line number Diff line
@@ -80,12 +80,19 @@ namespace Isis{
      }

      // Add the orginal label blob
      if(ui.GetBoolean("ORIGINALLABEL") && incube->label()->hasObject("OriginalLabel")) {
      if(ui.GetBoolean("ORIGINALLABEL")) {
        if (incube->label()->hasObject("OriginalLabel")) {
          OriginalLabel orig = incube->readOriginalLabel();
          Pvl p = orig.ReturnLabels();
          p.setName("OriginalLabel");
          params.addObject(p);
        }
        else {
          QString msg = "Could not find OriginalLabel "
                        "in input file [" + incube->fileName() + "].";
          throw IException(IException::User, msg, _FILEINFO_);
        }
      }

      // Add the stats
      if(statistics) {
+3 −3
Original line number Diff line number Diff line
@@ -209,7 +209,7 @@ TEST_F(DefaultCube, FunctionalTestCaminfoDefault) {

    QString outFileName = tempDir.path() + "/outTemp.csv";
    QVector<QString> args = {"to="+outFileName,
        "ISISLABEL=true", "ORIGINAL=true", "STATISTICS=true", "CAMSTATS=true",
        "ISISLABEL=true", "STATISTICS=true", "CAMSTATS=true",
        "POLYGON=true", "polysinc=100", "polylinc=100"};

    UserInterface options(APP_XML, args);
@@ -367,7 +367,7 @@ TEST_F(DefaultCube, FunctionalTestCaminfoDefault) {
TEST_F(DefaultCube, FunctionalTestCaminfoPoly) {
    QString outFileName = tempDir.path() + "/outTemp.pvl";
    QVector<QString> args = {"from="+ testCube->fileName(),  "to="+outFileName,
        "ISISLABEL=false", "ORIGINAL=false", "STATISTICS=false", "CAMSTATS=false",
        "ISISLABEL=false", "STATISTICS=false", "CAMSTATS=false",
        "POLYGON=true", "inctype=vertices", "numvertices=3"};

    UserInterface options(APP_XML, args);
@@ -398,7 +398,7 @@ TEST_F(DefaultCube, FunctionalTestCaminfoPoly) {
TEST_F(DefaultCube, FunctionalTestCaminfoBoundary) {
    QString outFileName = tempDir.path() + "/outTemp.cub";
    QVector<QString> args = {"from="+ testCube->fileName(),  "to="+outFileName,
        "ISISLABEL=false", "ORIGINAL=false", "STATISTICS=true", "CAMSTATS=true",
        "ISISLABEL=false", "STATISTICS=true", "CAMSTATS=true",
        "POLYGON=true", "LINC=25", "SINC=25", "POLYSINC=100", "POLYLINC=100"};

    UserInterface options(APP_XML, args);