Commit 2fda4ac4 authored by Makayla Shepherd's avatar Makayla Shepherd
Browse files

Interestcube no longer hangs when rerunning the program after an interruption. Fixes #2124, 2125

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/trunk@6124 41f8697f-d340-4b68-9986-7bafba869bb8
parent e4c5d0ef
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -17,12 +17,21 @@ int boxcarLines, boxcarSamples;
UniversalGroundMap *unvGMap;

void IsisMain() {
  // We will be processing by line
  // We will be processing by brick
  ProcessByBrick p;
  p.SetBrickSize(1, 1, 1);
  p.SetOutputBrickSize(1, 1, 1);
  UserInterface &ui = Application::GetUserInterface();
  
  //initialize the global variables
  iop = NULL;
  boxcarLines = 0;
  boxcarSamples = 0;
  unvGMap = NULL;
  if (cube.isOpen()) {
    cube.close();
  }
  
  // Basic settings
  p.SetInputCube("FROM");
  p.SetOutputCube("TO");
@@ -40,10 +49,13 @@ void IsisMain() {
    op["DeltaSamp"] = "0";
    op["MinimumInterest"] = "0.0";
    Application::Log(op);
    
  }
  catch(IException &e) {
    cube.close();
    QString msg = "Improper format for InterestOperator PVL [" + pvl.fileName() + "]";
    throw IException(e, IException::User, msg, _FILEINFO_);
    
  }

  iop = InterestOperatorFactory::Create(pvl);
+9 −2
Original line number Diff line number Diff line
@@ -32,6 +32,10 @@
    <change name="Ian Humphrey" date="2014-06-03">
      Closed the open cube to prevent errors from running sequential data in GUI. Fixes #1002.
    </change>
    <change name="Makayla Shepherd" date="2015-02-06">
      Initialized the global variables and changed the catch in IsisMain in order to 
      close the cube before the exception is thrown. Fixes #2124, 2125.
    </change>
  </history>

  <category>
@@ -87,7 +91,7 @@
      Using interestcube with forstner operator
      </brief>
      <description>
        The use of Interst to ingest an Isis 3 cube and output a cube with interest values. 
        The use of Interest to ingest an Isis 3 cube and output a cube with interest values. 
      </description>
      <terminalInterface>
        <commandLine>
@@ -321,7 +325,10 @@
      </description>
      <terminalInterface>
        <commandLine>
	  from= ab102401.cub
	  from= ab102401.cub<change name="Makayla Shepherd" date="2015-02-06">
      Initialized the global variables and changed the catch in IsisMain in order to 
      close the cube before the exception is thrown. Fixes #2124 and #2125.
    </change>
      pvl= input.pvl
	  to= out.cub
        </commandLine>