Isis 3 Programmer Reference
Isis::ImageOverlap Class Reference

Individual overlap container. More...

#include <ImageOverlap.h>

Collaboration diagram for Isis::ImageOverlap:
Collaboration graph

Public Member Functions

 ImageOverlap ()
 Construct an empty ImageOverlap object.
 
 ImageOverlap (QString serialNumber, geos::geom::MultiPolygon &polygon)
 Construct an ImageOverlap object and initialize it with the arguments.
 
 ImageOverlap (std::istream &inputStream)
 Construct an ImageOverlap object and initialize it from the istream.
 
virtual ~ImageOverlap ()
 Destroy this ImageOverlap object.
 
virtual void SetPolygon (const geos::geom::MultiPolygon &polygon)
 This method will replace the existing polygon that defines the overlap with a new one.
 
virtual void SetPolygon (const geos::geom::MultiPolygon *polygon)
 This method will replace the existing polygon that defines the overlap with a new one.
 
void Add (QString &sn)
 This method will add a new serial number to the list of serial numbers alread associated with the overlap.
 
int Size () const
 
QString operator[] (int index) const
 
const geos::geom::MultiPolygon * Polygon () const
 
virtual double Area ()
 This method will return the area of the polygon.
 
bool HasAnySameSerialNumber (ImageOverlap &other) const
 This method will return true if any serial number from this ImageOverlap is also in the other ImageOverlap.
 
bool HasSerialNumber (QString &sn) const
 This method will return true if input serial number exists in the ImageOverlap.
 
void Write (std::ostream &outputStream)
 

Private Member Functions

void Init ()
 Initialize this object to a known state.
 

Private Attributes

std::vector< QString > p_serialNumbers
 
geos::geom::MultiPolygon * p_polygon
 

Detailed Description

Individual overlap container.

Hold information about a single area of overlap. This includes the serial numbers of each cube that overlap this area and the polygon that defines this area.

Author
2005-08-03 Stuart Sides
History

2005-08-03 Stuart Sides Original version

2007-11-02 Tracie Sucharski, Added HasSN method

2008-08-18 Steven Lambright - Updated to work with geos3.0.0 instead of geos2. Mostly namespace changes.

2008-11-03 Steven Lambright - Added the Read and Write methods

2010-05-25 Steven Lambright - Made HasAnySameSerialNumber and HasSerialNumber const

Definition at line 40 of file ImageOverlap.h.

Constructor & Destructor Documentation

◆ ImageOverlap() [1/3]

Isis::ImageOverlap::ImageOverlap ( )

Construct an empty ImageOverlap object.

Definition at line 25 of file ImageOverlap.cpp.

References Init().

◆ ImageOverlap() [2/3]

Isis::ImageOverlap::ImageOverlap ( QString serialNumber,
geos::geom::MultiPolygon & polygon )

Construct an ImageOverlap object and initialize it with the arguments.

Parameters
serialNumberThe initial serial number assiciated with the polygon.
polygonThe polygon that defines the overlap area.

Definition at line 38 of file ImageOverlap.cpp.

References Add(), Init(), and SetPolygon().

◆ ImageOverlap() [3/3]

Isis::ImageOverlap::ImageOverlap ( std::istream & inputStream)

Construct an ImageOverlap object and initialize it from the istream.

Parameters
inputStreamA stream containing a representation of the image overlap

Definition at line 52 of file ImageOverlap.cpp.

References Add(), and Isis::PolygonTools::MakeMultiPolygon().

◆ ~ImageOverlap()

Isis::ImageOverlap::~ImageOverlap ( )
virtual

Destroy this ImageOverlap object.

Definition at line 78 of file ImageOverlap.cpp.

Member Function Documentation

◆ Add()

void Isis::ImageOverlap::Add ( QString & sn)

This method will add a new serial number to the list of serial numbers alread associated with the overlap.

Parameters
snThe serial number to be added to the list.

Definition at line 156 of file ImageOverlap.cpp.

References Isis::IException::Programmer.

Referenced by ImageOverlap(), and ImageOverlap().

◆ Area()

double Isis::ImageOverlap::Area ( )
virtual

This method will return the area of the polygon.

This member does not assume any particular units of measure for the verticies of the polygon. It is provided as a convience.

Definition at line 176 of file ImageOverlap.cpp.

◆ HasAnySameSerialNumber()

bool Isis::ImageOverlap::HasAnySameSerialNumber ( ImageOverlap & other) const

This method will return true if any serial number from this ImageOverlap is also in the other ImageOverlap.

Definition at line 185 of file ImageOverlap.cpp.

◆ HasSerialNumber()

bool Isis::ImageOverlap::HasSerialNumber ( QString & sn) const

This method will return true if input serial number exists in the ImageOverlap.

Parameters
[in]sn(QString &) Serial Number to search for
Returns
bool Returns true if the serial number exists in the ImageOverlap.

Definition at line 206 of file ImageOverlap.cpp.

◆ Init()

void Isis::ImageOverlap::Init ( )
private

Initialize this object to a known state.

Definition at line 87 of file ImageOverlap.cpp.

Referenced by ImageOverlap(), and ImageOverlap().

◆ operator[]()

QString Isis::ImageOverlap::operator[] ( int index) const
inline

Definition at line 61 of file ImageOverlap.h.

◆ Polygon()

const geos::geom::MultiPolygon * Isis::ImageOverlap::Polygon ( ) const
inline

Definition at line 66 of file ImageOverlap.h.

◆ SetPolygon() [1/2]

void Isis::ImageOverlap::SetPolygon ( const geos::geom::MultiPolygon & polygon)
virtual

This method will replace the existing polygon that defines the overlap with a new one.

Parameters
polygonThe new polygon.

Definition at line 100 of file ImageOverlap.cpp.

References Isis::PolygonTools::CopyMultiPolygon().

Referenced by ImageOverlap().

◆ SetPolygon() [2/2]

void Isis::ImageOverlap::SetPolygon ( const geos::geom::MultiPolygon * polygon)
virtual

This method will replace the existing polygon that defines the overlap with a new one.

Parameters
polygonThe new polygon.

Definition at line 117 of file ImageOverlap.cpp.

References Isis::PolygonTools::CopyMultiPolygon().

◆ Size()

int Isis::ImageOverlap::Size ( ) const
inline

Definition at line 56 of file ImageOverlap.h.

◆ Write()

void Isis::ImageOverlap::Write ( std::ostream & outputStream)

Definition at line 127 of file ImageOverlap.cpp.

Member Data Documentation

◆ p_polygon

geos::geom::MultiPolygon* Isis::ImageOverlap::p_polygon
private

Definition at line 83 of file ImageOverlap.h.

◆ p_serialNumbers

std::vector<QString> Isis::ImageOverlap::p_serialNumbers
private

Definition at line 82 of file ImageOverlap.h.


The documentation for this class was generated from the following files: