Commit cac78b76 authored by Kristin Berry's avatar Kristin Berry
Browse files

PROG: Fix ProcessImportPds change and added tests for rosvirtis2isis. References #3888

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/trunk@7725 41f8697f-d340-4b68-9986-7bafba869bb8
parent 8eebb8b2
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -728,7 +728,10 @@ namespace Isis {
      SetDataTrailerBytes(trailer); 
    }

    // Save the Data Trailer if it exists
    if (DataTrailerBytes() != 0) {
      SaveDataTrailer(); 
    }

    ProcessPixelBitandType(pdsXlater);

+10 −6
Original line number Diff line number Diff line
@@ -97,10 +97,17 @@ void IsisMain ()
  // Retrieve HK settings file and read in HK values. 
  QList<VirtisHK> hk; 

  QFile hkFile("./assets/virtis_housekeeping.txt");
  // Get the directory where the Rosetta translation tables are.
  PvlGroup dataDir (Preference::Preferences().findGroup("DataDirectory"));
  QString transDir = (QString) dataDir["Rosetta"] + "/translations/";

  FileName hkTranslationFile = transDir + "virtis_housekeeping.txt";
  QFile hkFile(hkTranslationFile.toString()); 

  if(!hkFile.open(QIODevice::ReadOnly)) {
    // Appropriate error
    QString msg = "Unable to open Virtis Housekeeping information file [" +
                 hkFile.fileName() + "]";
    throw IException(IException::Io,msg, _FILEINFO_);
  }

  QTextStream in(&hkFile);
@@ -303,9 +310,6 @@ void IsisMain ()

  outcube->write(table);

  // Get the directory where the Rosetta translation tables are.
  PvlGroup dataDir (Preference::Preferences().findGroup("DataDirectory"));
  QString transDir = (QString) dataDir["Rosetta"] + "/translations/";
  
  // Create a PVL to store the translated labels in
  Pvl outLabel;
+4 −0
Original line number Diff line number Diff line
BLANKS = "%-6s"    
LENGTH = "%-40s"

include $(ISISROOT)/make/isismake.tststree
+10 −0
Original line number Diff line number Diff line
# Test for rosvirtis2isis with normal (non-PDS-draft) input qub

APPNAME = rosvirtis2isis 
APPNAME2 = catlab

include $(ISISROOT)/make/isismake.tsts

commands:
	$(APPNAME) from=$(INPUT)/i1_00237330013.qub to=$(OUTPUT)/i1_00237330013.cub > /dev/null;
	$(APPNAME2) from=$(OUTPUT)/i1_00237330013.cub to=$(OUTPUT)/i1_00237330013.pvl > /dev/null;
+9 −0
Original line number Diff line number Diff line
APPNAME = rosvirtis2isis
APPNAME2 = catlab

include $(ISISROOT)/make/isismake.tsts

commands:
	$(APPNAME) from=$(INPUT)/i1_00237319854.qub to=$(OUTPUT)/i1_00237319854.cub > /dev/null; 
	$(APPNAME2) from=$(OUTPUT)/i1_00237319854.cub to=$(OUTPUT)/i1_00237319854.pvl > /dev/null;