Commit b5df66b9 authored by Jeannie Backer's avatar Jeannie Backer
Browse files

Reverting to previous revision (6691) without osirisrex.

parent 0d827a2b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -176,6 +176,7 @@ Group = DataDirectory
  Near         = $ISIS3DATA/near
  NewHorizons  = $ISIS3DATA/newhorizons
  Odyssey      = $ISIS3DATA/odyssey
  OsirisRex    = $ISIS3DATA/../datalocal/osirisrex
  Rolo         = $ISIS3DATA/rolo
  Rosetta      = $ISIS3DATA/rosetta
  Smart1       = $ISIS3DATA/smart1
+80 −191
Original line number Diff line number Diff line
@@ -41,9 +41,6 @@
#include "PvlTokenizer.h"
#include "SpecialPixel.h"


//tjw
//VAX Conversion
#define EXPONENT_MASK ((char) 0x7F)


@@ -86,7 +83,6 @@ namespace Isis {
    p_saveFileTrailer = false;
    p_vax_convert = false;


    p_fileHeader = NULL;
    p_fileTrailer = NULL;
  }
@@ -123,9 +119,6 @@ namespace Isis {
    }
  }

//tjw:



  /**
   * Determines if the VAX encoded pixel value is special or not
@@ -136,12 +129,8 @@ namespace Isis {
   *         type matches that pointed to by vax.  Returns false
   *         otherwise.
   */


  bool ProcessImport::IsVAXSpecial(unsigned int *vax, VAXSpecialPixel pix) {



    unsigned int VAX_NULL = 0xFFFFFFFF;
    unsigned int VAX_MIN  = 0xFFEFFFFF;
    unsigned int VAX_LRS  = 0xFFFEFFFF;
@@ -154,65 +143,38 @@ namespace Isis {
    memcpy(&x, vax, sizeof(unsigned int));

    switch(pix) {

      case VAX_NULL4:
        n = memcmp(&VAX_NULL, &x, sizeof(unsigned int));
            if (n==0){    
                return true;

      }
        if (n == 0) return true;
        break;

      case VAX_LRS4:
        n = memcmp(&VAX_LRS, &x, sizeof(unsigned int));
            if (n==0){

                return true;
      }
        if (n == 0) return true;
        break;

      case VAX_LIS4:
        n = memcmp(&VAX_LIS, &x, sizeof(unsigned int));
            if (n==0) {

                return true;
      }
        if (n == 0) return true;
        break;

      case VAX_HIS4:
        n = memcmp(&VAX_HIS, &x, sizeof(unsigned int));
            if (n==0){

                return true;
      }
        if (n == 0) return true;
        break;

      case VAX_HRS4:
        n = memcmp(&VAX_HRS, &x, sizeof(unsigned int));
            if (n==0){

              return true;
      }
        if (n == 0) return true;
        break;

      case VAX_MIN4:
        n = memcmp(&VAX_MIN, &x, sizeof(unsigned int));
        if (n==0){

            return true;
        }
        if (n == 0) return true;
        break;

      default:
        return false;

      }

    return false;

 }

  //tjw

  /**
   * Conversion routine which translates VAX_REAL to IEEE_REAL
@@ -220,11 +182,8 @@ namespace Isis {
   * @param ibuf Memory buffer of input data to be converted
   * @return double the converted value
   */

  double ProcessImport::VAXConversion(void *ibuf) {



    float result;
    double dresult;
    bool swap_bytes = false;
@@ -236,19 +195,14 @@ namespace Isis {
    Isis::ByteOrder in_order = p_byteOrder;
    Isis::ByteOrder out_order;


    unsigned int *oli, *ili;   //4-byte buffer io ptrs
    unsigned short *osi;       //2-byte buffer io ptrs
    char *oci;                 //1-byte buffer io ptrs

    if ( Isis::IsLsb() ) {

      exp_byte  = 1;
      out_order = Isis::Lsb;

    }

       //Byte order = MSB
    else {
      exp_byte = 0;
      out_order = Isis::Msb;
@@ -256,33 +210,37 @@ namespace Isis {

    if (in_order != out_order) {
      swap_bytes =true;

    }

    oli = (unsigned int * ) ibuf;
    ili = (unsigned int * ) ibuf;

       if (IsVAXSpecial(oli,ProcessImport::VAX_NULL4) )
    if (IsVAXSpecial(oli, ProcessImport::VAX_NULL4) ) {
      return Isis::NULL8;
    }

       if (IsVAXSpecial(oli,ProcessImport::VAX_LIS4) )
    if (IsVAXSpecial(oli, ProcessImport::VAX_LIS4) ) {
      return Isis::LOW_INSTR_SAT8;
    }

       if (IsVAXSpecial(oli,ProcessImport::VAX_LRS4) )
    if (IsVAXSpecial(oli, ProcessImport::VAX_LRS4) ) {
      return Isis::LOW_REPR_SAT8;
    }

       if (IsVAXSpecial(oli,ProcessImport::VAX_HIS4) )
    if (IsVAXSpecial(oli, ProcessImport::VAX_HIS4) ) {
      return Isis::HIGH_INSTR_SAT8;
    }

       if (IsVAXSpecial(oli,ProcessImport::VAX_HRS4) )
    if (IsVAXSpecial(oli, ProcessImport::VAX_HRS4) ) {
      return Isis::HIGH_REPR_SAT8;
    }

       if (IsVAXSpecial(oli,ProcessImport::VAX_MIN4) )
    if (IsVAXSpecial(oli, ProcessImport::VAX_MIN4) ) {
      return Isis::VALID_MIN8;
    }

    //test for word swapping
    if (swap_words) {

      *oli = (*ili <<16) | (*ili >> 16);
    }

@@ -298,8 +256,9 @@ namespace Isis {
    //Isolate the exponent and do the conversion
    oci = (char *) &osi[exp_word];

       if ( (oci[exp_byte] & EXPONENT_MASK) != exp_mask)
    if ( (oci[exp_byte] & EXPONENT_MASK) != exp_mask) {
      oci[exp_byte] += exp_adjust;
    }

    result = *(float *)oli;
    dresult = static_cast<double>(result);
@@ -308,9 +267,6 @@ namespace Isis {
   }





  /**
   * Sets the pixel type of the input file.
   *
@@ -322,7 +278,8 @@ namespace Isis {
  void ProcessImport::SetPixelType(const Isis::PixelType type) {

    if ((type == Isis::Double) || (type == Isis::Real) || (type == Isis::SignedWord) ||
        (type == Isis::UnsignedWord) || (type == Isis::UnsignedByte)) {
        (type == Isis::UnsignedWord) || (type == Isis::UnsignedByte) ||
        (type == Isis::SignedInteger)) {
      p_pixelType = type;
    }
    else {
@@ -330,7 +287,7 @@ namespace Isis {
                   Isis::PixelTypeName(type) + "]";
      throw IException(IException::Programmer, msg, _FILEINFO_);
    }
  };
  }

  void ProcessImport::SetSuffixPixelType(const Isis::PixelType type) {

@@ -343,7 +300,7 @@ namespace Isis {
                   Isis::PixelTypeName(type) + "]";
      throw IException(IException::Programmer, msg, _FILEINFO_);
    }
  };
  }


  /**
@@ -360,20 +317,16 @@ namespace Isis {
   */
  void ProcessImport::SetDimensions(const int ns, const int nl, const int nb) {
    if (ns > 0 && nl > 0 && nb > 0) {


      p_ns = ns;
      p_nl = nl;
      p_nb = nb;


    }
    else {
      QString msg = "Illegal dimension [" + toString(ns) + ", " +
                   toString(nl) + ", " + toString(nb) + "]";
      throw IException(IException::Programmer, msg, _FILEINFO_);
    }
  };
  }


  /**
@@ -384,7 +337,7 @@ namespace Isis {
   */
  void ProcessImport::SetByteOrder(const Isis::ByteOrder order) {
    p_byteOrder = order;
  };
  }


  /**
@@ -410,13 +363,12 @@ namespace Isis {
  void ProcessImport::SetFileHeaderBytes(const int bytes) {
    if (bytes >= 0) {
      p_fileHeaderBytes = bytes;

    }
    else {
      QString msg = "Illegal file header size [" + toString(bytes) + "]";
      throw IException(IException::Programmer, msg, _FILEINFO_);
    }
  };
  }


  /**
@@ -446,7 +398,7 @@ namespace Isis {
      QString msg = "Illegal file trailer size [" + toString(bytes) + "]";
      throw IException(IException::Programmer, msg, _FILEINFO_);
    }
  };
  }


  /**
@@ -469,26 +421,18 @@ namespace Isis {
   */
  void ProcessImport::SetDataHeaderBytes(const int bytes) {
    if (bytes >= 0) {

      p_dataHeaderBytes = bytes;

    }
    else {
      QString msg = "Illegal data header size [" + toString(bytes) + "]";
      throw IException(IException::Programmer, msg, _FILEINFO_);
    }
  };
  }


  void ProcessImport::SetSuffixOffset(int samples, int lines, int coreBands, int itemBytes) {


    p_suffixData = samples*lines*coreBands*itemBytes;




  };
  }


  /**
@@ -519,7 +463,7 @@ namespace Isis {
      QString msg = "Illegal data trailer size [" + toString(bytes) + "]";
      throw IException(IException::Programmer, msg, _FILEINFO_);
    }
  };
  }


  /**
@@ -544,13 +488,12 @@ namespace Isis {

    if (bytes >= 0) {
      p_dataPreBytes = bytes;

    }
    else {
      QString msg = "Illegal data prefix size [" + toString(bytes) + "]";
      throw IException(IException::Programmer, msg, _FILEINFO_);
    }
  };
  }


  /**
@@ -575,13 +518,12 @@ namespace Isis {

    if (bytes >= 0) {
      p_dataPostBytes = bytes;

    }
    else {
      QString msg = "Illegal data suffix size [" + toString(bytes) + "]";
      throw IException(IException::Programmer, msg, _FILEINFO_);
    }
  };
  }


  /**
@@ -608,7 +550,7 @@ namespace Isis {
      throw IException(IException::Programmer, msg, _FILEINFO_);
    }
    p_saveFileHeader = true;
  };
  }


  /**
@@ -636,7 +578,7 @@ namespace Isis {
                                _FILEINFO_);
    }
    p_saveFileTrailer = true;
  };
  }


  /**
@@ -665,7 +607,7 @@ namespace Isis {
                                _FILEINFO_);
    }
    p_saveDataHeader = true;
  };
  }


  /**
@@ -694,7 +636,7 @@ namespace Isis {
                                _FILEINFO_);
    }
    p_saveDataTrailer = true;
  };
  }


  /**
@@ -722,7 +664,7 @@ namespace Isis {
                                _FILEINFO_);
    }
    p_saveDataPre = true;
  };
  }


  /**
@@ -751,7 +693,7 @@ namespace Isis {
                                _FILEINFO_);
    }
    p_saveDataPost = true;
  };
  }


  /**
@@ -828,7 +770,7 @@ namespace Isis {
    }
    QString msg = "File header was not saved.  Use SaveFileHeader().";
    throw IException(IException::Programmer, msg, _FILEINFO_);
  };
  }


  /**
@@ -854,7 +796,7 @@ namespace Isis {
    }
    QString msg = "File trailer was not saved.  Use SaveFileTrailer()";
    throw IException(IException::Programmer, msg, _FILEINFO_);
  };
  }


  /**
@@ -882,7 +824,7 @@ namespace Isis {
    }
    QString msg = "Data header was not saved.  Use SaveDataHeader()";
    throw IException(IException::Programmer, msg, _FILEINFO_);
  };
  }


  /**
@@ -910,7 +852,7 @@ namespace Isis {
    }
    QString msg = "Data trailer was not saved.  Use SaveDataTrailer()";
    throw IException(IException::Programmer, msg, _FILEINFO_);
  };
  }


  /**
@@ -938,7 +880,7 @@ namespace Isis {
    }
    QString msg = "Data prefix was not saved.  Use SaveDataPrefix()";
    throw IException(IException::Programmer, msg, _FILEINFO_);
  };
  }


  /**
@@ -966,7 +908,7 @@ namespace Isis {
    }
    QString msg = "Data suffix was not saved.  Use SaveDataSuffix()";
    throw IException(IException::Programmer, msg, _FILEINFO_);
  };
  }


  /**
@@ -978,11 +920,9 @@ namespace Isis {
   */
  void ProcessImport::SetOrganization(const ProcessImport::Interleave org) {
    p_organization = org;

  };
  }


  //tjw:
  /**
   * Sets the VAX flag of the input cube.  If true, then the core pixel type of
   * the input cube is VAX, and VAX conversion routines need to be run to
@@ -990,15 +930,9 @@ namespace Isis {
   *
   * @param vax_convert Flag indicating whether or not to run VAX conersion methods
   */



  void ProcessImport::SetVAXConvert(const bool vax_convert) {


    p_vax_convert = vax_convert;

  };
  }


  /**
@@ -1007,7 +941,7 @@ namespace Isis {
   */
  ProcessImport::Interleave ProcessImport::Organization() const {
    return p_organization;
  };
  }


  /**
@@ -1018,7 +952,7 @@ namespace Isis {
  void ProcessImport::SetBase(const double base) {
    p_base.clear();
    p_base.push_back(base);
  };
  }


  /**
@@ -1028,7 +962,7 @@ namespace Isis {
   */
  void ProcessImport::SetBase(const std::vector<double> base) {
    p_base = base;
  };
  }


  /**
@@ -1039,7 +973,7 @@ namespace Isis {
  void ProcessImport::SetMultiplier(const double mult) {
    p_mult.clear();
    p_mult.push_back(mult);
  };
  }


  /**
@@ -1049,7 +983,7 @@ namespace Isis {
   */
  void ProcessImport::SetMultiplier(const std::vector<double> mult) {
    p_mult = mult;
  };
  }


  /**
@@ -1078,7 +1012,7 @@ namespace Isis {
    SetLIS(lis, lis);
    SetHRS(hrs, hrs);
    SetHIS(his, his);
  };
  }


  /**
@@ -1288,6 +1222,10 @@ namespace Isis {
        min = Isis::VALID_MIN4;
        max = Isis::VALID_MAX4;
      }
      else if (p_pixelType == Isis::SignedInteger) {
        min = Isis::IVALID_MIN4;
        max = Isis::IVALID_MAX4;
      }
      else if (p_pixelType == Isis::SignedWord) {
        min = Isis::VALID_MIN2 * p_mult[0] + p_base[0];
        max = Isis::VALID_MAX2 * p_mult[0] + p_base[0];
@@ -1313,7 +1251,8 @@ namespace Isis {
      if ((p_base.size() > 1) || (p_mult.size() > 1)) {
        att.setPixelType(Isis::Real);
      }
      else if (p_pixelType == Isis::UnsignedWord || p_pixelType == Isis::Double) {
      else if (p_pixelType == Isis::UnsignedWord || p_pixelType == Isis::Double ||
               p_pixelType == Isis::SignedInteger) {
        att.setPixelType(Isis::Real);
      }
      else {
@@ -1407,8 +1346,6 @@ namespace Isis {
   *             Position[]. Byte count[]"
   */
  void ProcessImport::ProcessBsq(void funct(Isis::Buffer &out)) {


    // Figure out the number of bytes to read for a single line
    int readBytes = Isis::SizeOf(p_pixelType);
    readBytes = readBytes * p_ns;
@@ -1431,9 +1368,6 @@ namespace Isis {

    // Handle the file header
    streampos pos = fin.tellg();
    //tjw


    if (p_saveFileHeader) {
      p_fileHeader = new char[p_fileHeaderBytes];
      fin.read(p_fileHeader, p_fileHeaderBytes);
@@ -1479,19 +1413,14 @@ namespace Isis {
        mult = p_mult[0];
      }


      // Handle any data headers (e.g., the data at the beginning of each band)
      pos = fin.tellg();
      if (p_saveDataHeader) {
        p_dataHeader.push_back(new char[p_dataHeaderBytes]);
        fin.read(p_dataHeader.back(), p_dataHeaderBytes);

      }
      else {
        //cout << p_suffixData << endl;
        fin.seekg(p_dataHeaderBytes, ios_base::cur);


       }

      // Check the last io
@@ -1526,7 +1455,6 @@ namespace Isis {
          throw IException(IException::Io, msg, _FILEINFO_);
        }


        // Get a line of data from the input file
        pos = fin.tellg();
        fin.read(in, readBytes);
@@ -1542,37 +1470,34 @@ namespace Isis {
        for(int samp = 0; samp < p_ns; samp++) {
          switch(p_pixelType) {
            case Isis::UnsignedByte:
              //cout << "UnsignedByte" << endl;
              (*out)[samp] = (double)((unsigned char *)in)[samp];
              break;
            case Isis::UnsignedWord:
              //cout << "Unsigned word."<< endl;
              (*out)[samp] =
                (double)swapper.UnsignedShortInt((unsigned short int *)in+samp);
              break;
            case Isis::SignedWord:
            //cout << "Signed Word." << endl;
              (*out)[samp] = (double)swapper.ShortInt((short int *)in+samp);
              break;
            case Isis::SignedInteger:
              (*out)[samp] = (double)swapper.Int((int *)in+samp);
              break;
            case Isis::Real:
              //tjw:
              if(p_vax_convert)
              if(p_vax_convert) {
                (*out)[samp]= VAXConversion( (float *)in+samp );
              else
              }
              else {
                (*out)[samp] = (double)swapper.Float((float *)in+samp);

              }
              break;
            case Isis::Double:
              //cout << "Double"  << endl;
              (*out)[samp] = (double)swapper.Double((double *)in+samp);
              break;


            default:
              break;
          }


          (*out)[samp] = TestPixel((*out)[samp]);

          if (Isis::IsValidPixel((*out)[samp])) {
@@ -1671,10 +1596,6 @@ namespace Isis {
  }






  /**
   * Function to process files stored as Band Interleaved by Line
   *
@@ -1710,8 +1631,6 @@ namespace Isis {
    // Handle the file header
    streampos pos = fin.tellg();



    if (p_saveFileHeader) {
      p_fileHeader = new char[p_fileHeaderBytes];
      fin.read(p_fileHeader, p_fileHeaderBytes);
@@ -1719,21 +1638,8 @@ namespace Isis {
    }
    else {
        fin.seekg(p_fileHeaderBytes+p_suffixData, ios_base::beg);
        //fin.seekg(p_fileHeaderBytes, ios_base::beg);
    }


#if 0
    if (p_saveFileHeader) {
      p_fileHeader = new char[p_fileHeaderBytes];
      fin.read(p_fileHeader, p_fileHeaderBytes);
    }
    else {
      fin.seekg(p_fileHeaderBytes, ios_base::beg);
    }
#endif


    // Check the last io
    if (!fin.good()) {
      QString msg = "Cannot read file [" + p_inFile + "]. Position [" +
@@ -1828,12 +1734,16 @@ namespace Isis {
            case Isis::SignedWord:
              (*out)[samp] = (double)swapper.ShortInt((short int *)in+samp);
              break;
            case Isis::SignedInteger:
              (*out)[samp] = (double)swapper.Int((int *)in+samp);
              break;
            case Isis::Real:
              //tjw:
              if(p_vax_convert)
              if(p_vax_convert) {
                (*out)[samp]= VAXConversion( (float *)in+samp );
              else
              }
              else {
                (*out)[samp] = (double)swapper.Float((float *)in+samp);
              }
              break;
            case Isis::Double:
              (*out)[samp] = (double)swapper.Double((double *)in+samp);
@@ -1879,7 +1789,6 @@ namespace Isis {
          throw IException(IException::Io, msg, _FILEINFO_);
        }


        // Save off the prefix bytes vector
        if (p_saveDataPre) {
          p_dataPre.push_back(tempPre);
@@ -1927,7 +1836,6 @@ namespace Isis {
    // Close the file and clean up
    fin.close();
    delete [] in;

  }


@@ -1943,7 +1851,6 @@ namespace Isis {
   */
  void ProcessImport::ProcessBip(void funct(Isis::Buffer &out)) {


    // Figure out the number of bytes to read for a single line
    int readBytes = Isis::SizeOf(p_pixelType);
    readBytes = readBytes * p_ns * p_nb;
@@ -1965,8 +1872,6 @@ namespace Isis {
    }

    // Handle the file header

    //tjw
    streampos pos = fin.tellg();
    if (p_saveFileHeader) {
      p_fileHeader = new char[p_fileHeaderBytes];
@@ -1975,23 +1880,8 @@ namespace Isis {
    }
    else {
        fin.seekg(p_fileHeaderBytes+p_suffixData, ios_base::beg);
        //fin.seekg(p_fileHeaderBytes, ios_base::beg);
    }



#if 0

    if (p_saveFileHeader) {
      p_fileHeader = new char[p_fileHeaderBytes];
      fin.read(p_fileHeader, p_fileHeaderBytes);
    }
    else {
      fin.seekg(p_fileHeaderBytes, ios_base::beg);
    }

#endif

    // Check the last io
    if (!fin.good()) {
      QString msg = "Cannot read file [" + p_inFile + "]. Position [" +
@@ -2029,7 +1919,6 @@ namespace Isis {
      // Space for storing prefix and suffix data pointers
      vector<char *> tempPre, tempPost;


      // Handle any line prefix bytes
      pos = fin.tellg();
      if (p_saveDataPre) {
@@ -2087,12 +1976,16 @@ namespace Isis {
            case Isis::SignedWord:
              (*out)[osamp] = (double)swapper.ShortInt((short int *)in+samp);
              break;
            case Isis::SignedInteger:
              (*out)[samp] = (double)swapper.Int((int *)in+samp);
              break;
            case Isis::Real:
              //tjw:
              if(p_vax_convert)
              if(p_vax_convert) {
                (*out)[osamp]= VAXConversion( (float *)in+samp );
              else
              }
              else {
                (*out)[osamp] = (double)swapper.Float((float *)in+samp);
              }
              break;
            case Isis::Double:
              (*out)[osamp] = (double)swapper.Double((double *)in+samp);
@@ -2410,8 +2303,4 @@ namespace Isis {
    return p_inFile;
  }


}


+37 −34
Original line number Diff line number Diff line
@@ -139,29 +139,34 @@ namespace Isis {
   *                           documentation. Changed parameter name from
   *                           "parameter" to "fname" in SetOutputCube() method.
   *                           References #1248.
   *   @history 2015-01-15 Sasha Brownsberger - Added virtual keyword to several 
   *                                            functions to ensure successful 
   *                                            inheritance between Process and its
   *                                            child classes.  Added virtual keyword
   *                                            to destructor.  References #2215.
   *
   * *                                            to destructor.  References #2215.
   *   @history 2015-01-15 Sasha Brownsberger - Added virtual keyword to several functions
   *                           to ensure successful inheritance between Process and its
   *                           child classes. Added virtual keyword to destructor. References #2215.
   *   @history 2016-02-23 Tyler Wilson - Added VAXConversion(...) and IsVAXSpecial(...) routines
   *                           for importing Galileo NIMS qubs which were originally saved in
   *                           VAX format.  Also added SetSuffixOffset for reading suffix
   *                           band data from NIMS cubes. References #2368.
   *   @history 2016-04-20 Jeannie Backer - Merged Janet Barret's changes to handle SignedInteger
   *                           imports. Brought code closer to coding standards.
   *
   *
   */





  class ProcessImport : public Isis::Process {
    public:
      enum VAXDataType {VAX_REAL, VAX_INT};
      enum VAXSpecialPixel { VAX_MIN4,VAX_NULL4,VAX_LRS4,VAX_LIS4,VAX_HIS4,VAX_HRS4};
      enum VAXDataType { 
        VAX_REAL,  
        VAX_INT
      };


      enum VAXSpecialPixel { 
        VAX_MIN4,
        VAX_NULL4,
        VAX_LRS4,
        VAX_LIS4,
        VAX_HIS4,
        VAX_HRS4
      };

      ProcessImport();
      virtual ~ProcessImport();
@@ -176,6 +181,7 @@ namespace Isis {
      Isis::Cube *SetOutputCube(const QString &parameter);
      virtual Isis::Cube *SetOutputCube(const QString &fname,
                                Isis::CubeAttributeOutput &att);

      void SetPixelType(const Isis::PixelType type);
      /**
       * Returns the pixel type
@@ -184,6 +190,8 @@ namespace Isis {
      Isis::PixelType PixelType() {
        return p_pixelType;
      }


      void SetDimensions(const int ns, const int nl, const int nb);

      /**
@@ -194,6 +202,7 @@ namespace Isis {
        return p_ns;
      }


      /**
       * Returns the number of lines
       * @return The number of lines
@@ -202,6 +211,7 @@ namespace Isis {
        return p_nl;
      }


      /**
       * Returns the number of bands
       * @return The number of bands
@@ -210,6 +220,7 @@ namespace Isis {
        return p_nb;
      }


      void SetByteOrder(const Isis::ByteOrder order);

      /**
@@ -220,16 +231,12 @@ namespace Isis {
        return p_byteOrder;
      }


      //tjw:  VAX_REAL -> IEEE_REAL

      bool IsVAXSpecial(unsigned int *vax, VAXSpecialPixel pix);
      double VAXConversion(void *ibuf);
      void SetSuffixOffset(int samples,int lines, int coreBands, int itemBytes);
      void SetSuffixPixelType(const Isis::PixelType type);
      void SetVAXConvert(const bool vax_convert);


      void SetFileHeaderBytes(const int bytes);
      void SetFileTrailerBytes(const int bytes);
      void SetDataHeaderBytes(const int bytes);
@@ -276,6 +283,8 @@ namespace Isis {
                                  all bands is followed by the second pixel for 
                                  all bands.*/
      };


      void SetOrganization(const ProcessImport::Interleave org);
      Interleave Organization() const;

@@ -295,6 +304,13 @@ namespace Isis {

      double TestPixel(const double pixel);

      void ProcessBsq(void funct(Isis::Buffer &out) = NULL);
      void ProcessBil(void funct(Isis::Buffer &out) = NULL);
      void ProcessBip(void funct(Isis::Buffer &out) = NULL);
      void ProcessJp2(void funct(Isis::Buffer &out) = NULL);

      void CheckPixelRange(QString pixelName, double min, double max);

#if 0
      void AddImportLabel(Isis::Pvl &importLab);
      void AddLabel(Isis::Pvl &label);
@@ -305,16 +321,14 @@ namespace Isis {
      QString p_inFile;            //!< Input file name
      Isis::PixelType p_pixelType; //!< Pixel type of input data

      //tjw
      Isis::PixelType p_suffixPixelType; //!< Pixel type of suffix data (for Galileo NIMS cubes)
      Isis::PixelType p_suffixPixelType; //!< The pixel type of the suffix data.
      int p_ns;                    //!< Number of samples
      int p_nl;                    //!< Number of lines
      int p_nb;                    //!< Number of bands
      Isis::ByteOrder p_byteOrder; //!< Byte order of data

      //tjw
      int p_suffixData;            //!< Number of bytes past the file header bytes
                                    //!< where the suffix data bands are stored
      int p_suffixData;             /**< The number of bytes past the file header bytes
                                         where the suffix data bands are stored.*/


      int p_fileHeaderBytes;       /**< The number of bytes of non-image data at
@@ -358,10 +372,6 @@ namespace Isis {
      std::vector<std::vector<char *> >p_dataPost; //!< The data suffix
      char *p_fileTrailer;                         //!< The file trailer



      //tjw

      bool p_vax_convert;

      ProcessImport::Interleave p_organization; /**< The format of the input 
@@ -419,13 +429,6 @@ namespace Isis {
      double p_lis_max;     /**< The pixel value which is the upper bound of LIS
                                 data. All pixels between this value and the min
                                 will be converted to the Isis LIS value.*/

      void ProcessBsq(void funct(Isis::Buffer &out) = NULL);
      void ProcessBil(void funct(Isis::Buffer &out) = NULL);
      void ProcessBip(void funct(Isis::Buffer &out) = NULL);
      void ProcessJp2(void funct(Isis::Buffer &out) = NULL);

      void CheckPixelRange(QString pixelName, double min, double max);
  };
};
#endif
+3 −4
Original line number Diff line number Diff line
@@ -294,8 +294,8 @@ namespace Isis {
   * (DataPrefixBytes + DataSuffixByte) / PixelSize is subtracted from the number of samples before 
   * the output file is created. 
   *  
   * @param labelNumber FITS label number. zero (0) is the first/main label. one (1) is the first 
   * extension, ... 
   * @param labelNumber FITS label number. Zero indicates the first/main label, one indicates the 
   *                    first extension, etc...
   * 
   */
  void ProcessImportFits::setProcessFileStructure(int labelNumber) {
@@ -325,8 +325,7 @@ namespace Isis {
        type = Isis::SignedWord;
        break;
      case 32:
        msg = "Signed 32 bit integer (int) pixel type is not supported at this time";
        throw IException(IException::User, msg, _FILEINFO_);
        type = Isis::SignedInteger;
        break;
      case -32:
        type = Isis::Real;
+3 −3
Original line number Diff line number Diff line
@@ -42,9 +42,9 @@ namespace Isis {
   * @internal
   *   @history 2014-06-06 Stuart Sides - Added ability to read and process the FITS extension
   *   @history 2015-01-15 Sasha Brownsberger - Made destructor virtual.  References #2215.
   *   @history 2015-06-02 Kristin Berry - Added error for use of
   *                                  unsupported BIP
   *                                  organization.
   *   @history 2015-06-02 Kristin Berry - Added error for use of unsupported BIP organization.
   *   @history 2016-04-20 Jeannie Backer - Merged Janet Barret's changes to handle SignedInteger
   *                           imports. Brought code closer to coding standards.
   *             
   */

Loading