Commit 9aea0634 authored by Tyler Wilson's avatar Tyler Wilson
Browse files

PROG: Re-committing changes to ProcessByBrick after prior bad commit. References #4698

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/trunk@7666 41f8697f-d340-4b68-9986-7bafba869bb8
parent 51c4f541
Loading
Loading
Loading
Loading
+8 −15
Original line number Diff line number Diff line
@@ -132,13 +132,8 @@ void ProcessByBrick::SetOutputRequirements(int outputRequirements) {
    *
    * @throws iException::Message
    */




    void ProcessByBrick::VerifyCubes(IOCubes cn){


      switch(cn){

           //Error check
@@ -152,7 +147,6 @@ void ProcessByBrick::SetOutputRequirements(int outputRequirements) {

                  string m = "You haven't specified an input or output cube";
                       throw IException(IException::Programmer, m, _FILEINFO_);

              }

              break;
@@ -170,8 +164,6 @@ void ProcessByBrick::SetOutputRequirements(int outputRequirements) {
                  }

              // The lines in the input and output must match


               if(InputCubes[0]->lineCount() != OutputCubes[0]->lineCount()) {
                   string m = "The number of lines in the input and output cubes ";
                   m += "must match";
@@ -201,8 +193,6 @@ void ProcessByBrick::SetOutputRequirements(int outputRequirements) {

              break;



            case InputOutputList:

              // Make sure we had an image
@@ -247,8 +237,6 @@ void ProcessByBrick::SetOutputRequirements(int outputRequirements) {
  *
  * @param nb Number of bands
  */


 void ProcessByBrick::SetBrickSize(int ns, int nl, int nb) {
    SetInputBrickSize(ns, nl, nb);
    SetOutputBrickSize(ns, nl, nb);
@@ -730,6 +718,8 @@ void ProcessByBrick::SetOutputRequirements(int outputRequirements) {

    bool haveInput;
    if (InputCubes.size() == 1) {

      SetBricks(InPlace);
      //  Make sure the brick size has been set
      if (!p_inputBrickSizeSet) {
        string m = "Use the SetBrickSize() or SetInputBrickSize() method to set"
@@ -748,6 +738,7 @@ void ProcessByBrick::SetOutputRequirements(int outputRequirements) {
          p_inputBrickLines[1], p_inputBrickBands[1], p_reverse);
    }
    else {
      SetBricks(InPlace);
      //  Make sure the brick size has been set
      if (!p_outputBrickSizeSet) {
        string m = "Use the SetBrickSize() or SetOutputBrickSize() method to "
@@ -795,7 +786,7 @@ void ProcessByBrick::SetOutputRequirements(int outputRequirements) {
      string m = "You must specify exactly one output cube";
      throw IException(IException::Programmer, m, _FILEINFO_);
    }

    SetBricks(InputOutput);
    //  Make sure the brick size has been set
    if (!p_inputBrickSizeSet || !p_outputBrickSizeSet) {
      string m = "Use the SetBrickSize(), SetInputBrickSize(), or "
@@ -887,6 +878,8 @@ void ProcessByBrick::SetOutputRequirements(int outputRequirements) {
      throw IException(IException::Programmer, m, _FILEINFO_);
    }

    SetBricks(InputOutputList);

    //  Make sure the brick size has been set
    if(!p_inputBrickSizeSet && InputCubes.size() > 0) {
      string m = "Use the SetBrickSize() or SetInputBrick() method to set the "
+3 −0
Original line number Diff line number Diff line
@@ -90,6 +90,9 @@ namespace Isis {
   *   @history 2016-04-26 Ian Humphrey - Modified BlockingReportProgress() so that it unlocks
   *                           the local QMutex before it goes out of scope (Qt5 issues a warning
   *                           if a locked QMutex is destroyed).
   *   @history 2017-05-08 Tyler Wilson - Added a call to the virtual method SetBricks inside
   *                          the functions PreProcessCubeInPlace/PreProcessCube/PreProcessCubes.
   *                          Fixes #4698.
   */
  class ProcessByBrick : public Process {
    public: