Commit 3d9f8ef1 authored by Kim Oyama's avatar Kim Oyama
Browse files

In ImageImporter, added the history label to the output cube. In std2isis,...

In ImageImporter, added the history label to the output cube. In std2isis, updated the default app test to make sure the history group is in the resulting cube label. Fixes #1894.

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/trunk@5704 41f8697f-d340-4b68-9986-7bafba869bb8
parent d39de602
Loading
Loading
Loading
Loading
+4 −0
Changes for isis/src/base/apps/std2isis/std2isis.xml: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -37,6 +37,10 @@
    <change name="Janet Barrett" date="2010-01-24">
      Added support for JPEG2000 files.
    </change>
    <change name="Kimberly Oyama" date="2014-01-17">
      Updated the default app test to make sure the history group is in the resulting cube label.
      References #1894.
    </change>
  </history>

  <category>
+1 −0
Changes for isis/src/base/apps/std2isis/tsts/default/Makefile: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -5,3 +5,4 @@ include $(ISISROOT)/make/isismake.tsts
commands:
	$(APPNAME) FROM=$(INPUT)/in.png TO=$(OUTPUT)/out.cub \
	> /dev/null;
	catlab from=$(OUTPUT)/out.cub > $(OUTPUT)/outLabel.pvl;
+13 −1
Changes for isis/src/base/objs/ImageImporter/ImageImporter.cpp: 13 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@
#include "Buffer.h"
#include "CubeAttribute.h"
#include "FileName.h"
#include "History.h"
#include "JP2Decoder.h"
#include "JP2Importer.h"
#include "ProcessByLine.h"
@@ -129,7 +130,18 @@ namespace Isis {
          _FILEINFO_);
    }
    bandBin += name;
    label->addGroup(bandBin);
    label->findObject("IsisCube").addGroup(bandBin);
    
    History hist = History("IsisCube");
    try {
      // read history from cube, if it exists.
      cube->read(hist);
    }
    catch(IException &e) {
      // If the cube doesn't have a history, std2isis will add the first entry.
    }
    hist.AddEntry();
    cube->write(hist);
  
    p.SetInputCube(cube);
    p.SetProcessingDirection(ProcessByBrick::BandsFirst);
+1 −0
Changes for isis/src/base/objs/ImageImporter/ImageImporter.h: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ namespace Isis {
   *
   * @internal
   *   @history 2012-03-28 Travis Addair - Added documentation.
   *   @history 2014-01-17 Kimberly Oyama - Added the history label to the output cube. Fixes #1894.
   *
   */
  class ImageImporter {