15#include <QSharedPointer>
25#include <boost/graph/graph_traits.hpp>
26#include <boost/graph/adjacency_list.hpp>
27#include <boost/graph/connected_components.hpp>
32template<
typename A,
typename B >
class QHash;
33template<
typename T >
class QList;
34template<
typename A,
typename B >
struct QPair;
35template<
typename T >
class QSet;
47 class SerialNumberList;
291 void Write(
const QString &filename,
bool pvl =
false);
307 double min,
double max);
323 double sample,
double line);
348 void SetImages(
const QString &imageListFile);
383 bool ValidateSerialNumber(QString serialNumber)
const;
390 void UpdatePointReference(
ControlPoint *point, QString oldId);
391 void emitNetworkStructureModified();
395 bool addEdge(QString sourceSerial, QString targetSerial);
396 bool removeEdge(QString sourceSerial, QString targetSerial);
404 class ControlMeasureLessThanFunctor :
405 public std::binary_function<ControlMeasure* const &,
406 ControlMeasure * const &, bool > {
408 ControlMeasureLessThanFunctor(
double(
ControlMeasure::*accessorMethod)()
const) {
409 m_accessor = accessorMethod;
411 ControlMeasureLessThanFunctor(ControlMeasureLessThanFunctor
const &other) {
412 this->m_accessor = other.m_accessor;
414 ~ControlMeasureLessThanFunctor() {}
417 ControlMeasureLessThanFunctor &
operator=(ControlMeasureLessThanFunctor
const &other);
436 Connection() : strength(0) {}
443 typedef boost::adjacency_list<boost::setS,
449 typedef Network::vertex_descriptor ImageVertex;
450 typedef Network::edge_descriptor ImageConnection;
453 typedef std::map<ImageVertex, size_t> VertexIndexMap;
456 typedef boost::associative_property_map<VertexIndexMap> VertexIndexMapAdaptor;
459 typedef boost::graph_traits<Network>::adjacency_iterator AdjacencyIterator;
460 typedef boost::graph_traits<Network>::vertex_iterator VertexIterator;
463 Network m_controlGraph;
464 QStringList *pointIds;
467 QString p_targetName;
471 QString p_description;
Q_DECLARE_METATYPE(Isis::ControlNet *)
This allows ControlNet *'s to be stored in a QVariant.
a control measurement
Definition: ControlMeasure.h:175
ModType
Control Measure Modification Types.
Definition: ControlMeasure.h:232
a control network
Definition: ControlNet.h:258
int GetNumEditLockPoints()
Returns the number of edit locked control points.
Definition: ControlNet.cpp:1376
int GetNumMeasures() const
Returns the total number of measures for all control points in the network.
Definition: ControlNet.cpp:1466
QString Description() const
Return the description of the network.
Definition: ControlNet.cpp:1266
void pointModified(ControlPoint *point, ControlPoint::ModType type, QVariant oldValue, QVariant newValue)
int getEdgeCount() const
Definition: ControlNet.cpp:1003
ControlNet(SurfacePoint::CoordinateType=SurfacePoint::Latitudinal)
Creates an empty ControlNet object.
Definition: ControlNet.cpp:60
const ControlPoint * GetPoint(QString pointId) const
Definition: ControlNet.cpp:1827
QString GraphToString() const
Used for verifying graph intergrity.
Definition: ControlNet.cpp:497
void AddPoint(ControlPoint *point)
Adds a ControlPoint to the ControlNet.
Definition: ControlNet.cpp:352
QList< QList< QString > > GetSerialConnections() const
This method searches through all the cube serial numbers in the network.
Definition: ControlNet.cpp:967
void measureModified(ControlMeasure *measure, ControlMeasure::ModType type, QVariant oldValue, QVariant newValue)
QString GetLastModified() const
Return the last modified date.
Definition: ControlNet.cpp:1530
double GetMaximumResidual()
Determine the maximum error of all points in the network.
Definition: ControlNet.cpp:1335
void networkModified(ControlNet::ModType type)
QList< QString > getAdjacentImages(QString serialNumber) const
Get all images connected to a given image by common control points.
Definition: ControlNet.cpp:1041
ControlNet & operator=(const ControlNet &other)
Assign other to this.
Definition: ControlNet.cpp:1815
QString GetNetworkId() const
Definition: ControlNet.cpp:1350
void newPoint(ControlPoint *)
friend class ControlMeasure
Definition: ControlNet.h:261
void ReadControl(const QString &filename, Progress *progress=0)
Reads in the control points from the given file.
Definition: ControlNet.cpp:271
void SetDescription(const QString &newDescription)
Set the description of the network.
Definition: ControlNet.cpp:1568
int GetNumPoints() const
Return the number of control points in the network.
Definition: ControlNet.cpp:1477
void ComputeApriori()
Compute aprior values for each point in the network.
Definition: ControlNet.cpp:1185
SurfacePoint::CoordinateType GetCoordType()
Get the control point coordinate type (see the available types in SurfacePoint.h).
Definition: ControlNet.cpp:1874
QString CreatedDate() const
Return the Created Date.
Definition: ControlNet.cpp:1256
void DecrementNumberOfRejectedMeasuresInImage(const QString &serialNumber)
Decrement number of jigsaw rejected measures in image specified by serialNumber.
Definition: ControlNet.cpp:1455
QList< ControlMeasure * > sortedMeasureList(double(ControlMeasure::*statFunc)() const, double min, double max)
Get a sorted list of all the measures that have values in a given ragen.
Definition: ControlNet.cpp:1133
void SetImages(const QString &imageListFile)
Creates the ControlNet's image cameras based on an input file.
Definition: ControlNet.cpp:1578
QString GetUserName() const
Return the user name.
Definition: ControlNet.cpp:1525
int GetNumberOfValidMeasuresInImage(const QString &serialNumber)
Return the number of measures in image specified by serialNumber.
Definition: ControlNet.cpp:1411
void pointDeleted(ControlPoint *point)
int GetNumberOfJigsawRejectedMeasuresInImage(const QString &serialNumber)
Return the number of jigsaw rejected measures in image specified by serialNumber.
Definition: ControlNet.cpp:1425
void Write(const QString &filename, bool pvl=false)
Writes out the control network.
Definition: ControlNet.cpp:311
void SetCoordType(SurfacePoint::CoordinateType coordType)
Sets the control point coordinate type.
Definition: ControlNet.cpp:861
int GetNumValidMeasures()
Return the number of valid (non-ignored) measures for all control points in the network.
Definition: ControlNet.cpp:1491
int GetNumValidPoints()
Returns the number of non-ignored control points.
Definition: ControlNet.cpp:1507
QList< QString > GetPointIds() const
Return QList of ControlPoint Ids used in hash, in order of addition.
Definition: ControlNet.cpp:1548
void SetTarget(const ControlNet &other)
int GetNumIgnoredMeasures()
Return the total number of ignored measures for all control points in the network.
Definition: ControlNet.cpp:1393
ControlPoint * FindClosest(QString serialNumber, double sample, double line)
Finds and returns a pointer to the closest ControlPoint to the ControlMeasure with the given serial n...
Definition: ControlNet.cpp:1283
void SetCreatedDate(const QString &date)
Set the creation time.
Definition: ControlNet.cpp:1558
const ControlPoint * operator[](QString id) const
Definition: ControlNet.cpp:1878
QString GetTarget() const
Return the target name.
Definition: ControlNet.cpp:1519
double AverageResidual()
Compute the average error of all points in the network.
Definition: ControlNet.cpp:1203
bool ContainsPoint(QString pointId) const
Definition: ControlNet.cpp:951
void clear()
Clear the contents of this object.
Definition: ControlNet.cpp:180
ModType
Control Point Modification Types.
Definition: ControlNet.h:275
@ Swapped
Definition: ControlNet.h:276
@ GraphModified
Definition: ControlNet.h:277
~ControlNet()
Destructor removes allocated memory.
Definition: ControlNet.cpp:133
Isis::Camera * Camera(int index)
Returns the camera list from the given image number.
Definition: ControlNet.cpp:1232
QList< ControlMeasure * > GetMeasuresInCube(QString serialNumber)
Get all the measures pertaining to a given cube serial number.
Definition: ControlNet.cpp:1065
void SetUserName(const QString &name)
Set the user name of the control network.
Definition: ControlNet.cpp:1742
QList< ControlPoint * > GetPoints()
Return QList of all the ControlPoints in the network.
Definition: ControlNet.cpp:1536
void ClearJigsawRejected()
Sets jigsaw rejected flag to false for all points and measures.
Definition: ControlNet.cpp:1435
void SetMutex(QMutex *mutex)
Set mutex to lock for making Naif calls.
Definition: ControlNet.cpp:1678
void ComputeResiduals()
Compute error for each point in the network.
Definition: ControlNet.cpp:1169
void networkStructureModified()
int DeletePoint(ControlPoint *point)
Delete a ControlPoint from the network by the point's address.
Definition: ControlNet.cpp:879
void swap(ControlNet &other)
Swaps the member data with the given control net.
Definition: ControlNet.cpp:1761
QList< QString > GetCubeSerials() const
Use this method to get a complete list of all the cube serial numbers in the network.
Definition: ControlNet.cpp:1016
void SetNetworkId(const QString &id)
Set the network id.
Definition: ControlNet.cpp:1688
void SetModifiedDate(const QString &date)
Set the last modified date.
Definition: ControlNet.cpp:1666
void newMeasure(ControlMeasure *)
void measureRemoved(ControlMeasure *)
QList< ControlMeasure * > GetValidMeasuresInCube(QString serialNumber)
Get all the valid measures pertaining to a given cube serial number.
Definition: ControlNet.cpp:1081
void IncrementNumberOfRejectedMeasuresInImage(const QString &serialNumber)
Increment number of jigsaw rejected measures in image specified by serialNumber.
Definition: ControlNet.cpp:1446
int GetNumEditLockMeasures()
Return the total number of edit locked measures for all control points in the network.
Definition: ControlNet.cpp:1361
void SetTarget(const QString &target)
Sets the target name and target radii, if available.
Definition: ControlNet.cpp:1704
QList< ControlPoint * > take()
Transfer ownership of all points to caller.
Definition: ControlNet.cpp:226
A single control point.
Definition: ControlPoint.h:356
ModType
Control Point Modification Types.
Definition: ControlPoint.h:433
Program progress reporter.
Definition: Progress.h:42
Container for cube-like labels.
Definition: Pvl.h:119
Serial Number list generator.
Definition: SerialNumberList.h:64
CoordinateType
Defines the coordinate typ, units, and coordinate index for some of the output methods.
Definition: SurfacePoint.h:139
@ Latitudinal
Planetocentric latitudinal (lat/lon/rad) coordinates.
Definition: SurfacePoint.h:140
This is free and unencumbered software released into the public domain.
Definition: ControlNet.h:32
This is free and unencumbered software released into the public domain.
Definition: BoxcarCachingAlgorithm.h:13
This is free and unencumbered software released into the public domain.
Definition: CubeIoHandler.h:22
This is free and unencumbered software released into the public domain.
Definition: Process.h:16
This is free and unencumbered software released into the public domain.
Definition: Calculator.h:18
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
QSharedPointer< ControlNet > ControlNetQsp
Typedef for QSharedPointer to control network. This typedef is for future implementation of target bo...
Definition: ControlNet.h:485
This is free and unencumbered software released into the public domain.
Definition: CubeIoHandler.h:23