Commit 52736237 authored by Kaitlyn Lee's avatar Kaitlyn Lee
Browse files

Removed changes from other branches.

parent 090c8541
Loading
Loading
Loading
Loading
+12 −20
Original line number Diff line number Diff line
@@ -13,12 +13,7 @@ void IsisMain() {
  ProcessImport p;
  IString from = ui.GetFileName("FROM");
  EndianSwapper swp("MSB");
  int nsamples = 0;
  int nlines = 0;
  int nbands = 1;
  int noffset = 0;
  int bittype = 0;
  int nbytes = 0;
  int nsamples = 0, nlines = 0, nbands = 1, noffset = 0, bittype = 0, nbytes = 0;

  union {
    char readChars[4];
@@ -46,8 +41,7 @@ void IsisMain() {
   *
   */

  // Verify that the file is a .ddd by reading in the first 4 bytes and
  // comparing the magic numbers
  // Verify the magic number
  readBytes.readLong = 0;
  fin.seekg(0);
  fin.read(readBytes.readChars, 4);
@@ -58,17 +52,14 @@ void IsisMain() {
    throw IException(IException::Io, msg, _FILEINFO_);
  }

  // Read bytes 4-7 to get number of lines
  fin.read(readBytes.readChars, 4);
  readBytes.readFloat = swp.Float(readBytes.readChars);
  nlines = (int)readBytes.readLong;

  // Read bytes 8-11 to get number of bytes
  fin.read(readBytes.readChars, 4);
  readBytes.readFloat = swp.Float(readBytes.readChars);
  nbytes = (int)readBytes.readLong;

  // Read bytes 12-15 to get bittype
  fin.read(readBytes.readChars, 4);
  readBytes.readFloat = swp.Float(readBytes.readChars);

@@ -132,3 +123,4 @@ void IsisMain() {

  return;
}
+14 −10
Original line number Diff line number Diff line
@@ -34,13 +34,17 @@ void IsisMain() {
  bool WriteObservation = ui.GetBoolean("OBSERVATION");

  QString format = ui.GetString("FORMAT");
  bool pvl;
  bool pvl = true;
  if (format == "PVL") {
    pvl = true;
  }
  else {
  else if (format == "FLAT") {
    pvl = false;
  }
  else {
    QString msg = "Invalid format QString [" + format + "]";
    throw IException(IException::User, msg, _FILEINFO_);
  }

  // Extract label from cube file
  Pvl *label = cube.label();
+14 −19
Original line number Diff line number Diff line
@@ -42,11 +42,6 @@
      Added FORMAT option to choose between PVL and FLAT format. Effects output
      file only, default is still PVL.
    </change>
    <change name="Kaitlyn Lee" date="2018-01-17">
      Removed unreachable else clause that assumed more than two options are
      allowed to be entered in for the parameter FORMAT. Added test to default case
      to increase code coverage.
    </change>
  </history>

  <groups>
+4 −7
Original line number Diff line number Diff line
@@ -4,11 +4,8 @@ include $(ISISROOT)/make/isismake.tsts

commands:
	$(APPNAME) FROM=$(INPUT)/peaks.cub \
		TO=$(OUTPUT)/peaks.pvl FILE=FALSE OBSERVATION=TRUE SN=FALSE \
	TO=$(OUTPUT)/peaks.pvl FILE=TRUE OBSERVATION=TRUE \
	APPEND=false;
	$(APPNAME) FROM=$(INPUT)/peaks.cub \
		TO=$(OUTPUT)/peaks.pvl FILE=TRUE OBSERVATION=FALSE SN=TRUE \
			APPEND=TRUE;
	$(APPNAME) FROM=$(INPUT)/hirise.cub \
	TO= $(OUTPUT)/hirise.pvl FILE=TRUE OBSERVATION=TRUE \
	APPEND=false;