Commit 74e62307 authored by Tyler Wilson's avatar Tyler Wilson
Browse files

Overloaded Blobber::int2Double(int &) so it can handle unsigned as well as signed integers.

parent d9e06b14
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -241,4 +241,18 @@ namespace Isis {

  }


  double Blobber::int2ToDouble(unsigned int value) const {
    if (value == NULLUI4) return NULL8;
    else if (value == LOW_REPR_SATUI4) return LOW_REPR_SAT8;
    else if (value == LOW_INSTR_SATUI4) return LOW_INSTR_SAT8;
    else if (value == HIGH_INSTR_SATUI4) return HIGH_INSTR_SAT8;
    else if (value == HIGH_REPR_SATUI4) return HIGH_REPR_SAT8;
    else return value;

  }




}  //  end namespace Isis
+3 −0
Original line number Diff line number Diff line
@@ -108,6 +108,8 @@ namespace Isis {
   *                           coding standards. Added padding to control
   *                           statements. References #1169.
   *   @history 2017-08-30 Summer Stapleton - Updated documentation. References #4807.
   *   @history 2018-07-20 Tyler Wilson - Overloaded the int2Double function so it can handle
   *                       special pixel types for 4-byte unsigned integers.  References #971.
   */
  class Blobber {
    public:
@@ -262,6 +264,7 @@ namespace Isis {
//  Low/level I/O and conversion methods
      void loadDouble(Table &tbl);
      void loadInteger(Table &tbl);
      double int2ToDouble(unsigned int value) const;
      double int2ToDouble(int value) const;
  };
};