17#include <QMutexLocker>
19#include <QScopedPointer>
26#include <boost/numeric/ublas/symmetric.hpp>
27#include <boost/numeric/ublas/io.hpp>
29#include "Application.h"
30#include "CameraFactory.h"
31#include "ControlMeasure.h"
32#include "ControlNetVersioner.h"
33#include "ControlPoint.h"
36#include "IException.h"
39#include "SerialNumberList.h"
40#include "SpecialPixel.h"
41#include "Statistics.h"
45using namespace boost::numeric::ublas;
50 void ControlNet::nullify() {
64 points =
new QHash< QString, ControlPoint * >;
77 points =
new QHash< QString, ControlPoint * >;
80 for (
int cpIndex = 0; cpIndex < other.GetNumPoints(); cpIndex++) {
110 points =
new QHash< QString, ControlPoint * >;
120 QString msg =
"Invalid control network [" + ptfile +
"]";
152 emit measureModified(measure, type, oldValue, newValue);
166 emit pointModified(point, type, oldValue, newValue);
184 QHashIterator<QString, ControlPoint*> i(*
points);
185 while (i.hasNext()) {
187 delete(*points)[i.key()];
188 (*points)[i.key()] = NULL;
237 for (
int i = 0; i <
points.size(); i++) {
238 points[i]->parentNetwork = NULL;
273 SetTarget( versionedReader.targetName() );
276 p_created = versionedReader.creationDate();
277 p_modified = versionedReader.lastModificationDate();
280 int numPoints = versionedReader.numPoints();
283 progress->
SetText(
"Adding Control Points to Network...");
288 for (
int i = 0; i < numPoints; i++) {
289 AddPoint( versionedReader.takeFirstPoint() );
315 network = versionedWriter.toPvl();
318 QString msg =
"Failed to convert control network to Pvl format.";
323 network.write(ptfile);
326 QString msg =
"Failed writing control network to file [" + ptfile +
"]";
332 versionedWriter.write(
FileName(ptfile));
335 QString msg =
"Failed writing control network to file [" + ptfile +
"]";
352 IString msg =
"Null pointer passed to ControlNet::AddPoint!";
357 IString msg =
"ControlPoint must have unique Id";
361 QString pointId = point->
GetId();
362 points->insert(pointId, point);
365 point->parentNetwork =
this;
370 emit networkStructureModified();
384 IString msg =
"NULL point passed to "
385 "ControlNet::pointAdded!";
390 QString msg =
"ControlNet does not contain the point [";
391 msg += point->
GetId() +
"]";
396 for (
int i = 0; i < point->GetNumMeasures(); i++) {
397 QString sn = point->
GetMeasure(i)->GetCubeSerialNumber();
399 if (!m_vertexMap.contains(sn)) {
401 newImage.serial = sn;
402 ImageVertex newVertex = boost::add_vertex(newImage,
m_controlGraph);
403 m_vertexMap.insert(sn, newVertex);
404 emit networkModified(GraphModified);
408 QList< ControlMeasure * > measures = point->
getMeasures();
409 for(
int i = 0; i < measures.size(); i++) {
412 QString serial = measure->GetCubeSerialNumber();
413 m_controlGraph[m_vertexMap[serial]].measures[measure->Parent()] = measure;
417 if (!point->IsIgnored() && !measure->IsIgnored()) {
418 for (
int j = i + 1; j < measures.size(); j++) {
420 if (!cm->IsIgnored()) {
421 QString sn = cm->GetCubeSerialNumber();
427 emit newPoint(point);
447 boost::tie(connection, edgeAdded) = boost::add_edge(m_vertexMap[sourceSerial],
448 m_vertexMap[targetSerial],
452 emit networkModified(GraphModified);
472 boost::tie(connection, edgeExists) = boost::edge(m_vertexMap[sourceSerial],
473 m_vertexMap[targetSerial],
478 boost::remove_edge(m_vertexMap[sourceSerial],
479 m_vertexMap[targetSerial],
481 emit networkModified(GraphModified);
501 QHash<QString, QStringList> imagePointIds;
503 foreach(QString imageSerial, images) {
504 QList<ControlPoint *> imagePoints =
m_controlGraph[m_vertexMap[imageSerial]].measures.keys();
507 if (!point->IsIgnored()) {
512 imagePointIds.insert(imageSerial,
pointIds);
515 foreach(QString imageSerial, images) {
517 adjacentImages.sort();
518 foreach(QString adjacentSerial, adjacentImages) {
519 if (QString::compare(adjacentSerial, imageSerial) < 0) {
526 while (imageIt != imagePointIds[imageSerial].cend() &&
527 adjacentIt != imagePointIds[adjacentSerial].cend()) {
528 int stringDiff = QString::compare(*imageIt, *adjacentIt);
529 if (stringDiff < 0) {
532 else if(stringDiff == 0) {
533 commonPoints.append(*imageIt);
542 std::pair<ImageConnection, bool> result = boost::edge(m_vertexMap[imageSerial],
543 m_vertexMap[adjacentSerial],
545 QString edgeStrength =
"UNKNOWN";
550 graphString.append(imageSerial);
551 graphString.append(
" ----(");
552 graphString.append(edgeStrength);
553 graphString.append(
") [");
554 graphString.append(commonPoints.join(
","));
555 graphString.append(
"]---- ");
556 graphString.append(adjacentSerial);
557 graphString.append(
"\n");
580 IString msg =
"NULL measure passed to "
581 "ControlNet::measureAdded!";
587 IString msg =
"Control measure with NULL parent passed to "
588 "ControlNet::measureAdded!";
593 QString msg =
"ControlNet does not contain the point [";
594 msg += point->
GetId() +
"]";
598 QString serial = measure->GetCubeSerialNumber();
601 if (!m_vertexMap.contains(serial)) {
603 newImage.serial = serial;
604 ImageVertex newVertex = boost::add_vertex(newImage,
m_controlGraph);
605 m_vertexMap.insert(serial, newVertex);
606 emit networkModified(GraphModified);
609 m_controlGraph[m_vertexMap[serial]].measures[measure->Parent()] = measure;
613 if (!point->IsIgnored() && !measure->IsIgnored()) {
614 for (
int i = 0; i < point->GetNumMeasures(); i++) {
616 if (!cm->IsIgnored()) {
617 QString sn = cm->GetCubeSerialNumber();
620 if (QString::compare(sn, serial) != 0) {
626 emit newMeasure(measure);
637 IString msg =
"NULL point passed to "
638 "ControlNet::pointUnIgnored!";
642 QList< ControlMeasure * > validMeasures = point->
getMeasures(
true);
644 for (
int i = 0; i < validMeasures.size(); i++) {
646 QString sourceSerial = sourceMeasure->GetCubeSerialNumber();
649 QString msg =
"Node does not exist for [";
650 msg += sourceSerial +
"]";
654 for(
int j = i+1; j < validMeasures.size(); j++) {
656 QString targetSerial = targetMeasure->GetCubeSerialNumber();
659 QString msg =
"Node does not exist for [";
660 msg += targetSerial +
"]";
663 addEdge(sourceSerial, targetSerial);
683 IString msg =
"NULL measure passed to "
684 "ControlNet::measureUnIgnored!";
690 IString msg =
"Control measure with NULL parent passed to "
691 "ControlNet::measureUnIgnored!";
696 QString msg =
"ControlNet does not contain the point [";
697 msg += point->
GetId() +
"]";
702 for (
int i = 0; i < point->GetNumMeasures(); i++) {
704 QString sn = adjacentMeasure->GetCubeSerialNumber();
705 if (!adjacentMeasure->IsIgnored() && !m_vertexMap.contains(sn)) {
706 QString msg =
"Node does not exist for [";
707 msg += measure->GetCubeSerialNumber() +
"]";
712 if (!point->IsIgnored()) {
713 QString serial = measure->GetCubeSerialNumber();
717 for (
int i = 0; i < point->GetNumMeasures(); i++) {
719 if (!cm->IsIgnored()) {
720 QString sn = cm->GetCubeSerialNumber();
722 if (QString::compare(sn, serial) != 0) {
741 (*points)[point->
GetId()] = point;
742 (*pointIds)[
pointIds->indexOf((QString) oldId)] = (QString)point->
GetId();
753 QString serial = measure->GetCubeSerialNumber();
755 emit measureRemoved(measure);
758 if (!measure->IsIgnored() && !measure->Parent()->IsIgnored()) {
766 m_controlGraph[m_vertexMap[serial]].measures.remove(measure->Parent());
777 IString msg =
"NULL point passed to "
778 "ControlNet::pointIgnored!";
782 QList< ControlMeasure * > validMeasures = point->
getMeasures(
true);
784 for (
int i = 0; i < validMeasures.size(); i++) {
786 QString sourceSerial = sourceMeasure->GetCubeSerialNumber();
789 QString msg =
"Node does not exist for [";
790 msg += sourceSerial +
"]";
794 for(
int j = i+1; j < validMeasures.size(); j++) {
796 QString targetSerial = targetMeasure->GetCubeSerialNumber();
799 QString msg =
"Node does not exist for [";
800 msg += targetSerial +
"]";
819 IString msg =
"NULL measure passed to "
820 "ControlNet::measureIgnored!";
826 IString msg =
"Control measure with NULL parent passed to "
827 "ControlNet::measureIgnored!";
831 QString serial = measure->GetCubeSerialNumber();
833 QString msg =
"Node does not exist for [";
840 for (
int i = 0; i < point->GetNumMeasures(); i++) {
842 QString sn = adjacentMeasure->GetCubeSerialNumber();
843 if (!adjacentMeasure->IsIgnored() && m_vertexMap.contains(sn)) {
844 if (QString::compare(serial, sn) !=0) {
866 emit networkStructureModified();
876 if (
points->values().contains(point)) {
882 msg +=
"] does not exist in the network";
896 if (!
points->contains(pointId)) {
897 IString msg =
"point Id [" + pointId +
"] does not exist in the network";
903 if (point->IsEditLocked())
906 bool wasIgnored = point->IsIgnored();
913 emit pointDeleted(point);
922 emit networkStructureModified();
933 if (index < 0 || index >=
pointIds->size()) {
948 return points->contains(pointId);
969 QList< QString> serials = m_vertexMap.keys();
970 for (
int i = 0; i < serials.size(); i++) {
971 boost::put(indexMapAdaptor, m_vertexMap[serials[i]], i);
976 int numComponents = boost::connected_components(
m_controlGraph, componentAdaptor,
977 boost::vertex_index_map(indexMapAdaptor));
979 QList< QList< QString > > islandStrings;
980 for (
int i = 0; i < numComponents; i++) {
981 QList<QString> tempList;
982 islandStrings.append(tempList);
984 std::map<ImageVertex, size_t>::iterator it = componentMap.begin();
985 while(it != componentMap.end())
988 int group = (int) it->second;
989 islandStrings[group].append(serial);
992 return islandStrings;
1013 return m_vertexMap.keys();
1026 return m_vertexMap.contains(serialNumber);
1039 QString msg =
"Cube Serial Number [" + serialNumber +
"] not found in "
1047 boost::tie(adjIt, adjEnd) = boost::adjacent_vertices(m_vertexMap[serialNumber],
m_controlGraph);
1048 for( ; adjIt != adjEnd; adjIt++) {
1052 return adjacentSerials;
1063 IString msg =
"Cube Serial Number [" + serialNumber +
"] not found in "
1068 return m_controlGraph[m_vertexMap[serialNumber]].measures.values();
1078 QList< ControlMeasure * > validMeasures;
1084 if (!measure->IsIgnored())
1085 validMeasures.append(measure);
1088 return validMeasures;
1100 if (
this != &other) {
1101 this->m_accessor = other.m_accessor;
1114 bool ControlNet::ControlMeasureLessThanFunctor::operator()
1117 return (a->*this->m_accessor)() < (b->*this->m_accessor)();
1130 double min,double max) {
1132 QList< ControlMeasure * >measures;
1137 for (
int i=0;i<nObjPts;i++) {
1139 if (point->IsIgnored())
continue;
1142 int nObs = point->GetNumMeasures();
1143 for (
int j=0;j<nObs;j++) {
1145 if (measure->IsIgnored())
continue;
1146 double temp = (measure->*statFunc)();
1148 if (min <= temp && temp <= max) measures.push_back(measure);
1154 std::sort(measures.begin(),measures.end(),lessThan);
1168 QHashIterator< QString, ControlPoint * > i(*
points);
1169 while (i.hasNext()) {
1171 i.value()->ComputeResiduals();
1183 QHashIterator< QString, ControlPoint * > i(*
points);
1184 while (i.hasNext()) {
1187 if ( !point->IsIgnored() )
1201 double avgResidual = 0.0;
1203 QHashIterator< QString, ControlPoint * > i(*
points);
1204 while (i.hasNext()) {
1207 if (!point->IsIgnored()) {
1215 avgResidual /= count;
1280 double sample,
double line) {
1283 QString msg =
"serialNumber [";
1284 msg += serialNumber;
1285 msg +=
"] not found in ControlNet";
1289 const double SEARCH_DISTANCE = 99999999.0;
1290 double minDist = SEARCH_DISTANCE;
1293 QList < ControlMeasure * > measures =
m_controlGraph[m_vertexMap[serialNumber]].measures.values();
1295 for (
int i = 0; i < measures.size(); i++) {
1299 double dx = fabs(sample - measureToCheck->GetSample());
1300 double dy = fabs(line - measureToCheck->GetLine());
1302 double dist = sqrt((dx * dx) + (dy * dy));
1304 if (dist < minDist) {
1306 closestPoint = measureToCheck->Parent();
1310 if (!closestPoint) {
1311 IString msg =
"No point found within ";
1312 msg +=
IString(SEARCH_DISTANCE);
1313 msg +=
"pixels of sample/line [";
1321 return closestPoint;
1334 double maxResidual = 0.0;
1336 double residual = p->GetStatistic(
1338 if (residual > maxResidual)
1339 maxResidual = residual;
1346 QString ControlNet::GetNetworkId()
const {
1358 int numLockedMeasures = 0;
1360 numLockedMeasures += p->GetNumLockedMeasures();
1363 return numLockedMeasures;
1373 int editLockPoints = 0;
1375 if (p->IsEditLocked())
1379 return editLockPoints;
1390 int numIgnoredMeasures = 0;
1392 numIgnoredMeasures += p->GetNumMeasures() - p->GetNumValidMeasures();
1395 return numIgnoredMeasures;
1433 p->ClearJigsawRejected();
1463 int numMeasures = 0;
1465 numMeasures += p->GetNumMeasures();
1488 int numValidMeasures = 0;
1490 if (!p->IsIgnored())
1491 numValidMeasures += p->GetNumValidMeasures();
1494 return numValidMeasures;
1504 int validPoints = 0;
1506 if (!p->IsIgnored())
1533 QList< ControlPoint * > pointsList;
1535 for (
int i = 0; i <
pointIds->size(); i++) {
1536 pointsList.append(GetPoint(i));
1601 if (progress != NULL) {
1602 progress->
SetText(
"Setting input images...");
1607 for (
int i = 0; i < list.
size(); i++) {
1609 QString filename = list.
fileName(i);
1610 Cube cube(filename,
"r");
1620 QString msg =
"Unable to create camera for cube file ";
1625 if (progress != NULL)
1630 QHashIterator< QString, ControlPoint * > p(*
points);
1631 while (p.hasNext()) {
1636 for (
int m = 0; m < serialNums.size(); m++) {
1647 IString msg =
"Control point [" + curPoint->GetId() +
1648 "], measure [" + curMeasure->GetCubeSerialNumber() +
1649 "] does not have a cube with a matching serial number";
1719 if (mapping.hasKeyword(
"TargetName")) {
1723 && label.
findObject(
"IsisCube").hasGroup(
"Instrument")
1724 && label.
findObject(
"IsisCube").findGroup(
"Instrument").hasKeyword(
"TargetName")) {
1758 std::swap(
points, other.points);
1759 std::swap(
pointIds, other.pointIds);
1761 std::swap(m_mutex, other.m_mutex);
1774 QHashIterator< QString, ControlPoint * > i(*
points);
1775 while (i.hasNext()) {
1776 i.next().value()->parentNetwork =
this;
1779 QHashIterator< QString, ControlPoint * > i2(*other.points);
1780 while (i2.hasNext()) {
1781 i2.next().value()->parentNetwork = &other;
1784 m_vertexMap.clear();
1785 VertexIterator v, vend;
1786 for (boost::tie(v, vend) = vertices(
m_controlGraph); v != vend; ++v) {
1787 ImageVertex imVertex = *v;
1789 m_vertexMap[serialNum] = imVertex;
1792 other.m_vertexMap.clear();
1793 VertexIterator v2, vend2;
1794 for (boost::tie(v2, vend2) = vertices(other.m_controlGraph); v2 != vend2; ++v2) {
1795 ImageVertex imVertex = *v2;
1796 QString serialNum = other.m_controlGraph[*v2].serial;
1797 other.m_vertexMap[serialNum] = imVertex;
1800 emit networkModified(ControlNet::Swapped);
1813 if (
this != &other) {
1823 const ControlPoint *ControlNet::GetPoint(QString
id)
const {
1824 if (!
points->contains(
id)) {
1825 IString msg =
"The control network has no control points with an ID "
1826 "equal to [" +
id +
"]";
1830 return points->value(
id);
1834 ControlPoint *ControlNet::GetPoint(QString
id) {
1835 if (!
points->contains(
id)) {
1836 IString msg =
"The control network has no control points with an ID "
1837 "equal to [" +
id +
"]";
1845 const ControlPoint *ControlNet::GetPoint(
int index)
const {
1846 if (index < 0 || index >=
pointIds->size()) {
1847 IString msg =
"Index [" + IString(index) +
"] out of range";
1851 return GetPoint(
pointIds->at(index));
1855 ControlPoint *ControlNet::GetPoint(
int index) {
1856 if (index < 0 || index >=
pointIds->size()) {
1857 IString msg =
"Index [" + IString(index) +
"] out of range";
1861 return GetPoint(
pointIds->at(index));
1874 const ControlPoint *ControlNet::operator[](QString
id)
const {
1875 return GetPoint(
id);
1879 ControlPoint *ControlNet::operator[](QString
id) {
1880 return GetPoint(
id);
1884 const ControlPoint *ControlNet::operator[](
int index)
const {
1885 return GetPoint(index);
1889 ControlPoint *ControlNet::operator[](
int index) {
1890 return GetPoint(index);
static QString DateTime(time_t *curtime=0)
Returns the date and time as a QString.
static Camera * Create(Cube &cube)
Creates a Camera object using Pvl Specifications.
QString GetCubeSerialNumber() const
Return the serial number of the cube containing the coordinate.
ModType
Control Measure Modification Types.
double GetResidualMagnitude() const
Return Residual magnitude.
ControlMeasureLessThanFunctor & operator=(ControlMeasureLessThanFunctor const &other)
Copies the content of the a ControlMeasureLessThanFunctor.
int GetNumEditLockPoints()
Returns the number of edit locked control points.
int GetNumMeasures() const
Returns the total number of measures for all control points in the network.
QString Description() const
Return the description of the network.
void pointIgnored(ControlPoint *point)
Update the ControlNet's internal structure when a ControlPoint is ignored.
ControlNet(SurfacePoint::CoordinateType=SurfacePoint::Latitudinal)
Creates an empty ControlNet object.
QString GraphToString() const
Used for verifying graph intergrity.
void AddPoint(ControlPoint *point)
Adds a ControlPoint to the ControlNet.
QList< QList< QString > > GetSerialConnections() const
This method searches through all the cube serial numbers in the network.
QString GetLastModified() const
Return the last modified date.
double GetMaximumResidual()
Determine the maximum error of all points in the network.
QList< QString > getAdjacentImages(QString serialNumber) const
Get all images connected to a given image by common control points.
ControlNet & operator=(const ControlNet &other)
Assign other to this.
void ReadControl(const QString &filename, Progress *progress=0)
Reads in the control points from the given file.
void SetDescription(const QString &newDescription)
Set the description of the network.
SurfacePoint::CoordinateType m_coordType
The coordinate type of the control points.
int GetNumPoints() const
Return the number of control points in the network.
QString p_targetName
Name of the target.
QString p_description
Textual Description of network.
QMap< QString, int > p_cameraRejectedMeasuresMap
A map from serialnumber to #rejected measures.
QStringList * pointIds
The ControlNet graph.
QString p_modified
Date Last Modified.
void ComputeApriori()
Compute aprior values for each point in the network.
SurfacePoint::CoordinateType GetCoordType()
Get the control point coordinate type (see the available types in SurfacePoint.h).
QString CreatedDate() const
Return the Created Date.
void emitPointModified(ControlPoint *point, ControlPoint::ModType type, QVariant oldValue, QVariant newValue)
This method is a wrapper to emit the pointModified() signal and is called whenever a change is made t...
void DecrementNumberOfRejectedMeasuresInImage(const QString &serialNumber)
Decrement number of jigsaw rejected measures in image specified by serialNumber.
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.
void measureUnIgnored(ControlMeasure *measure)
Updates the connections for the ControlNet graph associated with the measure's serial number to refle...
QHash< QString, ControlPoint * > * points
hash ControlPoints by ControlPoint Id
void SetImages(const QString &imageListFile)
Creates the ControlNet's image cameras based on an input file.
QString GetUserName() const
Return the user name.
QMap< QString, int > p_cameraValidMeasuresMap
A map from serialnumber to #measures.
int GetNumberOfValidMeasuresInImage(const QString &serialNumber)
Return the number of measures in image specified by serialNumber.
Network m_controlGraph
The serial number -> vertex hash used by the graph.
int GetNumberOfJigsawRejectedMeasuresInImage(const QString &serialNumber)
Return the number of jigsaw rejected measures in image specified by serialNumber.
void Write(const QString &filename, bool pvl=false)
Writes out the control network.
void SetCoordType(SurfacePoint::CoordinateType coordType)
Sets the control point coordinate type.
void emitNetworkStructureModified()
This method is a wrapper to emit the networkStructureModified() signal.
int GetNumValidMeasures()
Return the number of valid (non-ignored) measures for all control points in the network.
std::map< ImageVertex, size_t > VertexIndexMap
Represents the edges of the graph.
int GetNumValidPoints()
Returns the number of non-ignored control points.
Network::edge_descriptor ImageConnection
Reprents the verticies of the graph.
void pointAdded(ControlPoint *point)
Adds a whole point to the control net graph.
void measureAdded(ControlMeasure *measure)
Updates the ControlNet graph for the measure's serial number to reflect the addition.
QVector< Isis::Camera * > p_cameraList
Vector of image number to camera.
QList< QString > GetPointIds() const
Return QList of ControlPoint Ids used in hash, in order of addition.
int GetNumIgnoredMeasures()
Return the total number of ignored measures for all control points in the network.
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...
void SetCreatedDate(const QString &date)
Set the creation time.
QString GetTarget() const
Return the target name.
double AverageResidual()
Compute the average error of all points in the network.
QMap< QString, Isis::Camera * > p_cameraMap
A map from serialnumber to camera.
bool ContainsPoint(QString pointId) const
void clear()
Clear the contents of this object.
QString p_created
Creation Date.
boost::associative_property_map< VertexIndexMap > VertexIndexMapAdaptor
Converts VertexIndexMap into the appropriate form to be used by boost.
~ControlNet()
Destructor removes allocated memory.
Isis::Camera * Camera(int index)
Returns the camera list from the given image number.
bool m_ownPoints
Specifies ownership of point list. True if owned by this object.
QList< ControlMeasure * > GetMeasuresInCube(QString serialNumber)
Get all the measures pertaining to a given cube serial number.
void SetUserName(const QString &name)
Set the user name of the control network.
QString p_networkId
The Network Id.
QList< ControlPoint * > GetPoints()
Return QList of all the ControlPoints in the network.
void ClearJigsawRejected()
Sets jigsaw rejected flag to false for all points and measures.
void SetMutex(QMutex *mutex)
Set mutex to lock for making Naif calls.
void UpdatePointReference(ControlPoint *point, QString oldId)
Updates the key reference (poind Id) from the old one to what the point id was changet to.
void measureDeleted(ControlMeasure *measure)
Updates the node for this measure's serial number to reflect the deletion.
boost::graph_traits< Network >::adjacency_iterator AdjacencyIterator
Iterates over adjacent verticies.
void emitMeasureModified(ControlMeasure *measure, ControlMeasure::ModType type, QVariant oldValue, QVariant newValue)
This method is a wrapper to emit the measureModified() signal and is called whenever a change is made...
void ComputeResiduals()
Compute error for each point in the network.
bool removeEdge(QString sourceSerial, QString targetSerial)
In the ControlNet graph, decrements the strength on the edge between the two serial numbers.
int DeletePoint(ControlPoint *point)
Delete a ControlPoint from the network by the point's address.
void pointUnIgnored(ControlPoint *point)
Update the ControlNet's internal structure when a ControlPoint is un-ignored.
void swap(ControlNet &other)
Swaps the member data with the given control net.
bool addEdge(QString sourceSerial, QString targetSerial)
In the ControlNet graph: adds an edge between the verticies associated with the two serial numbers pr...
QList< QString > GetCubeSerials() const
Use this method to get a complete list of all the cube serial numbers in the network.
void SetNetworkId(const QString &id)
Set the network id.
QString p_userName
The user who created the network.
void SetModifiedDate(const QString &date)
Set the last modified date.
QList< ControlMeasure * > GetValidMeasuresInCube(QString serialNumber)
Get all the valid measures pertaining to a given cube serial number.
void IncrementNumberOfRejectedMeasuresInImage(const QString &serialNumber)
Increment number of jigsaw rejected measures in image specified by serialNumber.
int GetNumEditLockMeasures()
Return the total number of edit locked measures for all control points in the network.
void SetTarget(const QString &target)
Sets the target name and target radii, if available.
void measureIgnored(ControlMeasure *measure)
Updates the edges in the ControlNet graph to reflect the ignored measure.
QList< ControlPoint * > take()
Transfer ownership of all points to caller.
bool ValidateSerialNumber(QString serialNumber) const
Does a check to ensure that the given serial number is contained within the network.
Handle various control network file format versions.
@ PointLocked
This is returned when the operation requires Edit Lock to be false but it is currently true.
@ Success
This is returned when the operation successfully took effect.
ModType
Control Point Modification Types.
int Delete(ControlMeasure *measure)
Remove a measurement from the control point, deleting reference measure is allowed.
const ControlMeasure * GetMeasure(QString serialNumber) const
Get a control measure based on its cube's serial number.
Statistics GetStatistic(double(ControlMeasure::*statFunc)() const) const
This function will call a given method on every control measure that this point has.
QString GetId() const
Return the Id of the control point.
QList< ControlMeasure * > getMeasures(bool excludeIgnored=false) const
Status ComputeApriori()
Computes a priori lat/lon/radius point coordinates by determining the average lat/lon/radius of all m...
IO Handler for Isis Cubes.
File name manipulation and expansion.
@ Unknown
A type of error that cannot be classified as any of the other error types.
@ User
A type of error that could only have occurred due to a mistake on the user's part (e....
@ Programmer
This error is for when a programmer made an API call that was illegal.
@ Io
A type of error that occurred when performing an actual I/O operation.
Adds specific functionality to C++ strings.
Program progress reporter.
void SetMaximumSteps(const int steps)
This sets the maximum number of steps in the process.
void SetText(const QString &text)
Changes the value of the text string reported just before 0% processed.
void CheckStatus()
Checks and updates the status.
Contains multiple PvlContainers.
Container for cube-like labels.
bool hasObject(const QString &name) const
Returns a boolean value based on whether the object exists in the current PvlObject or not.
PvlObjectIterator findObject(const QString &name, PvlObjectIterator beg, PvlObjectIterator end)
Find the index of object with a specified name, between two indexes.
bool hasGroup(const QString &name) const
Returns a boolean value based on whether the object has the specified group or not.
@ Traverse
Search child objects.
PvlGroupIterator findGroup(const QString &name, PvlGroupIterator beg, PvlGroupIterator end)
Find a group with the specified name, within these indexes.
Serial Number list generator.
bool hasSerialNumber(QString sn)
Determines whether or not the requested serial number exists in the list.
QString serialNumber(const QString &filename)
Return a serial number given a filename.
int size() const
How many serial number / filename combos are in the list.
QString fileName(const QString &sn)
Return a filename given a serial number.
double Average() const
Computes and returns the average.
CoordinateType
Defines the coordinate typ, units, and coordinate index for some of the output methods.
This is free and unencumbered software released into the public domain.
This is free and unencumbered software released into the public domain.
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Namespace for the standard library.
Used to define the verticies of the graph.