Commit a695d8fb authored by Kim Oyama's avatar Kim Oyama
Browse files

In mask, made default MASK parameter work when FROM cube has multiple bands....

In mask, made default MASK parameter work when FROM cube has multiple bands. Updated Documentation. Added examples. Fixes #1871.

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/trunk@5736 41f8697f-d340-4b68-9986-7bafba869bb8
parent 31e53880
Loading
Loading
Loading
Loading
+131 KiB
Loading image diff...
+157 KiB
Loading image diff...
+154 KiB
Loading image diff...
+138 KiB
Loading image diff...
+14 −3
Original line number Diff line number Diff line
#include "Isis.h"

#include <QDebug>

#include "ProcessByLine.h"
#include "SpecialPixel.h"
#include "IException.h"
@@ -24,11 +27,19 @@ void IsisMain() {
  // Setup the input and output cubes
  UserInterface &ui = Application::GetUserInterface();

  if(!ui.WasEntered("MASK"))
    ui.PutAsString("MASK", ui.GetAsString("FROM"));

  p.SetInputCube("FROM");
  if(!ui.WasEntered("MASK")) {
    p.SetInputCube("FROM");
  }
  else {
    try {
      p.SetInputCube("MASK", OneBand);
    }
    catch (IException &e) {
      QString msg = "The MASK input must be a single band.";
      throw IException(e, IException::User, msg, _FILEINFO_);
    }
  }
  p.SetOutputCube("TO");

  //  Get min/max info
Loading