29 #include <QSharedPointer> 39 #include <boost/graph/graph_traits.hpp> 40 #include <boost/graph/adjacency_list.hpp> 41 #include <boost/graph/connected_components.hpp> 46 template<
typename A,
typename B >
class QHash;
47 template<
typename T >
class QList;
48 template<
typename A,
typename B >
struct QPair;
49 template<
typename T >
class QSet;
61 class SerialNumberList;
304 void Write(
const QString &filename,
bool pvl =
false);
320 double min,
double max);
335 double sample,
double line);
360 void SetImages(
const QString &imageListFile);
395 bool ValidateSerialNumber(QString serialNumber)
const;
402 void UpdatePointReference(
ControlPoint *point, QString oldId);
403 void emitNetworkStructureModified();
407 bool addEdge(QString sourceSerial, QString targetSerial);
408 bool removeEdge(QString sourceSerial, QString targetSerial);
416 class ControlMeasureLessThanFunctor :
417 public std::binary_function<ControlMeasure* const &,
418 ControlMeasure * const &, bool > {
420 ControlMeasureLessThanFunctor(
double(
ControlMeasure::*accessorMethod)()
const) {
421 m_accessor = accessorMethod;
423 ControlMeasureLessThanFunctor(ControlMeasureLessThanFunctor
const &other) {
424 this->m_accessor = other.m_accessor;
426 ~ControlMeasureLessThanFunctor() {}
429 ControlMeasureLessThanFunctor &
operator=(ControlMeasureLessThanFunctor
const &other);
448 Connection() : strength(0) {}
455 typedef boost::adjacency_list<boost::setS,
461 typedef Network::vertex_descriptor ImageVertex;
462 typedef Network::edge_descriptor ImageConnection;
465 typedef std::map<ImageVertex, size_t> VertexIndexMap;
468 typedef boost::associative_property_map<VertexIndexMap> VertexIndexMapAdaptor;
471 typedef boost::graph_traits<Network>::adjacency_iterator AdjacencyIterator;
472 typedef boost::graph_traits<Network>::vertex_iterator VertexIterator;
475 Network m_controlGraph;
479 QString p_targetName;
483 QString p_description;
void SetTarget(const QString &target)
Sets the target name and target radii, if available.
Definition: ControlNet.cpp:1684
void ReadControl(const QString &filename, Progress *progress=0)
Reads in the control points from the given file.
Definition: ControlNet.cpp:263
void pointDeleted(ControlPoint *point)
void ClearJigsawRejected()
Sets jigsaw rejected flag to false for all points and measures.
Definition: ControlNet.cpp:1415
friend class ControlMeasure
Definition: ControlNet.h:274
void SetMutex(QMutex *mutex)
Set mutex to lock for making Naif calls.
Definition: ControlNet.cpp:1658
QSharedPointer< ControlNet > ControlNetQsp
This typedef is for future implementation of target body.
Definition: ControlNet.h:496
double GetMaximumResidual()
Determine the maximum error of all points in the network.
Definition: ControlNet.cpp:1315
ModType
Control Measure Modification Types.
Definition: ControlMeasure.h:246
void ComputeResiduals()
Compute error for each point in the network.
Definition: ControlNet.cpp:1161
int GetNumValidMeasures()
Return the number of valid (non-ignored) measures for all control points in the network.
Definition: ControlNet.cpp:1471
void pointModified(ControlPoint *point, ControlPoint::ModType type, QVariant oldValue, QVariant newValue)
void DecrementNumberOfRejectedMeasuresInImage(const QString &serialNumber)
Decrement number of jigsaw rejected measures in image specified by serialNumber.
Definition: ControlNet.cpp:1435
double AverageResidual()
Compute the average error of all points in the network.
Definition: ControlNet.cpp:1195
QString GetUserName() const
Return the user name.
Definition: ControlNet.cpp:1505
void swap(ControlNet &other)
Swaps the member data with the given control net.
Definition: ControlNet.cpp:1741
QList< QList< QString > > GetSerialConnections() const
This method searches through all the cube serial numbers in the network.
Definition: ControlNet.cpp:959
QList< ControlPoint *> GetPoints()
Return QList of all the ControlPoints in the network.
Definition: ControlNet.cpp:1516
void SetUserName(const QString &name)
Set the user name of the control network.
Definition: ControlNet.cpp:1722
QList< QString > GetPointIds() const
Return QList of ControlPoint Ids used in hash, in order of addition.
Definition: ControlNet.cpp:1528
const ControlPoint * operator[](QString id) const
Definition: ControlNet.cpp:1858
QString GetTarget() const
Return the target name.
Definition: ControlNet.cpp:1499
void SetCoordType(SurfacePoint::CoordinateType coordType)
Sets the control point coordinate type.
Definition: ControlNet.cpp:853
QString GraphToString() const
Used for verifying graph intergrity.
Definition: ControlNet.cpp:489
Planetocentric latitudinal (lat/lon/rad) coordinates.
Definition: SurfacePoint.h:156
Q_DECLARE_METATYPE(Isis::ControlNet *)
This allows ControlNet *'s to be stored in a QVariant.
int GetNumPoints() const
Return the number of control points in the network.
Definition: ControlNet.cpp:1457
QString GetNetworkId() const
Definition: ControlNet.cpp:1330
Program progress reporter.
Definition: Progress.h:58
QString Description() const
Return the description of the network.
Definition: ControlNet.cpp:1246
a control network
Definition: ControlNet.h:271
Definition: ControlNet.h:289
void clear()
Clear the contents of this object.
Definition: ControlNet.cpp:172
void newMeasure(ControlMeasure *)
int getEdgeCount() const
Definition: ControlNet.cpp:995
void SetNetworkId(const QString &id)
Set the network id.
Definition: ControlNet.cpp:1668
const ControlPoint * GetPoint(QString pointId) const
Definition: ControlNet.cpp:1807
void IncrementNumberOfRejectedMeasuresInImage(const QString &serialNumber)
Increment number of jigsaw rejected measures in image specified by serialNumber.
Definition: ControlNet.cpp:1426
int GetNumMeasures() const
Returns the total number of measures for all control points in the network.
Definition: ControlNet.cpp:1446
QList< QString > GetCubeSerials() const
Use this method to get a complete list of all the cube serial numbers in the network.
Definition: ControlNet.cpp:1008
QList< QString > getAdjacentImages(QString serialNumber) const
Get all images connected to a given image by common control points.
Definition: ControlNet.cpp:1033
int DeletePoint(ControlPoint *point)
Delete a ControlPoint from the network by the point's address.
Definition: ControlNet.cpp:871
A single control point.
Definition: ControlPoint.h:369
Definition: ControlNet.h:290
ModType
Control Point Modification Types.
Definition: ControlNet.h:288
void SetImages(const QString &imageListFile)
Creates the ControlNet's image cameras based on an input file.
Definition: ControlNet.cpp:1558
Container for cube-like labels.
Definition: Pvl.h:135
int GetNumValidPoints()
Returns the number of non-ignored control points.
Definition: ControlNet.cpp:1487
SurfacePoint::CoordinateType GetCoordType()
Get the control point coordinate type (see the available types in SurfacePoint.h).
Definition: ControlNet.cpp:1854
CoordinateType
Defines the coordinate typ, units, and coordinate index for some of the output methods.
Definition: SurfacePoint.h:155
ControlNet(SurfacePoint::CoordinateType=SurfacePoint::Latitudinal)
Creates an empty ControlNet object.
Definition: ControlNet.cpp:52
int GetNumEditLockMeasures()
Return the total number of edit locked measures for all control points in the network.
Definition: ControlNet.cpp:1341
ModType
Control Point Modification Types.
Definition: ControlPoint.h:446
QString CreatedDate() const
Return the Created Date.
Definition: ControlNet.cpp:1236
int GetNumIgnoredMeasures()
Return the total number of ignored measures for all control points in the network.
Definition: ControlNet.cpp:1373
Definition: Calculator.h:33
void newPoint(ControlPoint *)
bool ContainsPoint(QString pointId) const
Definition: ControlNet.cpp:943
void AddPoint(ControlPoint *point)
Adds a ControlPoint to the ControlNet.
Definition: ControlNet.cpp:344
void networkStructureModified()
int GetNumEditLockPoints()
Returns the number of edit locked control points.
Definition: ControlNet.cpp:1356
void SetModifiedDate(const QString &date)
Set the last modified date.
Definition: ControlNet.cpp:1646
QList< ControlMeasure *> GetMeasuresInCube(QString serialNumber)
Get all the measures pertaining to a given cube serial number.
Definition: ControlNet.cpp:1057
void measureRemoved(ControlMeasure *)
Definition: BoxcarCachingAlgorithm.h:29
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
a control measurement
Definition: ControlMeasure.h:189
void measureModified(ControlMeasure *measure, ControlMeasure::ModType type, QVariant oldValue, QVariant newValue)
int GetNumberOfJigsawRejectedMeasuresInImage(const QString &serialNumber)
Return the number of jigsaw rejected measures in image specified by serialNumber. ...
Definition: ControlNet.cpp:1405
Isis::Camera * Camera(int index)
Returns the camera list from the given image number.
Definition: ControlNet.cpp:1224
QList< ControlPoint *> take()
Transfer ownership of all points to caller.
Definition: ControlNet.cpp:218
void ComputeApriori()
Compute aprior values for each point in the network.
Definition: ControlNet.cpp:1177
void SetCreatedDate(const QString &date)
Set the creation time.
Definition: ControlNet.cpp:1538
void SetDescription(const QString &newDescription)
Set the description of the network.
Definition: ControlNet.cpp:1548
ControlNet & operator=(const ControlNet &other)
Assign other to this.
Definition: ControlNet.cpp:1795
Serial Number list generator.
Definition: SerialNumberList.h:80
Definition: CubeIoHandler.h:39
~ControlNet()
Destructor removes allocated memory.
Definition: ControlNet.cpp:125
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:1125
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:1263
void networkModified(ControlNet::ModType type)
Definition: CubeIoHandler.h:38
void Write(const QString &filename, bool pvl=false)
Writes out the control network.
Definition: ControlNet.cpp:303
int GetNumberOfValidMeasuresInImage(const QString &serialNumber)
Return the number of measures in image specified by serialNumber.
Definition: ControlNet.cpp:1391
QString GetLastModified() const
Return the last modified date.
Definition: ControlNet.cpp:1510
Definition: ControlNet.h:46
QList< ControlMeasure *> GetValidMeasuresInCube(QString serialNumber)
Get all the valid measures pertaining to a given cube serial number.
Definition: ControlNet.cpp:1073