|
Isis Developer Reference
|
Go to the documentation of this file.
15 #include <QSharedPointer>
25 #include <boost/graph/graph_traits.hpp>
26 #include <boost/graph/adjacency_list.hpp>
27 #include <boost/graph/connected_components.hpp>
32 template<
typename A,
typename B >
class QHash;
33 template<
typename T >
class QList;
34 template<
typename A,
typename B >
struct QPair;
35 template<
typename T >
class QSet;
47 class SerialNumberList;
290 void Write(
const QString &filename,
bool pvl =
false);
306 double min,
double max);
321 double sample,
double line);
346 void SetImages(
const QString &imageListFile);
381 bool ValidateSerialNumber(QString serialNumber)
const;
388 void UpdatePointReference(
ControlPoint *point, QString oldId);
389 void emitNetworkStructureModified();
393 bool addEdge(QString sourceSerial, QString targetSerial);
394 bool removeEdge(QString sourceSerial, QString targetSerial);
402 class ControlMeasureLessThanFunctor :
403 public std::binary_function<ControlMeasure* const &,
404 ControlMeasure * const &, bool > {
406 ControlMeasureLessThanFunctor(
double(
ControlMeasure::*accessorMethod)()
const) {
407 m_accessor = accessorMethod;
409 ControlMeasureLessThanFunctor(ControlMeasureLessThanFunctor
const &other) {
410 this->m_accessor = other.m_accessor;
412 ~ControlMeasureLessThanFunctor() {}
415 ControlMeasureLessThanFunctor &
operator=(ControlMeasureLessThanFunctor
const &other);
434 Connection() : strength(0) {}
441 typedef boost::adjacency_list<boost::setS,
447 typedef Network::vertex_descriptor ImageVertex;
448 typedef Network::edge_descriptor ImageConnection;
451 typedef std::map<ImageVertex, size_t> VertexIndexMap;
454 typedef boost::associative_property_map<VertexIndexMap> VertexIndexMapAdaptor;
457 typedef boost::graph_traits<Network>::adjacency_iterator AdjacencyIterator;
458 typedef boost::graph_traits<Network>::vertex_iterator VertexIterator;
461 Network m_controlGraph;
465 QString p_targetName;
469 QString p_description;
void measureRemoved(ControlMeasure *)
ControlNet & operator=(const ControlNet &other)
Assign other to this.
Definition: ControlNet.cpp:1803
void newPoint(ControlPoint *)
void ClearJigsawRejected()
Set jigsaw rejected flag for all measures to false and set the jigsaw rejected flag for the point its...
Definition: ControlPoint.cpp:2191
double GetMaximumResidual()
Determine the maximum error of all points in the network.
Definition: ControlNet.cpp:1323
QString GetNetworkId() const
Definition: ControlNet.cpp:1338
void measureModified(ControlMeasure *measure, ControlMeasure::ModType type, QVariant oldValue, QVariant newValue)
ControlNet(SurfacePoint::CoordinateType=SurfacePoint::Latitudinal)
Creates an empty ControlNet object.
Definition: ControlNet.cpp:60
ControlPoint * Parent()
Definition: ControlMeasure.h:260
QList< QString > GetPointIds() const
Return QList of ControlPoint Ids used in hash, in order of addition.
Definition: ControlNet.cpp:1536
QList< ControlMeasure * > getMeasures(bool excludeIgnored=false) const
Definition: ControlPoint.cpp:1873
QString creationDate() const
Returns the date and time that the network was created.
Definition: ControlNetVersioner.cpp:134
PvlGroupIterator findGroup(const QString &name, PvlGroupIterator beg, PvlGroupIterator end)
Find a group with the specified name, within these indexes.
Definition: PvlObject.h:129
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:1271
void CheckStatus()
Checks and updates the status.
Definition: Progress.cpp:105
void SetMutex(QMutex *mutex)
Set mutex to lock for making Naif calls.
Definition: ControlNet.cpp:1666
const ControlMeasure * GetMeasure(QString serialNumber) const
Get a control measure based on its cube's serial number.
Definition: ControlPoint.cpp:416
This is free and unencumbered software released into the public domain.
Definition: BoxcarCachingAlgorithm.h:13
QString GetUserName() const
Return the user name.
Definition: ControlNet.cpp:1513
int size() const
How many serial number / filename combos are in the list.
Definition: SerialNumberList.cpp:384
QList< ControlMeasure * > GetValidMeasuresInCube(QString serialNumber)
Get all the valid measures pertaining to a given cube serial number.
Definition: ControlNet.cpp:1081
File name manipulation and expansion.
Definition: FileName.h:100
SurfacePoint::CoordinateType GetCoordType()
Get the control point coordinate type (see the available types in SurfacePoint.h).
Definition: ControlNet.cpp:1862
This is free and unencumbered software released into the public domain.
Definition: Process.h:16
void SetMaximumSteps(const int steps)
This sets the maximum number of steps in the process.
Definition: Progress.cpp:85
ModType
Control Point Modification Types.
Definition: ControlNet.h:274
void newMeasure(ControlMeasure *)
void ComputeResiduals()
Compute error for each point in the network.
Definition: ControlNet.cpp:1169
int GetNumberOfJigsawRejectedMeasuresInImage(const QString &serialNumber)
Return the number of jigsaw rejected measures in image specified by serialNumber.
Definition: ControlNet.cpp:1413
QString Description() const
Return the description of the network.
Definition: ControlNet.cpp:1254
double AverageResidual()
Compute the average error of all points in the network.
Definition: ControlNet.cpp:1203
void SetTarget(const QString &target)
Sets the target name and target radii, if available.
Definition: ControlNet.cpp:1692
ControlPoint * takeFirstPoint()
Returns the first point stored in the versioner's internal list.
Definition: ControlNetVersioner.cpp:187
int GetNumMeasures() const
Definition: ControlPoint.cpp:1702
void ComputeApriori()
Compute aprior values for each point in the network.
Definition: ControlNet.cpp:1185
void Write(const QString &filename, bool pvl=false)
Writes out the control network.
Definition: ControlNet.cpp:311
void networkModified(ControlNet::ModType type)
void AddPoint(ControlPoint *point)
Adds a ControlPoint to the ControlNet.
Definition: ControlNet.cpp:352
void SetDescription(const QString &newDescription)
Set the description of the network.
Definition: ControlNet.cpp:1556
Statistics GetStatistic(double(ControlMeasure::*statFunc)() const) const
This function will call a given method on every control measure that this point has.
Definition: ControlPoint.cpp:1842
int GetNumberOfValidMeasuresInImage(const QString &serialNumber)
Return the number of measures in image specified by serialNumber.
Definition: ControlNet.cpp:1399
double Maximum() const
Returns the absolute maximum double found in all data passed through the AddData method.
Definition: Statistics.cpp:403
bool hasGroup(const QString &name) const
Returns a boolean value based on whether the object has the specified group or not.
Definition: PvlObject.h:210
void SetNetworkId(const QString &id)
Set the network id.
Definition: ControlNet.cpp:1676
Status ComputeApriori()
Computes a priori lat/lon/radius point coordinates by determining the average lat/lon/radius of all m...
Definition: ControlPoint.cpp:899
bool hasKeyword(const QString &name) const
Check to see if a keyword exists.
Definition: PvlContainer.cpp:159
int GetNumEditLockMeasures()
Return the total number of edit locked measures for all control points in the network.
Definition: ControlNet.cpp:1349
void ClearJigsawRejected()
Sets jigsaw rejected flag to false for all points and measures.
Definition: ControlNet.cpp:1423
Container for cube-like labels.
Definition: Pvl.h:119
void clear()
Clear the contents of this object.
Definition: ControlNet.cpp:180
void write(const QString &file)
Opens and writes PVL information to a file and handles the end of line sequence.
Definition: Pvl.cpp:130
bool IsEditLocked() const
Definition: ControlPoint.cpp:1272
QList< ControlMeasure * > GetMeasuresInCube(QString serialNumber)
Get all the measures pertaining to a given cube serial number.
Definition: ControlNet.cpp:1065
QString GetId() const
Return the Id of the control point.
Definition: ControlPoint.cpp:1306
QString GetTarget() const
Return the target name.
Definition: ControlNet.cpp:1507
int GetNumEditLockPoints()
Returns the number of edit locked control points.
Definition: ControlNet.cpp:1364
void ReadControl(const QString &filename, Progress *progress=0)
Reads in the control points from the given file.
Definition: ControlNet.cpp:271
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Definition: IString.cpp:211
Serial Number list generator.
Definition: SerialNumberList.h:64
int GetNumValidMeasures() const
Definition: ControlPoint.cpp:1711
int GetNumMeasures() const
Returns the total number of measures for all control points in the network.
Definition: ControlNet.cpp:1454
QList< QString > getCubeSerialNumbers() const
Definition: ControlPoint.cpp:1889
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
bool IsIgnored() const
Definition: ControlMeasure.cpp:630
QString serialNumber(const QString &filename)
Return a serial number given a filename.
Definition: SerialNumberList.cpp:426
void SetModifiedDate(const QString &date)
Set the last modified date.
Definition: ControlNet.cpp:1654
QString CreatedDate() const
Return the Created Date.
Definition: ControlNet.cpp:1244
Isis::Camera * Camera(int index)
Returns the camera list from the given image number.
Definition: ControlNet.cpp:1232
QString GetCubeSerialNumber() const
Return the serial number of the cube containing the coordinate.
Definition: ControlMeasure.cpp:557
A single control point.
Definition: ControlPoint.h:354
void SetUserName(const QString &name)
Set the user name of the control network.
Definition: ControlNet.cpp:1730
void pointDeleted(ControlPoint *point)
This is free and unencumbered software released into the public domain.
Definition: ControlNet.h:32
int GetNumPoints() const
Return the number of control points in the network.
Definition: ControlNet.cpp:1465
ModType
Control Measure Modification Types.
Definition: ControlMeasure.h:232
Contains multiple PvlContainers.
Definition: PvlGroup.h:41
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:24
CoordinateType
Defines the coordinate typ, units, and coordinate index for some of the output methods.
Definition: SurfacePoint.h:139
QString description() const
Returns the network's description.
Definition: ControlNetVersioner.cpp:154
QList< ControlPoint * > GetPoints()
Return QList of all the ControlPoints in the network.
Definition: ControlNet.cpp:1524
@ GraphModified
Definition: ControlNet.h:276
Status SetCamera(Isis::Camera *camera)
Set pointer to camera associated with a measure.
Definition: ControlMeasure.cpp:169
int GetNumLockedMeasures() const
Returns the number of locked control measures.
Definition: ControlPoint.cpp:1728
void swap(ControlNet &other)
Swaps the member data with the given control net.
Definition: ControlNet.cpp:1749
const ControlPoint * operator[](QString id) const
Definition: ControlNet.cpp:1866
void SetCreatedDate(const QString &date)
Set the creation time.
Definition: ControlNet.cpp:1546
void SetText(const QString &text)
Changes the value of the text string reported just before 0% processed.
Definition: Progress.cpp:61
QString userName() const
Returns the name of the last person or program to modify the network.
Definition: ControlNetVersioner.cpp:164
QString netId() const
Returns the ID for the network.
Definition: ControlNetVersioner.cpp:114
QList< ControlPoint * > take()
Transfer ownership of all points to caller.
Definition: ControlNet.cpp:226
void DecrementNumberOfRejectedMeasuresInImage(const QString &serialNumber)
Decrement number of jigsaw rejected measures in image specified by serialNumber.
Definition: ControlNet.cpp:1443
PvlObjectIterator findObject(const QString &name, PvlObjectIterator beg, PvlObjectIterator end)
Find the index of object with a specified name, between two indexes.
Definition: PvlObject.h:274
void SetImages(const QString &imageListFile)
Creates the ControlNet's image cameras based on an input file.
Definition: ControlNet.cpp:1566
double GetSample() const
Definition: ControlMeasure.cpp:723
int GetNumValidMeasures()
Return the number of valid (non-ignored) measures for all control points in the network.
Definition: ControlNet.cpp:1479
Q_DECLARE_METATYPE(Isis::ControlNet *)
This allows ControlNet *'s to be stored in a QVariant.
a control network
Definition: ControlNet.h:257
IO Handler for Isis Cubes.
Definition: Cube.h:167
friend class ControlMeasure
Definition: ControlNet.h:260
Isis exception class.
Definition: IException.h:91
QString targetName() const
Returns the target for the network.
Definition: ControlNetVersioner.cpp:124
bool ContainsPoint(QString pointId) const
Definition: ControlNet.cpp:951
#define ASSERT(x)
Definition: IsisDebug.h:134
void networkStructureModified()
Program progress reporter.
Definition: Progress.h:42
~ControlNet()
Destructor removes allocated memory.
Definition: ControlNet.cpp:133
bool hasObject(const QString &name) const
Returns a boolean value based on whether the object exists in the current PvlObject or not.
Definition: PvlObject.h:323
int numPoints() const
Returns the number of points that have been read in or are ready to write out.
Definition: ControlNetVersioner.cpp:174
double Average() const
Computes and returns the average.
Definition: Statistics.cpp:300
void SetTarget(const ControlNet &other)
int GetNumValidPoints()
Returns the number of non-ignored control points.
Definition: ControlNet.cpp:1495
QList< QString > getAdjacentImages(QString serialNumber) const
Get all images connected to a given image by common control points.
Definition: ControlNet.cpp:1041
Namespace for the standard library.
ModType
Control Point Modification Types.
Definition: ControlPoint.h:431
int getEdgeCount() const
Definition: ControlNet.cpp:1003
This is free and unencumbered software released into the public domain.
Definition: CubeIoHandler.h:23
void write(FileName netFile)
This will write a control net file object to disk.
Definition: ControlNetVersioner.cpp:1659
void pointModified(ControlPoint *point, ControlPoint::ModType type, QVariant oldValue, QVariant newValue)
Pvl toPvl()
Generates a Pvl file from the currently stored control points and header.
Definition: ControlNetVersioner.cpp:202
int Delete(ControlMeasure *measure)
Remove a measurement from the control point, deleting reference measure is allowed.
Definition: ControlPoint.cpp:354
double GetLine() const
Definition: ControlMeasure.cpp:690
int DeletePoint(ControlPoint *point)
Delete a ControlPoint from the network by the point's address.
Definition: ControlNet.cpp:879
bool IsIgnored() const
Definition: ControlPoint.cpp:1311
QString GraphToString() const
Used for verifying graph intergrity.
Definition: ControlNet.cpp:497
@ Latitudinal
Planetocentric latitudinal (lat/lon/rad) coordinates.
Definition: SurfacePoint.h:140
Adds specific functionality to C++ strings.
Definition: IString.h:165
QString fileName(const QString &sn)
Return a filename given a serial number.
Definition: SerialNumberList.cpp:399
int GetNumIgnoredMeasures()
Return the total number of ignored measures for all control points in the network.
Definition: ControlNet.cpp:1381
@ Swapped
Definition: ControlNet.h:275
QSharedPointer< ControlNet > ControlNetQsp
This typedef is for future implementation of target body.
Definition: ControlNet.h:482
QString lastModificationDate() const
Returns the date and time of the last modification to the network.
Definition: ControlNetVersioner.cpp:144
bool hasSerialNumber(QString sn)
Determines whether or not the requested serial number exists in the list.
Definition: SerialNumberList.cpp:373
const ControlPoint * GetPoint(QString pointId) const
Definition: ControlNet.cpp:1815
void SetCoordType(SurfacePoint::CoordinateType coordType)
Sets the control point coordinate type.
Definition: ControlNet.cpp:861
void IncrementNumberOfRejectedMeasuresInImage(const QString &serialNumber)
Increment number of jigsaw rejected measures in image specified by serialNumber.
Definition: ControlNet.cpp:1434
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
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
QList< QList< QString > > GetSerialConnections() const
This method searches through all the cube serial numbers in the network.
Definition: ControlNet.cpp:967
Handle various control network file format versions.
Definition: ControlNetVersioner.h:412
QString GetLastModified() const
Return the last modified date.
Definition: ControlNet.cpp:1518
a control measurement
Definition: ControlMeasure.h:175