Commit 01ba67bb authored by Jesse Mapel's avatar Jesse Mapel
Browse files

cneteditorwidget now compiles with out old graph

parent b9a42c6c
Loading
Loading
Loading
Loading
+27 −0
Original line number Diff line number Diff line
@@ -1104,6 +1104,33 @@ namespace Isis {
  }


  /**
   * Get all images connected to a given image by common control points.
   *
   * @param serialNumber the serial number of the image to find images adjacent to.
   *
   * @returns @b QList<QString> The serial numbers of all adjacent images.
   *
   * @TODO Replace this with updated graph functionality once boost graph is in.
   */
  QList< QString > ControlNet::getAdjacentImages(QString serialNumber) const {
    if (!cubeGraphNodes->contains(serialNumber)) {
      IString msg = "Cube Serial Number [" + serialNumber + "] not found in "
          "the network";
      throw IException(IException::Programmer, msg, _FILEINFO_);
    }

    const ControlCubeGraphNode *queryNode = getGraphNode(serialNumber);
    QList< ControlCubeGraphNode * > adjacentNodes = queryNode->getAdjacentNodes();
    QList< QString > adjacentSerials;
    foreach(ControlCubeGraphNode * adjacentNode, adjacentNodes) {
      adjacentSerials.append(adjacentNode->getSerialNumber());
    }

    return adjacentSerials;
  }


  /**
   * Get all the measures pertaining to a given cube serial number
   *
+4 −0
Original line number Diff line number Diff line
@@ -217,6 +217,9 @@ namespace Isis {
   *                           group to set radii values to those ingested from the versioner
   *                           if they exist. Otherwise, we call SetTarget with the targetname.
   *                           Fixes #5361.
   *   @history 2018-06-06 Jesse Mapel - Added a method to get all adjacent images to ControlNet.
   *                           Previously this functionality was only available through the
   *                           ControlCubeGraphNode class. References #5434.
   */
  class ControlNet : public QObject {
      Q_OBJECT
@@ -252,6 +255,7 @@ namespace Isis {
          bool lessThan(const ControlMeasure *, const ControlMeasure *)) const;
      int getEdgeCount() const;
      QString CubeGraphToString() const;
      QList< QString > getAdjacentImages(QString serialNumber) const;
      QList< ControlMeasure * > GetMeasuresInCube(QString serialNumber);
      QList< ControlMeasure * > GetValidMeasuresInCube(QString serialNumber);
      QList< ControlMeasure * > sortedMeasureList(double(ControlMeasure::*statFunc)() const,
+13 −10
Original line number Diff line number Diff line
@@ -2,6 +2,11 @@

#include "APrioriLatitudeFilter.h"

#include <QPair>
#include <QString>

#include "ControlMeasure.h"
#include "ControlNet.h"
#include "ControlPoint.h"
#include "Latitude.h"

@@ -9,13 +14,12 @@
namespace Isis {
  APrioriLatitudeFilter::APrioriLatitudeFilter(
        AbstractFilter::FilterEffectivenessFlag flag,
    ControlNet *network,
    int minimumForSuccess) : AbstractNumberFilter(flag, network, minimumForSuccess) {
        int minimumForSuccess) : AbstractNumberFilter(flag, minimumForSuccess) {
  }


  APrioriLatitudeFilter::APrioriLatitudeFilter(
    const APrioriLatitudeFilter &other) : AbstractNumberFilter(other) {
  APrioriLatitudeFilter::APrioriLatitudeFilter(const APrioriLatitudeFilter &other)
        : AbstractNumberFilter(other) {
  }


@@ -23,8 +27,8 @@ namespace Isis {
  }


  bool APrioriLatitudeFilter::evaluate(const QString *imageSerial) const {
    return evaluateImageFromPointFilter(imageSerial);
  bool APrioriLatitudeFilter::evaluate(const QPair<QString, ControlNet *> *imageAndNet) const {
    return evaluateImageFromPointFilter(imageAndNet);
  }


@@ -34,8 +38,7 @@ namespace Isis {
  }


  bool APrioriLatitudeFilter::evaluate(
    const ControlMeasure *measure) const {
  bool APrioriLatitudeFilter::evaluate(const ControlMeasure *measure) const {
    return true;
  }

+4 −6
Original line number Diff line number Diff line
@@ -3,14 +3,12 @@

#include "AbstractNumberFilter.h"


template< typename U, typename V > class QPair;
class QString;


namespace Isis {
  class AbstractFilterSelector;
  class ControlCubeGraphNode;
  class ControlMeasure;
  class ControlNet;
  class ControlPoint;

  /**
@@ -33,11 +31,11 @@ namespace Isis {

    public:
      APrioriLatitudeFilter(AbstractFilter::FilterEffectivenessFlag flag,
          ControlNet *network, int minimumForSuccess = -1);
            int minimumForSuccess = -1);
      APrioriLatitudeFilter(const APrioriLatitudeFilter &other);
      virtual ~APrioriLatitudeFilter();

      bool evaluate(const QString *) const;
      bool evaluate(const QPair<QString, ControlNet *> *) const;
      bool evaluate(const ControlPoint *) const;
      bool evaluate(const ControlMeasure *) const;

+15 −11
Original line number Diff line number Diff line
@@ -2,6 +2,11 @@

#include "APrioriLatitudeSigmaFilter.h"

#include <QPair>
#include <QString>

#include "ControlMeasure.h"
#include "ControlNet.h"
#include "ControlPoint.h"
#include "Latitude.h"

@@ -9,13 +14,12 @@
namespace Isis {
  APrioriLatitudeSigmaFilter::APrioriLatitudeSigmaFilter(
        AbstractFilter::FilterEffectivenessFlag flag,
    ControlNet *network,
    int minimumForSuccess) : AbstractNumberFilter(flag, network, minimumForSuccess) {
        int minimumForSuccess) : AbstractNumberFilter(flag, minimumForSuccess) {
  }


  APrioriLatitudeSigmaFilter::APrioriLatitudeSigmaFilter(
    const APrioriLatitudeSigmaFilter &other) : AbstractNumberFilter(other) {
  APrioriLatitudeSigmaFilter::APrioriLatitudeSigmaFilter(const APrioriLatitudeSigmaFilter &other)
        : AbstractNumberFilter(other) {
  }


@@ -23,8 +27,9 @@ namespace Isis {
  }


  bool APrioriLatitudeSigmaFilter::evaluate(const QString *imageSerial) const {
    return evaluateImageFromPointFilter(imageSerial);
  bool APrioriLatitudeSigmaFilter::evaluate(
        const QPair<QString, ControlNet *> *imageAndNet) const {
    return evaluateImageFromPointFilter(imageAndNet);
  }


@@ -34,8 +39,7 @@ namespace Isis {
  }


  bool APrioriLatitudeSigmaFilter::evaluate(
    const ControlMeasure *measure) const {
  bool APrioriLatitudeSigmaFilter::evaluate(const ControlMeasure *measure) const {
    return true;
  }

Loading