Unverified Commit c626eb0a authored by Kristin's avatar Kristin Committed by GitHub
Browse files

Merge pull request #66 from AgoinsUSGS/tgounstitch

Changed tgocassisunstitch to write all lines in a cube.
parents ece8b2a2 ede7a402
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) {
    }
  }
}