Commit 2c8974b4 authored by Stuart Sides's avatar Stuart Sides
Browse files

Added blank lines using the start/end/interval times. Fixes #2051

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/trunk@5912 41f8697f-d340-4b68-9986-7bafba869bb8
parent 92dc6c58
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -1314,7 +1314,7 @@ namespace Isis {
   * @throws Isis::iException::Message "Cannot read file.
   *             Position[]. Byte count[]"
   */
  void ProcessImport::ProcessBil(void funct(Isis::Buffer &out)) {
  void ProcessImport::ProcessBil(void funct(Isis::Buffer &someBuf)) {

    // Figure out the number of bytes to read for a single line
    int readBytes = Isis::SizeOf(p_pixelType);
@@ -1354,15 +1354,15 @@ namespace Isis {
      throw IException(IException::Io, msg, _FILEINFO_);
    }

    OutputCubes[0]->addCachingAlgorithm(new BoxcarCachingAlgorithm());
    
    // Construct a line buffer manager
    Isis::Buffer *out = NULL;

    if (funct != NULL) {
      out = new Isis::Buffer(p_ns, p_nl, p_nb, p_pixelType);
      out = new Isis::Brick(p_ns, p_nl, p_nb, p_ns, 1, 1, p_pixelType, true);
      ((Isis::Brick *)out)->setpos(0);
    }
    else {
      OutputCubes[0]->addCachingAlgorithm(new BoxcarCachingAlgorithm());
      out = new Isis::LineManager(*OutputCubes[0]);
    }

@@ -1459,12 +1459,12 @@ namespace Isis {
        } // End sample loop

        if (funct == NULL) {
          //Set the buffer position and write the line to the output file
          ((Isis::LineManager *)out)->SetLine((band * p_nl) + line + 1);
          OutputCubes[0]->write(*out);
        }
        else {
          funct(*out);
          (*((Isis::Brick *)out))++;
        }

        p_progress->CheckStatus();
+16 −0
Original line number Diff line number Diff line
@@ -1489,4 +1489,20 @@ namespace Isis {
    }
    return;
  }


  /**
   * Process the input file and send data to a method for specialized processing. The method is 
   * expected to write the data after it has processed it if necessary. 
   *
   * @param funct Method that accepts Isis::Buffer as an input
   *              parameter, processes the image, and has no
   *              return value.
   * @throws Isis::iException::Message "File is not a supported
   *             organization."
   */
  void ProcessImportPds::StartProcess(void funct(Isis::Buffer &out)) {
    ProcessImport::StartProcess(funct);
    return;
  }
}
+1 −0
Original line number Diff line number Diff line
@@ -243,6 +243,7 @@ namespace Isis {
      // definitions should be used.
      using ProcessImport::StartProcess;
      void StartProcess();
      void StartProcess(void funct(Isis::Buffer &out));
      void EndProcess();
      void Finalize();
    private:
+31 −1
Original line number Diff line number Diff line
@@ -184,7 +184,7 @@ namespace Isis {


  void iTime::operator +=(const double &secondsToAdd) {
    if(!IsSpecial(secondsToAdd) && !IsSpecial(p_et) && (p_et != 0.0))
    if(!IsSpecial(secondsToAdd) && !IsSpecial(p_et))
      p_et += secondsToAdd;
  }

@@ -195,6 +195,36 @@ namespace Isis {
  }




  iTime iTime::operator -(const double &secondsToSubtract) const {
    iTime tmp(*this);
    tmp -= secondsToSubtract;
    return tmp;
  }


  double iTime::operator -(const iTime &iTimeToSubtract) const {
    return p_et - iTimeToSubtract.p_et;
  }


  void iTime::operator -=(const double &secondsToSubtract) {
    if (!IsSpecial(secondsToSubtract) && !IsSpecial(p_et))
      p_et -= secondsToSubtract;
  }


  iTime operator -(const double &secondsToSubtract, iTime time) {
    time -= secondsToSubtract;
    return time;
  }






  /**
   * Returns the year portion of the time as a string
   *
+5 −0
Original line number Diff line number Diff line
@@ -105,6 +105,11 @@ namespace Isis {
      void operator +=(const double &secondsToAdd);
      friend iTime operator +(const double &secondsToAdd, iTime time);

      iTime operator -(const double &secondsToSubtract) const;
      double operator -(const iTime &iTimeToSubtract) const;
      void operator -=(const double &secondsToSubtract);
      friend iTime operator -(const double &secondsToSubtract, iTime time);

      // Return the year
      QString YearString() const;
      int Year() const;
Loading