Commit 15e263dd authored by Tyler Wilson's avatar Tyler Wilson
Browse files

PROG Moved define directives/enum declarations into class because...

PROG Moved define directives/enum declarations into class because createReleaseNotesXML script was throwing warnings.

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/trunk@6590 41f8697f-d340-4b68-9986-7bafba869bb8
parent 26179784
Loading
Loading
Loading
Loading
+14 −7
Original line number Diff line number Diff line
@@ -41,6 +41,12 @@
#include "PvlTokenizer.h"
#include "SpecialPixel.h"


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


using namespace std;
namespace Isis {

@@ -215,7 +221,6 @@ namespace Isis {
   * @return double the converted value
   */


  double ProcessImport::VAXConversion(void *ibuf) {


@@ -257,22 +262,22 @@ namespace Isis {
       oli = (unsigned int * ) ibuf;
       ili = (unsigned int * ) ibuf;

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

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

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

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

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

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

       //test for word swapping
@@ -304,6 +309,8 @@ namespace Isis {





  /**
   * Sets the pixel type of the input file.
   *
+23 −40
Original line number Diff line number Diff line
@@ -144,36 +144,25 @@ namespace Isis {
   *                                            inheritance between Process and its
   *                                            child classes.  Added virtual keyword
   *                                            to destructor.  References #2215.
   *
   * *                                            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.  
   *                        References #2368.
   *                        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.
   *
   *
   */


// VAX conversion
#define EXPONENT_MASK ((char) 0x7F)




//Data type for Galileo:  NIMS data
 enum VAXDataType{
         VAX_REAL,
         VAX_INT
 };

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

  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};

      ProcessImport();
      virtual ~ProcessImport();
      virtual void StartProcess();
@@ -192,17 +181,9 @@ enum VAXSpecialPixel {
       * Returns the pixel type
       * @return The pixel type of input data
       */

      void SetSuffixPixelType(const Isis::PixelType type);

      Isis::PixelType PixelType() {
        return p_pixelType;
      }

      Isis::PixelType SuffixPixelType() {
        return p_suffixPixelType;
      }

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

      /**
@@ -245,6 +226,8 @@ enum VAXSpecialPixel {
      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);
@@ -293,11 +276,6 @@ enum VAXSpecialPixel {
                                  all bands is followed by the second pixel for 
                                  all bands.*/
      };

      //tjw
      void SetVAXConvert(const bool vax_flag);


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

@@ -326,16 +304,19 @@ enum VAXSpecialPixel {
    private:
      QString p_inFile;        //!< Input file name
      Isis::PixelType p_pixelType; //!< Pixel type of input data
      Isis::PixelType p_suffixPixelType;

      //tjw
      Isis::PixelType p_suffixPixelType; //!< Pixel type of suffix data (for Galileo NIMS cubes)
      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
                                        //!


      Isis::ByteOrder p_byteOrder;      //!< Byte order of data
      int p_fileHeaderBytes;       /**< The number of bytes of non-image data at
                                        the beginning of a file. This does not
                                        include any section headers such as band
@@ -377,6 +358,12 @@ enum VAXSpecialPixel {
      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 
                                                     file. Possible values are 
                                                     BSQ for band sequential, 
@@ -433,10 +420,6 @@ enum VAXSpecialPixel {
                                 data. All pixels between this value and the min
                                 will be converted to the Isis LIS value.*/

      bool p_vax_convert;               /**< A boolean flag which is set to true if we
                                             are converting a VAX formatted real number.   */


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