Commit e846dcbe authored by Tracie Sucharski's avatar Tracie Sucharski
Browse files

Re-integrating ipce_FY17-Sprint1 branch back into trunk.

git-svn-id: http://subversion.wr.usgs.gov/repos/prog/isis3/trunk@7656 41f8697f-d340-4b68-9986-7bafba869bb8
parents 3b3f1297 5ad6843b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -568,7 +568,7 @@ namespace Isis {


  /**
   * @description This method returns the Oblique Detector Resolution
   * @brief This method returns the Oblique Detector Resolution
   * if the Look Vector intersects the target and if the emission angle is greater than or equal
   * to 0, and less than 90 degrees.   Otherwise, it returns -1.0.  This formula provides an
   * improved estimate to the detector resolution for images near the limb:
+2 −0
Original line number Diff line number Diff line
@@ -177,6 +177,7 @@ namespace Isis {

  /**
   * @brief Set lat/lon and attempt to calculate x/y values
   *
   * This method is used to set the latitude/longitude (assumed to be of the
   * correct LatitudeType, LongitudeDirection, and LongitudeDomain). The Set
   * forces an attempted calculation of the projection X/Y values. This may or
@@ -286,6 +287,7 @@ namespace Isis {

  /**
   * @brief Find x/y range from lat/lon range
   *
   * This method is used to determine the x/y range which completely covers the
   * area of interest specified by the lat/lon range. The latitude/longitude
   * range may be obtained from the labels. The purpose of this method is to
+5 −26
Original line number Diff line number Diff line
@@ -65,8 +65,7 @@ namespace Isis {


  StatCumProbDistDynCalc::StatCumProbDistDynCalc(const StatCumProbDistDynCalc &other)
    : m_id(new QUuid(other.m_id->toString())),
      m_numberCells(other.m_numberCells),      
    : m_numberCells(other.m_numberCells),
      m_numberQuantiles(other.m_numberQuantiles),  
      m_numberObservations(other.m_numberObservations),
      m_quantiles(other.m_quantiles),        
@@ -81,8 +80,6 @@ namespace Isis {
   * Destroys StatCumProbDistDynCalc object.
   */ 
  StatCumProbDistDynCalc::~StatCumProbDistDynCalc() { 
    delete m_id;
    m_id = NULL;
  }


@@ -90,10 +87,6 @@ namespace Isis {
  StatCumProbDistDynCalc &StatCumProbDistDynCalc::operator=(const StatCumProbDistDynCalc &other) {

    if (&other != this) {
      delete m_id;
      m_id = NULL;
      m_id = new QUuid(other.m_id->toString());

      m_numberCells              = other.m_numberCells;
      m_numberQuantiles          = other.m_numberQuantiles;
      m_numberObservations       = other.m_numberObservations;
@@ -115,7 +108,6 @@ namespace Isis {
   *                 will be dynamically tracked
   */
  void StatCumProbDistDynCalc::initialize() {
    m_id = NULL;
    m_numberCells = m_numberQuantiles = m_numberObservations = 0;
    m_quantiles.clear();
    m_observationValues.clear();
@@ -127,8 +119,6 @@ namespace Isis {

  void StatCumProbDistDynCalc::setQuantiles(unsigned int nodes) {
    initialize();
    m_id = new QUuid(QUuid::createUuid());

    if (nodes < 3) {
      m_numberQuantiles = 3; 
    }
@@ -514,7 +504,6 @@ namespace Isis {
  void StatCumProbDistDynCalc::save(QXmlStreamWriter &stream, const Project *project) const {   // TODO: does xml stuff need project???

    stream.writeStartElement("statCumProbDistDynCalc");
    stream.writeTextElement("id", m_id->toString());
    stream.writeTextElement("numberCells", toString(m_numberCells));
    stream.writeTextElement("numberQuantiles", toString(m_numberQuantiles));
    stream.writeTextElement("numberObservations", toString(m_numberObservations));
@@ -595,11 +584,7 @@ namespace Isis {
                                                      const QString &localName,
                                                      const QString &qName) {
    if (!m_xmlHandlerCharacters.isEmpty()) {
      if (qName == "id") {
        m_xmlHandlerCumProbCalc->m_id = NULL;
        m_xmlHandlerCumProbCalc->m_id = new QUuid(m_xmlHandlerCharacters);
      }
      else if (qName == "numberCells") {
      if (qName == "numberCells") {
        m_xmlHandlerCumProbCalc->m_numberCells = toInt(m_xmlHandlerCharacters);
      }
      else if (qName == "numberQuantiles") {
@@ -617,8 +602,7 @@ namespace Isis {


  QDataStream &StatCumProbDistDynCalc::write(QDataStream &stream) const {
    stream << m_id->toString()
           << (qint32)m_numberCells
    stream << (qint32)m_numberCells
           << (qint32)m_numberQuantiles
           << (qint32)m_numberObservations
           << m_quantiles
@@ -633,8 +617,7 @@ namespace Isis {
  QDataStream &StatCumProbDistDynCalc::read(QDataStream &stream) {
    QString id;
    qint32 numCells, numQuantiles, numObservations;
    stream >> id
           >> numCells
    stream >> numCells
           >> numQuantiles
           >> numObservations
           >> m_quantiles
@@ -642,10 +625,6 @@ namespace Isis {
           >> m_idealNumObsBelowQuantile
           >> m_numObsBelowQuantile;

    delete m_id;
    m_id = NULL;
    m_id = new QUuid(id);

    m_numberCells = (unsigned int)numCells;
    m_numberQuantiles  = (unsigned int)numQuantiles;
    m_numberObservations   = (unsigned int)numObservations;
+0 −3
Original line number Diff line number Diff line
@@ -132,9 +132,6 @@ namespace Isis {
          QString m_xmlHandlerCharacters;
      };

      QUuid *m_id; /**< A unique ID for this object (useful for others to reference this object when
                                      saving to disk).*/

      unsigned int m_numberCells; /**< The number of cells or histogram bins that are being used to
                                      model the probility density function.*/
      
+0 −86
Original line number Diff line number Diff line
@@ -27,10 +27,6 @@

#include <float.h>

#include <H5Cpp.h>
#include <hdf5_hl.h>
#include <hdf5.h>

#include "IException.h"
#include "IString.h"
#include "Project.h"
@@ -939,86 +935,4 @@ namespace Isis {
    return statistics.read(stream);
  }

//??? not working for prog14/15???
// dyld: Symbol not found: __ZN2H58PredType12NATIVE_INT64E
//   Referenced from: /usgs/pkgs/isis3beta2015-12-24/isis/bin/../lib/libisis3.4.12.dylib
//   Expected in: flat namespace
//  in /usgs/pkgs/isis3beta2015-12-24/isis/bin/../lib/libisis3.4.12.dylib

  /** 
   *  H5 compound data type uses the offesets from the QDataStream returned by
   *  the write(QDataStream &stream) method.
   */
  H5::CompType Statistics::compoundH5DataType() {

    H5::CompType compoundDataType((size_t)124);

    size_t offset = 0;
    compoundDataType.insertMember("Sum", offset, H5::PredType::NATIVE_DOUBLE);

    // offset += sizeof(m_sum);
    offset += sizeof(double);
    compoundDataType.insertMember("SumSquared", offset, H5::PredType::NATIVE_DOUBLE);

    // offset += sizeof(m_sumsum);
    offset += sizeof(double);
    compoundDataType.insertMember("Minimum", offset, H5::PredType::NATIVE_DOUBLE);

    // offset += sizeof(m_minimum);
    offset += sizeof(double);
    compoundDataType.insertMember("Maximum", offset, H5::PredType::NATIVE_DOUBLE);

    // offset += sizeof(m_maximum);
    offset += sizeof(double);
    compoundDataType.insertMember("ValidMinimum", offset, H5::PredType::NATIVE_DOUBLE);

    // offset += sizeof(m_validMinimum);
    offset += sizeof(double);
    compoundDataType.insertMember("ValidMaximum", offset, H5::PredType::NATIVE_DOUBLE);

    // offset += sizeof(m_validMaximum);
    offset += sizeof(double);
    compoundDataType.insertMember("TotalPixels", offset, H5::PredType::NATIVE_INT64);

    // offset += sizeof(m_totalPixels);
    offset += sizeof(BigInt);
    compoundDataType.insertMember("ValidPixels", offset, H5::PredType::NATIVE_INT64);

    // offset += sizeof(m_validPixels);
    offset += sizeof(BigInt);
    compoundDataType.insertMember("NullPixels", offset, H5::PredType::NATIVE_INT64);

    // offset += sizeof(m_nullPixels);
    offset += sizeof(BigInt);
    compoundDataType.insertMember("LRSPixels", offset, H5::PredType::NATIVE_INT64);

    // offset += sizeof(m_lrsPixels);
    offset += sizeof(BigInt);
    compoundDataType.insertMember("LISPixels", offset, H5::PredType::NATIVE_INT64);

    // offset += sizeof(m_lisPixels);
    offset += sizeof(BigInt);
    compoundDataType.insertMember("HRSPixels", offset, H5::PredType::NATIVE_INT64);

    // offset += sizeof(m_hrsPixels);
    offset += sizeof(BigInt);
    compoundDataType.insertMember("HISPixels", offset, H5::PredType::NATIVE_INT64);

    // offset += sizeof(m_hisPixels);
    offset += sizeof(BigInt);
    compoundDataType.insertMember("UnderRangePixels", offset, H5::PredType::NATIVE_INT64);

    // offset += sizeof(m_underRangePixels);
    offset += sizeof(BigInt);
    compoundDataType.insertMember("OverRangePixels", offset, H5::PredType::NATIVE_INT64);

    // offset += sizeof(m_overRangePixels);
    offset += sizeof(BigInt);
    compoundDataType.insertMember("RemovedData", offset, H5::PredType::NATIVE_HBOOL);
    // mac osx has problem with "sizeof" commented lines and the native data
    // types too... will consider this later when ready to add serialization.

    return compoundDataType;
  }

} // end namespace isis
Loading