29 #include <QSharedPointer>
34 #include "ControlNetFile.h"
38 template<
typename A,
typename B >
class QHash;
39 template<
typename T >
class QList;
40 template<
typename A,
typename B >
struct QPair;
41 template<
typename T >
class QSet;
50 class ControlCubeGraphNode;
53 class SerialNumberList;
224 void Write(
const QString &filename,
bool pvl =
false);
243 double min,
double max);
262 double sample,
double line);
265 QString GetNetworkId()
const;
286 void SetImages(
const QString &imageListFile);
309 void networkStructureModified();
319 void emitNetworkStructureModified();
334 public std::binary_function<ControlMeasure* const &,
335 ControlMeasure * const &, bool > {
338 m_accessor = accessorMethod;
341 this->m_accessor = other.m_accessor;
~ControlVertex()
Does not own any of its private data.
bool p_invalid
If the Control Network is currently invalid.
QString GetTarget() const
Return the target name.
void UpdatePointReference(ControlPoint *point, QString oldId)
Updates the key reference (poind Id) from the old one to what the point id was changet to...
Serial Number with added functionality for Control Networks.
void SetTarget(const QString &target)
Sets the target name and target radii, if available.
void ReadControl(const QString &filename, Progress *progress=0)
Reads in the control points from the given file.
Encapsulation of a vertex in a minimum spanning tree.
void ClearJigsawRejected()
Sets jigsaw rejected flag to false for all points and measures.
std::vector< Distance > GetTargetRadii()
Get the target radii.
QString p_targetName
Name of the target.
void SetMutex(QMutex *mutex)
Set mutex to lock for making Naif calls.
QSharedPointer< ControlNet > ControlNetQsp
This typedef is for future implementation of target body.
bool ContainsPoint(QString pointId) const
double GetMaximumResidual()
Determine the maximum error of all points in the network.
void ComputeResiduals()
Compute error for each point in the network.
std::vector< Distance > p_targetRadii
Radii of target body.
int GetNumValidMeasures()
Return the number of valid (non-ignored) measures for all control points in the network.
QString Description() const
Return the description of the network.
QString p_description
Textual Description of network.
static void join(ControlVertex *v1, ControlVertex *v2)
Join two nodes by setting one root to be the other's parent.
QList< ControlMeasure * > GetMeasuresInCube(QString serialNumber)
Get all the measures pertaining to a given cube serial number.
void DecrementNumberOfRejectedMeasuresInImage(const QString &serialNumber)
Decrement number of jigsaw rejected measures in image specified by serialNumber.
double AverageResidual()
Compute the average error of all points in the network.
int GetNumMeasures() const
Returns the total number of measures for all control points in the network.
QList< QList< ControlCubeGraphNode * > > GetNodeConnections() const
This method searches through all the cube serial numbers in the network.
ControlPoint * getPoint()
Get the point representation of this vertex.
bool m_ownPoints
Specifies ownership of point list. True if owned by this object.
std::vector< Isis::Camera * > p_cameraList
Vector of image number to camera.
QSet< ControlMeasure * > MinimumSpanningTree(QList< ControlCubeGraphNode * > &island, bool lessThan(const ControlMeasure *, const ControlMeasure *)) const
This method uses Kruskal's Algorithm to construct a minimum spanning tree of the given island...
void swap(ControlNet &other)
Swaps the member data with the given control net.
QString p_networkId
The Network Id.
void SetUserName(const QString &name)
Set the user name of the control network.
void setParent(ControlVertex *v)
Set the parent vertex, removing the root node status.
Q_DECLARE_METATYPE(Isis::Cube *)
This allows Cube *'s to be stored in a QVariant.
QList< ControlPoint * > GetPoints()
Return QList of ControlPoints ordered by point ID.
int GetNumPoints() const
Return the number of control points in the network.
QString GetUserName() const
Return the user name.
ControlVertex * m_parent
The possibly non-existant parent vertex.
QList< ControlCubeGraphNode * > GetCubeGraphNodes()
void measureDeleted(ControlMeasure *measure)
Updates the ControlCubeGraphNode for this measure's serial number to reflect the deletion.
QString p_created
Creation Date.
QList< ControlCubeGraphNode * > RandomBFS(QList< ControlCubeGraphNode * > list) const
Random breadth-first search.
void measureAdded(ControlMeasure *measure)
Updates the ControlCubeGraphNode for the measure's serial number to reflect the addition.
void ValidateSerialNumber(QString serialNumber) const
Does a check to ensure that the given serial number is contained within the network.
Program progress reporter.
QString p_userName
The user who created the network.
ControlCubeGraphNode * getNode()
Get the node representation of this vertex.
ControlVertex(ControlPoint *point)
Construct a vertex from a Control Point.
std::map< QString, int > p_cameraValidMeasuresMap
A map from serialnumber to #measures.
void clear()
Clear the contents of this object.
void DeleteMeasuresWithId(QString serialNumber)
Essentially removes a cube from the networkid.
void SetNetworkId(const QString &id)
Set the network id.
void IncrementNumberOfRejectedMeasuresInImage(const QString &serialNumber)
Increment number of jigsaw rejected measures in image specified by serialNumber.
QList< ControlPoint * > take()
Transfer ownership of all points to caller.
std::map< QString, int > p_cameraRejectedMeasuresMap
A map from serialnumber to #rejected measures ...
int DeletePoint(ControlPoint *point)
Delete a ControlPoint from the network by the point's address.
ControlVertex(ControlCubeGraphNode *node)
Construct a vertex from a Graph Node.
QList< QList< QString > > GetSerialConnections() const
This method searches through all the cube serial numbers in the network.
ControlVertex * getRoot()
Get the root node, or greatest ancestor.
ControlVertex * getParent()
Get the parent node. A root node has no parent.
void SetImages(const QString &imageListFile)
Creates the ControlNet's image cameras based on an input file.
Container for cube-like labels.
QHash< QString, ControlPoint * > * points
hash ControlPoints by ControlPoint Id
int GetNumValidPoints()
Returns the number of non-ignored control points.
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.
int GetNumEditLockMeasures()
Return the total number of edit locked measures for all control points in the network.
int GetNumIgnoredMeasures()
Return the total number of ignored measures for all control points in the network.
void AddPoint(ControlPoint *point)
Adds a ControlPoint to the ControlNet.
int GetNumEditLockPoints()
Returns the number of edit locked control points.
void SetModifiedDate(const QString &date)
Set the last modified date.
bool operator()(ControlMeasure *const &, ControlMeasure *const &)
The () operator for the Control Measure less than functor.
ControlPoint * m_point
The possibly non-existant control point.
ControlCubeGraphNode * m_node
The possibly non-existant graph node.
QString CubeGraphToString() const
Used for verifying graph intergrity.
int GetNumberOfJigsawRejectedMeasuresInImage(const QString &serialNumber)
Return the number of jigsaw rejected measures in image specified by serialNumber. ...
Isis::Camera * Camera(int index)
Returns the camera list from the given image number.
QString CreatedDate() const
Return the Created Date.
void ComputeApriori()
Compute aprior values for each point in the network.
ControlMeasureLessThanFunctor & operator=(ControlMeasureLessThanFunctor const &other)
Copies the content of the a ControlMeasureLessThanFunctor.
void SetCreatedDate(const QString &date)
Set the creation time.
void SetDescription(const QString &newDescription)
Set the description of the network.
void Shuffle(QList< ControlCubeGraphNode * > &list) const
Shuffles the QStrings in a QList< QString >
QList< QString > GetPointIds() const
Return QList of ControlPoint Ids used in hash, in order of addition.
ControlNet()
Creates an empty ControlNet object.
ControlNet & operator=(const ControlNet &other)
Assign other to this.
QString p_modified
Date Last Modified.
Serial Number list generator.
~ControlNet()
Destructor removes allocated memory.
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...
std::map< QString, Isis::Camera * > p_cameraMap
A map from serialnumber to camera.
void measureUnIgnored(ControlMeasure *measure)
Updates the connections for the ControlCubeGraphNode associated with the measure's serial number to r...
QHash< QString, ControlCubeGraphNode * > * cubeGraphNodes
hash ControlCubeGraphNodes by CubeSerialNumber
void Write(const QString &filename, bool pvl=false)
Writes out the control network.
QList< QString > GetCubeSerials() const
Use this method to get a complete list of all the cube serial numbers in the network.
QPair< int, int > CalcBWAndCE(QList< QString > serials) const
Calculate the band width and critical edges needed by the adjacency matrix that could store cube conn...
int GetNumberOfValidMeasuresInImage(const QString &serialNumber)
Return the number of measures in image specified by serialNumber.
bool IsValid() const
Return if the control point is invalid.