Isis 3 Developer Reference
ImageOverlap.h
Go to the documentation of this file.
1 #ifndef ImageOverlap_h
2 #define ImageOverlap_h
3 
26 #include <vector>
27 
28 #include <QString>
29 
30 #include <geos/geom/MultiPolygon.h>
31 
32 namespace Isis {
33 
56  class ImageOverlap {
57  public:
58  ImageOverlap();
59  ImageOverlap(QString serialNumber, geos::geom::MultiPolygon &polygon);
60  ImageOverlap(std::istream &inputStream);
61 
62  virtual ~ImageOverlap();
63 
64  // Set a new polygon
65  virtual void SetPolygon(const geos::geom::MultiPolygon &polygon);
66  virtual void SetPolygon(const geos::geom::MultiPolygon *polygon);
67 
68  // Add a serial number
69  void Add(QString &sn);
70 
71  // Return the number of serial numbers in this overlap area
72  int Size() const {
73  return p_serialNumbers.size();
74  };
75 
76  // Return the ith serial number
77  QString operator[](int index) const {
78  return p_serialNumbers[index];
79  };
80 
81  // Return the polygon
82  const geos::geom::MultiPolygon *Polygon() const {
83  return p_polygon;
84  };
85 
86  // Return the area of the polygon
87  virtual double Area();
88 
89  // Compare the serial numbers with another ImageOverlap
90  bool HasAnySameSerialNumber(ImageOverlap &other) const;
91 
92  // Does serial number exist in this ImageOverlap
93  bool HasSerialNumber(QString &sn) const;
94 
95  void Write(std::ostream &outputStream);
96  private:
97 
98  std::vector<QString> p_serialNumbers;
99  geos::geom::MultiPolygon *p_polygon;
100 
101  void Init();
102 
103  };
104 };
105 
106 #endif
int Size() const
Definition: ImageOverlap.h:72
virtual ~ImageOverlap()
Destroy this ImageOverlap object.
Definition: ImageOverlap.cpp:73
bool HasAnySameSerialNumber(ImageOverlap &other) const
This method will return true if any serial number from this ImageOverlap is also in the other ImageOv...
Definition: ImageOverlap.cpp:180
void Add(QString &sn)
This method will add a new serial number to the list of serial numbers alread associated with the ove...
Definition: ImageOverlap.cpp:151
bool HasSerialNumber(QString &sn) const
This method will return true if input serial number exists in the ImageOverlap.
Definition: ImageOverlap.cpp:201
virtual void SetPolygon(const geos::geom::MultiPolygon &polygon)
This method will replace the existing polygon that defines the overlap with a new one...
Definition: ImageOverlap.cpp:95
const geos::geom::MultiPolygon * Polygon() const
Definition: ImageOverlap.h:82
virtual double Area()
This method will return the area of the polygon.
Definition: ImageOverlap.cpp:171
ImageOverlap()
Construct an empty ImageOverlap object.
Definition: ImageOverlap.cpp:19
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
void Write(std::ostream &outputStream)
Definition: ImageOverlap.cpp:122
Individual overlap container.
Definition: ImageOverlap.h:56
QString operator[](int index) const
Definition: ImageOverlap.h:77