Commit ede7a402 authored by Adam Goins's avatar Adam Goins
Browse files

Changed tgocassisunstitch to write all lines in a cube. Fixed a problem where...

Changed tgocassisunstitch to write all lines in a cube. Fixed a problem where the last line would be a line of null DN's.
parent 4b20e616
Loading
Loading
Loading
Loading
+26 −22
Original line number Diff line number Diff line
@@ -209,11 +209,16 @@ void IsisMain() {
 * Separates each of the framelets of the input cube into their own separate output cube.
 *
 * @param in A reference to the input Buffer to process.
 * @internal
 *   @history 2018-02-09 Adam Goins - Modified the second operand of the if() statement
 *                           from in.Line() < [...] to inLine() <= [...] to write all lines
 *                           up to and including the last line. Fixes an error where the last lines
 *                           written would be a line of null pixel DN's.
 */
void unstitchFullFrame(Buffer &in) {
  for (int i=0; i < g_frameletInfoList.size(); i++) {
    if (in.Line() >= g_frameletInfoList[i].m_startLine
        && in.Line() < (g_frameletInfoList[i].m_startLine + g_frameletInfoList[i].m_lines)) {
        && in.Line() <= (g_frameletInfoList[i].m_startLine + g_frameletInfoList[i].m_lines)) {
      int outputCubeLineNumber = (in.Line()-1) % g_frameletInfoList[i].m_startLine + 1;
      LineManager mgr(*g_outputCubes[i]);
      mgr.SetLine(outputCubeLineNumber, 1);
@@ -226,4 +231,3 @@ void unstitchFullFrame(Buffer &in) {
    }
  }
}