Isis 3 Programmer Reference
Isis::ControlNet Class Reference

a control network More...

#include <ControlNet.h>

Inheritance diagram for Isis::ControlNet:
Inheritance graph
Collaboration diagram for Isis::ControlNet:
Collaboration graph

Classes

struct  Connection
 Used to define the edges of the graph. More...
 
class  ControlMeasureLessThanFunctor
 
struct  Image
 Used to define the verticies of the graph. More...
 

Public Types

enum  ModType { Swapped , GraphModified }
 Control Point Modification Types. More...
 

Signals

void networkStructureModified ()
 
void networkModified (ControlNet::ModType type)
 
void pointModified (ControlPoint *point, ControlPoint::ModType type, QVariant oldValue, QVariant newValue)
 
void measureModified (ControlMeasure *measure, ControlMeasure::ModType type, QVariant oldValue, QVariant newValue)
 
void pointDeleted (ControlPoint *point)
 
void newPoint (ControlPoint *)
 
void newMeasure (ControlMeasure *)
 
void measureRemoved (ControlMeasure *)
 

Public Member Functions

 ControlNet (SurfacePoint::CoordinateType=SurfacePoint::Latitudinal)
 Creates an empty ControlNet object.
 
 ControlNet (const ControlNet &other)
 
 ControlNet (const QString &filename, Progress *progress=0, SurfacePoint::CoordinateType=SurfacePoint::Latitudinal)
 Creates a ControlNet object from the given file.
 
 ~ControlNet ()
 Destructor removes allocated memory.
 
void clear ()
 Clear the contents of this object.
 
QList< ControlPoint * > take ()
 Transfer ownership of all points to caller.
 
void ReadControl (const QString &filename, Progress *progress=0)
 Reads in the control points from the given file.
 
void Write (const QString &filename, bool pvl=false)
 Writes out the control network.
 
void AddPoint (ControlPoint *point)
 Adds a ControlPoint to the ControlNet.
 
int DeletePoint (ControlPoint *point)
 Delete a ControlPoint from the network by the point's address.
 
int DeletePoint (QString pointId)
 Delete a ControlPoint from the network using the point's Id.
 
int DeletePoint (int index)
 Delete a ControlPoint from the network using the point's index.
 
bool ContainsPoint (QString pointId) const
 
QList< QString > GetCubeSerials () const
 Use this method to get a complete list of all the cube serial numbers in the network.
 
QString GraphToString () const
 Used for verifying graph intergrity.
 
QList< QList< QString > > GetSerialConnections () const
 This method searches through all the cube serial numbers in the network.
 
int getEdgeCount () const
 
QList< QString > getAdjacentImages (QString serialNumber) const
 Get all images connected to a given image by common control points.
 
QList< ControlMeasure * > GetMeasuresInCube (QString serialNumber)
 Get all the measures pertaining to a given cube serial number.
 
QList< ControlMeasure * > GetValidMeasuresInCube (QString serialNumber)
 Get all the valid measures pertaining to a given cube serial number.
 
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 ComputeResiduals ()
 Compute error for each point in the network.
 
void ComputeApriori ()
 Compute aprior values for each point in the network.
 
const ControlPointGetPoint (QString pointId) const
 
ControlPointGetPoint (QString pointId)
 
const ControlPointGetPoint (int index) const
 
ControlPointGetPoint (int index)
 
double AverageResidual ()
 Compute the average error of all points in the network.
 
Isis::CameraCamera (int index)
 Returns the camera list from the given image number.
 
Isis::CameraCamera (QString serialNumber)
 Returns the camera list from the input serial number.
 
QString CreatedDate () const
 Return the Created Date.
 
QString Description () const
 Return the description of the network.
 
ControlPointFindClosest (QString serialNumber, double sample, double line)
 Finds and returns a pointer to the closest ControlPoint to the ControlMeasure with the given serial number and line sample location.
 
double GetMaximumResidual ()
 Determine the maximum error of all points in the network.
 
QString GetNetworkId () const
 
int GetNumEditLockMeasures ()
 Return the total number of edit locked measures for all control points in the network.
 
int GetNumEditLockPoints ()
 Returns the number of edit locked control points.
 
int GetNumIgnoredMeasures ()
 Return the total number of ignored measures for all control points in the network.
 
int GetNumberOfValidMeasuresInImage (const QString &serialNumber)
 Return the number of measures in image specified by serialNumber.
 
int GetNumberOfJigsawRejectedMeasuresInImage (const QString &serialNumber)
 Return the number of jigsaw rejected measures in image specified by serialNumber.
 
void ClearJigsawRejected ()
 Sets jigsaw rejected flag to false for all points and measures.
 
void IncrementNumberOfRejectedMeasuresInImage (const QString &serialNumber)
 Increment number of jigsaw rejected measures in image specified by serialNumber.
 
void DecrementNumberOfRejectedMeasuresInImage (const QString &serialNumber)
 Decrement number of jigsaw rejected measures in image specified by serialNumber.
 
int GetNumMeasures () const
 Returns the total number of measures for all control points in the network.
 
int GetNumPoints () const
 Return the number of control points in the network.
 
int GetNumValidMeasures ()
 Return the number of valid (non-ignored) measures for all control points in the network.
 
int GetNumValidPoints ()
 Returns the number of non-ignored control points.
 
QString GetTarget () const
 Return the target name.
 
QString GetUserName () const
 Return the user name.
 
QString GetLastModified () const
 Return the last modified date.
 
QList< ControlPoint * > GetPoints ()
 Return QList of all the ControlPoints in the network.
 
QList< QString > GetPointIds () const
 Return QList of ControlPoint Ids used in hash, in order of addition.
 
SurfacePoint::CoordinateType GetCoordType ()
 Get the control point coordinate type (see the available types in SurfacePoint.h).
 
void SetCreatedDate (const QString &date)
 Set the creation time.
 
void SetDescription (const QString &newDescription)
 Set the description of the network.
 
void SetImages (const QString &imageListFile)
 Creates the ControlNet's image cameras based on an input file.
 
void SetImages (SerialNumberList &list, Progress *progress=0)
 Creates the ControlNet's image camera's based on the list of Serial Numbers.
 
void SetModifiedDate (const QString &date)
 Set the last modified date.
 
void SetMutex (QMutex *mutex)
 Set mutex to lock for making Naif calls.
 
void SetNetworkId (const QString &id)
 Set the network id.
 
void SetTarget (const QString &target)
 Sets the target name and target radii, if available.
 
void SetTarget (Pvl label)
 Sets the target name and radii using values found in the mapping group of the given label, if available.
 
void SetTarget (const ControlNet &other)
 
void SetUserName (const QString &name)
 Set the user name of the control network.
 
void SetCoordType (SurfacePoint::CoordinateType coordType)
 Sets the control point coordinate type.
 
void swap (ControlNet &other)
 Swaps the member data with the given control net.
 
ControlNetoperator= (const ControlNet &other)
 Assign other to this.
 
const ControlPointoperator[] (QString id) const
 
ControlPointoperator[] (QString id)
 
const ControlPointoperator[] (int id) const
 
ControlPointoperator[] (int id)
 

Private Types

typedef boost::adjacency_list< boost::setS, boost::listS, boost::undirectedS, Image, ConnectionNetwork
 Defines the graph type as an undirected graph that uses Images for verticies, and Connections for edges. It is defined as an adjacency list with the edge list represented by a set, the and vertex list represented by a list.
 
typedef Network::vertex_descriptor ImageVertex
 
typedef Network::edge_descriptor ImageConnection
 Reprents the verticies of the graph.
 
typedef std::map< ImageVertex, size_t > VertexIndexMap
 Represents the edges of the graph.
 
typedef boost::associative_property_map< VertexIndexMapVertexIndexMapAdaptor
 Converts VertexIndexMap into the appropriate form to be used by boost.
 
typedef boost::graph_traits< Network >::adjacency_iterator AdjacencyIterator
 Iterates over adjacent verticies.
 
typedef boost::graph_traits< Network >::vertex_iterator VertexIterator
 

Private Member Functions

void nullify ()
 
bool ValidateSerialNumber (QString serialNumber) const
 Does a check to ensure that the given serial number is contained within the network.
 
void measureAdded (ControlMeasure *measure)
 Updates the ControlNet graph for the measure's serial number to reflect the addition.
 
void measureDeleted (ControlMeasure *measure)
 Updates the node for this measure's serial number to reflect the deletion.
 
void measureIgnored (ControlMeasure *measure)
 Updates the edges in the ControlNet graph to reflect the ignored measure.
 
void measureUnIgnored (ControlMeasure *measure)
 Updates the connections for the ControlNet graph associated with the measure's serial number to reflect the unignoration.
 
void pointIgnored (ControlPoint *point)
 Update the ControlNet's internal structure when a ControlPoint is ignored.
 
void pointUnIgnored (ControlPoint *point)
 Update the ControlNet's internal structure when a ControlPoint is un-ignored.
 
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 emitNetworkStructureModified ()
 This method is a wrapper to emit the networkStructureModified() signal.
 
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 to a Control Measure.
 
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 to a Control Point.
 
void pointAdded (ControlPoint *point)
 Adds a whole point to the control net graph.
 
bool addEdge (QString sourceSerial, QString targetSerial)
 In the ControlNet graph: adds an edge between the verticies associated with the two serial numbers provided.
 
bool removeEdge (QString sourceSerial, QString targetSerial)
 In the ControlNet graph, decrements the strength on the edge between the two serial numbers.
 

Private Attributes

QHash< QString, ControlPoint * > * points
 hash ControlPoints by ControlPoint Id
 
QHash< QString, ImageVertex > m_vertexMap
 
Network m_controlGraph
 The serial number -> vertex hash used by the graph.
 
QStringListpointIds
 The ControlNet graph.
 
QMutex * m_mutex
 
QString p_targetName
 Name of the target.
 
QString p_networkId
 The Network Id.
 
QString p_created
 Creation Date.
 
QString p_modified
 Date Last Modified.
 
QString p_description
 Textual Description of network.
 
QString p_userName
 The user who created the network.
 
QMap< QString, Isis::Camera * > p_cameraMap
 A map from serialnumber to camera.
 
QMap< QString, int > p_cameraValidMeasuresMap
 A map from serialnumber to #measures.
 
QMap< QString, int > p_cameraRejectedMeasuresMap
 A map from serialnumber to #rejected measures.
 
QVector< Isis::Camera * > p_cameraList
 Vector of image number to camera.
 
bool m_ownPoints
 Specifies ownership of point list. True if owned by this object.
 
SurfacePoint::CoordinateType m_coordType
 The coordinate type of the control points.
 

Friends

class ControlMeasure
 
class ControlPoint
 

Detailed Description

a control network

This class is used to store a network of ControlPoints

Author
2005-07-29 Jeff Anderson
See also
ControlPoint ControlMeasure
History

2005-07-29 Jeff Anderson Original version

2006-01-11 Jacob Danton Updated unitTest

2006-06-22 Brendan George Updated to conform to changes in SerialNumberList class

2008-04-04 Christopher Austin Added Exists function

2008-04-18 Debbie A. Cook Added Progress reports to loading and SetImages and calculates the total number of measurements in the control net

2008-06-18 Christopher Austin Fixed documentation errors

2009-01-06 Jeannie Walldren Fixed typo in SetImages() exception output. Added documentation.

2009-02-05 Christopher Austin when the created date or the modified date are not set, they default to the time in which Write() is called.

2009-04-07 Tracie Sucharski Added NumValidMeasures and NumIgnoredMeasures methods.

2009-06-03 Christopher Austin Added p_invalid functionality along with forceBuild, as well as other small fixes including documentation.

2009-07-13 Stacy Alley The std::vector of ControlPoints called 'p_points' was replaced with a QVector of QString 'p_pointIds' in conjunction with a QHash of <QString, ControlPoint> called 'p_pointsHash'. This was done to speed up the Add method which was essentially slowing down the reading or creation of Control Networks.

2010-05-06 Tracie Sucharski Use defaults of 0. instead of Isis::Null, because 0. is the default in the protocol buffers.

2010-08-06 Tracie Sucharski Updated for changes made after additional working sessions for Control network design.

2009-09-01 Eric Hyer Added two includes: QVector and QString

2010-09-09 Sharmila Prasad Added API to sort Control Net by Point ID Changed PointID's vector to StringList

2009-09-25 Travis Addair Changed methods which return the number of control measures in the network to compute those values at the time the method is called, not when the control network is first initialized.

2010-10-05 Tracie Sucharski Renamed the Write method to WritePvl. Create new method, Write which takes another parameter indicating whether to write pvl format or binary format, The default will write binary.

2010-10-05 Eric Hyer ControlMeasure and ControlPoint now return QStrings for some methods. Fixed breakages caused by this.

2010-10-06 Sharmila Prasad Added method to get CreatedDate

2010-11-21 Tracie Sucharski - Added new keyword, jigsawRejected to the read and write methods.

2011-01-13 Mackenzie Boyd Added copy constructor and assignment operator.

2011-01-17 Eric Hyer - Points are now owned and deleted by the network. Network now stored in such a way that access to all points in a cube is just as cheap as accessing measures in a point. Removed redundant methods and made other api changes.

2011-02-18 Eric Hyer - Made improvements and bug fixes related to interaction to other control network classes including ControlPoint and ControlMesure, but most significantly to ControlCubeGraphNode. Most important fix was network notification of measures added to or removed from points after the point is added to the network.

2011-02-23 Eric Hyer - Added some methods to support graphing calculations (RandomBFS, Shuffle, CalcBWAndCE, and GetNodeConnections).

2011-03-08 Ken Edmundson - Added methods GetNumberOfMeasuresInImage, GetNumberOfJigsawRejectedMeasuresInImage, IncrementNumberOfRejectedMeasuresInImage, DecrementNumberOfRejectedMeasuresInImage, and members p_cameraMeasuresMap and p_cameraRejectedMeasuresMap.

2011-03-12 Debbie A. Cook - Added member p_targetRadii and method GetTargetRadii to support SurfacePoint sigma conversions in ControlPoint.

2011-03-14 Eric Hyer - Cube connection graph now updated when points or measures are ignored.

2011-03-15 Eric Hyer - Some cube graph bugs were fixed.

2011-03-25 Christopher Austin - Added UpdatePointReference() to work with ControlPoint's SetId()

2011-03-29 Steven Lambright - Made versioning viable for first release.

2011-04-27 Steven Lambright - UpdatePointReference had a bug where the pointIds list was not being correctly updated.

2011-05-04 Eric Hyer - References in graph data structure now kept for ignored points and measures

2011-05-25 Eric Hyer - Added getPoints method

2011-06-22 James Alexander Crough and Eric Hyer - Added getGraphNode method.

2011-06-28 Eric Hyer - Added getEdgeCount() method

2011-07-08 Travis Addair - Locked points can no longer be deleted

2011-07-27 Sharmila Prasad - Fixed bug in GetNumEditLockMeasures()

2011-08-01 Eric Hyer - Addressed some graphing issues

2011-08-24 Steven Lambright - Fixed bug in graph code

2011-10-06 Steven Lambright - Having a target is no longer required.

2011-10-14 Ken Edmundson Added method ClearJigsawRejected(); to set all measure/point JigsawRejected flags to false prior to bundle adjustment.

2012-04-13 Orrin Thomas Added method sortedMeasureList, and functor ControlMeasureLessThanFunctor.

2012-11-22 Debbie A. Cook - Changed to use TProjection instead of Projection. References #775.

2012-09-11 Tracie Sucharski - Added a Mutex and MutexLocker for the SetTarget method.

2012-09-26 Steven Lambright - Fixed assignment operator to return a non-const ControlNet reference. Added swap(). Refactored assignment operator to use copy-and-swap idiom which fixed a bug where you couldn't access control points by index after an assignment.

2013-11-08 Tracie Sucharski - Add camera to ignored measures. References #1603.

2013-12-18 Tracie Sucharski - Previous change caused problems for jigsaw app. It was expecting the method GetNumberOfMeasuresInImage to only return the number of VALID (Ignore=False) measures. Renamed method to GetNumberOfValidMeasuresInImage and the private variable p_cameraMeasuresMap to p_cameraValidMeasuresMap. References #1603.

2015-09-05 Ken Edmundson - Added QSharedPointer and typedef for later use.

2016-02-15 Kris Becker - Added feature to take ownership of points from ControlNet. To support this option, added clear() and take() methods. (Merged by Kristin Berry. References #2392)

2016-04-22 Jeannie Backer - Added try/catch to SetTarget()'s call to TProjection::TargetRadii(). If an error is thrown, the radii are now set to Isis:Null. Added SetTarget(Pvl), SetTarget(ControlNet), and SetTarget(QString, vector) methods to attempt to read radii from various sources, if not found using the TargetName. References #3892

2016-04-28 Tracie Sucharski - Updated toAscii() calls to toLatin1() for QT 5 upgrade.

2016-05-10 Jeannie Backer - Replaced calls to TProjection::TargetRadii() with calls to Target::radiiGroup(). References #3934

2016-06-21 Kris Becker - Properly forward declare QPair as struct not class

2016-06-08 Jesse Mapel - Merged changes from IPCE to ISIS. Fixes #3948.

2016-10-13 Ian Humphrey - Added check to SetImages() to make sure it isn't called more than once, which messes up the p_cameraList member. References #4293.

2017-08-09 Summer Stapleton - Added throw to caught exception for bad control net import in constructor. Also removed p_invalid as it was no longer being used anywhere. Fixes #5068.

2017-08-30 Debbie A. Cook - Added an optional argument to the constructor for the control point coordinate type. At this point this value is only stored in the active ControlNet. It will be added to the stored ControlNet at a later date. References #4649 and #501.

2017-12-12 Kristin Berry - Updated to use QMap and QVector rather than std::map and std::vector. Fixes #5259.

2017-12-18 Adam Goins - Added GetLastModified() accessor. References #5258.

2017-12-21 Jesse Mapel - Modified read and write methods to use the refactored ControlNetVersioner instead of directly parsing the protobuf objects from the LatestControlNetFile.

2018-01-12 Adam Goins - Added Progress support back to Read methods.

2017-01-19 Jesse Mapel - Added a method to get all of the valid measures in an image. Previously, this had to be done throug the graph.

2018-01-26 Kristin Berry - Added pointAdded() function to eliminate redundant measure adds to the control network.

2018-04-05 Adam Goins - Added a check to the versionedReader targetRadii group to set radii values to those ingested from the versioner if they exist. Otherwise, we call SetTarget with the targetname. Fixes #5361.

2018-06-10 Kristin Berry - Removed unused methods and associated code: MinimumSpanningTree(), GetNodeConnections(), RandomBFS(), Shuffle(), CalcBWAndCE(), CubeGraphToString(), getGraphNode(). References #5434

2018-06-10 Kristin Berry - Updated to use the boost graph library instead of our custom graph structure ControlCubeGraphNode.

2018-06-06 Jesse Mapel - Added a method to get all adjacent images to ControlNet. Previously this functionality was only available through the ControlCubeGraphNode class. References #5434.

2018-06-06 Jesse Mapel - Added a point ignored and un-ignored methods. This will prevent edge strengths getting incremented or decremented twice. References #5434.

2018-06-15 Adam Goins & Jesse Mapel - Added the ModType enum, as well as a series of signals that are emitted whenever a change is made to a Control Point or any of it's measures, or to the network itself. These signals exist for the purpose of communication between the ControlNetVitals class, and the network that it is observing. Fixes #5435.

2018-06-22 Ken Edmundson - Added typedef for QSharedPointer to control network.

2018-06-25 Kristin Berry - Updated GetNumberOfValidMeasuresInImage() to use GetValidMeasuresInCube() if SetImage has not yet been called to populate the p_cameraValidMeasuresMap.

2018-06-25 Jesse Mapel - Fixed the incorrect signal being called when adding and removing measures. References #5435.

2018-06-25 Jesse Mapel - Fixed ignoring measures with ignored adjacent measures incorrectly modifying the edge between the two image vertices.

2018-06-29 Kristin Berry - Added addEdge() and removeEdge() functions to make code cleaner.

2018-07-06 Jesse Mapel - Modified addEdge and removeEdge to always emit a graph modified signal if an edge is added or removed. Added graph modified signal when a vertex is added.

2018-07-06 Jesse Mapel - Removed target radii from ControlNet objects because SurfacePoints now use their local radii to do sigma distance conversions instead of the target equatorial and polar radii. Fixes #5457.

2018-07-22 Kristin Berry - Updated swap to include the graph and vertex map.

Definition at line 258 of file ControlNet.h.

Member Typedef Documentation

◆ AdjacencyIterator

typedef boost::graph_traits<Network>::adjacency_iterator Isis::ControlNet::AdjacencyIterator
private

Iterates over adjacent verticies.

Definition at line 459 of file ControlNet.h.

◆ ImageConnection

typedef Network::edge_descriptor Isis::ControlNet::ImageConnection
private

Reprents the verticies of the graph.

Definition at line 450 of file ControlNet.h.

◆ ImageVertex

typedef Network::vertex_descriptor Isis::ControlNet::ImageVertex
private

Definition at line 449 of file ControlNet.h.

◆ Network

typedef boost::adjacency_list<boost::setS, boost::listS, boost::undirectedS, Image, Connection> Isis::ControlNet::Network
private

Defines the graph type as an undirected graph that uses Images for verticies, and Connections for edges. It is defined as an adjacency list with the edge list represented by a set, the and vertex list represented by a list.

Definition at line 447 of file ControlNet.h.

◆ VertexIndexMap

typedef std::map<ImageVertex, size_t> Isis::ControlNet::VertexIndexMap
private

Represents the edges of the graph.

A map between an ImageVertex and its index

Definition at line 453 of file ControlNet.h.

◆ VertexIndexMapAdaptor

typedef boost::associative_property_map<VertexIndexMap> Isis::ControlNet::VertexIndexMapAdaptor
private

Converts VertexIndexMap into the appropriate form to be used by boost.

Definition at line 456 of file ControlNet.h.

◆ VertexIterator

typedef boost::graph_traits<Network>::vertex_iterator Isis::ControlNet::VertexIterator
private

Definition at line 460 of file ControlNet.h.

Member Enumeration Documentation

◆ ModType

Control Point Modification Types.

This enum is designed to represent the different types of modifications that can be made to a ControlNet.

Swapped means the network was swapped with another network (ControlNet::Swap(ControlNet &other)). GraphModified means that a vertice or edge was added/removed from the graph..

Definition at line 275 of file ControlNet.h.

Constructor & Destructor Documentation

◆ ControlNet() [1/3]

Isis::ControlNet::ControlNet ( SurfacePoint::CoordinateType coordType = SurfacePoint::Latitudinal)

Creates an empty ControlNet object.

Creates an empty ControlNet object

Definition at line 58 of file ControlNet.cpp.

References Isis::Application::DateTime(), m_coordType, m_ownPoints, p_created, p_modified, pointIds, and points.

◆ ControlNet() [2/3]

Isis::ControlNet::ControlNet ( const ControlNet & other)

Definition at line 73 of file ControlNet.cpp.

◆ ControlNet() [3/3]

Isis::ControlNet::ControlNet ( const QString & ptfile,
Progress * progress = 0,
SurfacePoint::CoordinateType coordType = SurfacePoint::Latitudinal )

Creates a ControlNet object from the given file.

Parameters
ptfileName of network file
progressA pointer to the progress of reading in the control points

Definition at line 105 of file ControlNet.cpp.

References Isis::IException::Io, m_coordType, m_ownPoints, pointIds, points, and ReadControl().

◆ ~ControlNet()

Isis::ControlNet::~ControlNet ( )

Destructor removes allocated memory.

Author
Kris Becker

Definition at line 131 of file ControlNet.cpp.

References clear(), pointIds, and points.

Member Function Documentation

◆ addEdge()

bool Isis::ControlNet::addEdge ( QString sourceSerial,
QString targetSerial )
private

In the ControlNet graph: adds an edge between the verticies associated with the two serial numbers provided.

Or, if the edge already exists, increments the strength of the edge.

Parameters
sourceSerialThe first serial to be connected by the edge
targetSerialThe second serial number to be connected by the edge
Returns
bool true if a new edge was added, false otherwise.

Definition at line 440 of file ControlNet.cpp.

References m_controlGraph.

Referenced by measureAdded(), measureUnIgnored(), pointAdded(), and pointUnIgnored().

◆ AddPoint()

void Isis::ControlNet::AddPoint ( ControlPoint * point)

Adds a ControlPoint to the ControlNet.

Parameters
pointControl point to be added
Exceptions
IException::Programmer"Null pointer passed to ControlNet::AddPoint!"
IException::Programmer"ControlPoint must have unique Id"

Definition at line 350 of file ControlNet.cpp.

References ContainsPoint(), Isis::ControlPoint::GetId(), pointAdded(), pointIds, points, and Isis::IException::Programmer.

Referenced by ReadControl().

◆ AverageResidual()

double Isis::ControlNet::AverageResidual ( )

Compute the average error of all points in the network.

Returns
double Average error of points
History
2010-01-12 Tracie Sucharski - Renamed from AverageError

Definition at line 1199 of file ControlNet.cpp.

References Isis::Statistics::Average(), Isis::ControlMeasure::GetResidualMagnitude(), Isis::ControlPoint::GetStatistic(), and points.

◆ Camera() [1/2]

Isis::Camera * Isis::ControlNet::Camera ( int index)

Returns the camera list from the given image number.

Parameters
indexThe image number
Returns
Isis::Camera* The pointer to the resultant camera list

Definition at line 1228 of file ControlNet.cpp.

References p_cameraList.

Referenced by Isis::QnetCubeDistanceFilter::filter(), Isis::QnetPointDistanceFilter::filter(), and Isis::LidarData::SetImages().

◆ Camera() [2/2]

Isis::Camera * Isis::ControlNet::Camera ( QString serialNumber)

Returns the camera list from the input serial number.

Parameters
serialNumberSerial number.
Returns
Isis::Camera* The pointer to the resultant camera.

Definition at line 1240 of file ControlNet.cpp.

References p_cameraMap.

◆ clear()

void Isis::ControlNet::clear ( )

Clear the contents of this object.

The contents of the ControlNet object are deleted. The internal variables that hold the contents are not. See the destructor.

Author
Kris Becker

Definition at line 178 of file ControlNet.cpp.

References GetNumPoints(), m_controlGraph, m_ownPoints, pointIds, and points.

Referenced by take(), and ~ControlNet().

◆ ClearJigsawRejected()

void Isis::ControlNet::ClearJigsawRejected ( )

Sets jigsaw rejected flag to false for all points and measures.

Called by BundleAdjust::Init method

Definition at line 1431 of file ControlNet.cpp.

References points.

◆ ComputeApriori()

void Isis::ControlNet::ComputeApriori ( )

Compute aprior values for each point in the network.

History
2010-08-23 Ken Edmundson, skipping ignored points

Definition at line 1181 of file ControlNet.cpp.

References Isis::ControlPoint::ComputeApriori(), and points.

◆ ComputeResiduals()

void Isis::ControlNet::ComputeResiduals ( )

Compute error for each point in the network.

History
2010-01-11 Tracie Sucharski, Renamed from ComputeErrors

Definition at line 1165 of file ControlNet.cpp.

References points.

◆ ContainsPoint()

bool Isis::ControlNet::ContainsPoint ( QString pointId) const
Parameters
pointIdthe point Id to check for in the network.
Returns
True if the point is in the network, false otherwise.

Definition at line 947 of file ControlNet.cpp.

References points.

Referenced by AddPoint(), Isis::NewControlPointDialog::enableOkButton(), measureAdded(), measureUnIgnored(), and pointAdded().

◆ CreatedDate()

QString Isis::ControlNet::CreatedDate ( ) const

Return the Created Date.

Author
Sharmila Prasad (10/6/2010)
Returns
QString

Definition at line 1252 of file ControlNet.cpp.

References p_created.

◆ DecrementNumberOfRejectedMeasuresInImage()

void Isis::ControlNet::DecrementNumberOfRejectedMeasuresInImage ( const QString & serialNumber)

Decrement number of jigsaw rejected measures in image specified by serialNumber.

Definition at line 1451 of file ControlNet.cpp.

References p_cameraRejectedMeasuresMap.

◆ DeletePoint() [1/3]

int Isis::ControlNet::DeletePoint ( ControlPoint * point)

Delete a ControlPoint from the network by the point's address.

Parameters
pointThe point to delete

Definition at line 875 of file ControlNet.cpp.

References DeletePoint(), Isis::ControlPoint::GetId(), points, and Isis::IException::User.

Referenced by DeletePoint(), DeletePoint(), and Isis::ControlNetFilter::FilterOutPoint().

◆ DeletePoint() [2/3]

int Isis::ControlNet::DeletePoint ( int index)

Delete a ControlPoint from the network using the point's index.

Parameters
indexThe index of the Control Point to be deleted.

Definition at line 932 of file ControlNet.cpp.

References DeletePoint(), pointIds, and Isis::IException::Programmer.

◆ DeletePoint() [3/3]

int Isis::ControlNet::DeletePoint ( QString pointId)

Delete a ControlPoint from the network using the point's Id.

Parameters
pointIdThe Point Id of the ControlPoint to be deleted.
Exceptions
IException::User"the point Id does not exist in the network"

Definition at line 895 of file ControlNet.cpp.

References Isis::ControlPoint::Delete(), Isis::ControlPoint::getMeasures(), pointIds, Isis::ControlPoint::PointLocked, points, Isis::ControlPoint::Success, and Isis::IException::User.

◆ Description()

QString Isis::ControlNet::Description ( ) const

Return the description of the network.

Returns
The description of this Control Network

Definition at line 1262 of file ControlNet.cpp.

References p_description.

◆ emitMeasureModified()

void Isis::ControlNet::emitMeasureModified ( ControlMeasure * measure,
ControlMeasure::ModType type,
QVariant oldValue,
QVariant newValue )
private

This method is a wrapper to emit the measureModified() signal and is called whenever a change is made to a Control Measure.

Parameters
measureThe ControlMeasure* that was modified.
typeThe ControlMeasure::ModType indicating which modification occured.
oldValueThe oldValue before the change.
newValueThe new value that the change incorporated.

Definition at line 151 of file ControlNet.cpp.

Referenced by Isis::ControlPoint::emitMeasureModified().

◆ emitNetworkStructureModified()

void Isis::ControlNet::emitNetworkStructureModified ( )
private

This method is a wrapper to emit the networkStructureModified() signal.

Definition at line 865 of file ControlNet.cpp.

Referenced by Isis::ControlPoint::AddMeasure(), and Isis::ControlPoint::Delete().

◆ emitPointModified()

void Isis::ControlNet::emitPointModified ( ControlPoint * point,
ControlPoint::ModType type,
QVariant oldValue,
QVariant newValue )
private

This method is a wrapper to emit the pointModified() signal and is called whenever a change is made to a Control Point.

Parameters
pointThe ControlPoint* that was modified.
typeThe ControlPoint::ModType indicating which modification occured.
oldValueThe oldValue before the change.
newValueThe new value that the change incorporated.

Definition at line 165 of file ControlNet.cpp.

Referenced by Isis::ControlPoint::SetEditLock(), Isis::ControlPoint::SetIgnored(), and Isis::ControlPoint::SetType().

◆ FindClosest()

ControlPoint * Isis::ControlNet::FindClosest ( QString serialNumber,
double sample,
double line )

Finds and returns a pointer to the closest ControlPoint to the ControlMeasure with the given serial number and line sample location.

Parameters
serialNumberThe serial number of the the file the ControlMeasure is on
sampleThe sample number of the ControlMeasure
lineThe line number of the ControlMeasure
Returns
ControlPoint* Pointer to the ControlPoint closest to the given line, sample position

Definition at line 1279 of file ControlNet.cpp.

References m_controlGraph, Isis::IException::Programmer, and ValidateSerialNumber().

◆ getAdjacentImages()

QList< QString > Isis::ControlNet::getAdjacentImages ( QString serialNumber) const

Get all images connected to a given image by common control points.

Parameters
serialNumberthe serial number of the image to find images adjacent to.
Returns
QList<QString> The serial numbers of all adjacent images.

Definition at line 1037 of file ControlNet.cpp.

References m_controlGraph, Isis::IException::Programmer, and ValidateSerialNumber().

Referenced by GraphToString().

◆ GetCoordType()

SurfacePoint::CoordinateType Isis::ControlNet::GetCoordType ( )

Get the control point coordinate type (see the available types in SurfacePoint.h).

Returns
the control point coordinate type

Definition at line 1870 of file ControlNet.cpp.

References m_coordType.

Referenced by Isis::ControlPoint::SetAprioriSurfacePoint().

◆ GetCubeSerials()

QList< QString > Isis::ControlNet::GetCubeSerials ( ) const

Use this method to get a complete list of all the cube serial numbers in the network.

Note that the order in which the serials are ordered in the returned list is arbitrary and could change each time this method is called (but the operation is done in constant time).

Returns
A list of the Cube Serial Numbers in the ControlNet.

Definition at line 1012 of file ControlNet.cpp.

Referenced by Isis::ControlNetStatistics::GenerateImageStats(), Isis::ControlNetVitals::getCubeSerials(), Isis::ControlNetVitals::getImagesBelowMeasureThreshold(), GraphToString(), Isis::ControlNetVitals::initializeVitals(), Isis::ControlNetVitals::numImages(), and Isis::ChipViewport::paintEvent().

◆ getEdgeCount()

int Isis::ControlNet::getEdgeCount ( ) const
Returns
The total number of edges in the bi-directional graph for images

Definition at line 999 of file ControlNet.cpp.

References m_controlGraph.

◆ GetLastModified()

QString Isis::ControlNet::GetLastModified ( ) const

Return the last modified date.

Definition at line 1526 of file ControlNet.cpp.

References p_modified.

◆ GetMaximumResidual()

double Isis::ControlNet::GetMaximumResidual ( )

Determine the maximum error of all points in the network.

Returns
double Max error of points
History
2010-01-12 Tracie Sucharski - Renamed from MaximumError

Definition at line 1331 of file ControlNet.cpp.

References Isis::ControlMeasure::GetResidualMagnitude(), and points.

◆ GetMeasuresInCube()

QList< ControlMeasure * > Isis::ControlNet::GetMeasuresInCube ( QString serialNumber)

Get all the measures pertaining to a given cube serial number.

Returns
A list of all measures which are in a given cube

Definition at line 1061 of file ControlNet.cpp.

References m_controlGraph, Isis::IException::Programmer, and ValidateSerialNumber().

Referenced by Isis::ControlNetFilter::FilterOutMeasuresBySerialNum(), Isis::ControlNetStatistics::GenerateImageStats(), GetValidMeasuresInCube(), and Isis::ChipViewport::paintEvent().

◆ GetNetworkId()

QString Isis::ControlNet::GetNetworkId ( ) const

Definition at line 1346 of file ControlNet.cpp.

◆ GetNumberOfJigsawRejectedMeasuresInImage()

int Isis::ControlNet::GetNumberOfJigsawRejectedMeasuresInImage ( const QString & serialNumber)

Return the number of jigsaw rejected measures in image specified by serialNumber.

Returns
Number of jigsaw rejected measures in image

Definition at line 1421 of file ControlNet.cpp.

References p_cameraRejectedMeasuresMap.

◆ GetNumberOfValidMeasuresInImage()

int Isis::ControlNet::GetNumberOfValidMeasuresInImage ( const QString & serialNumber)

Return the number of measures in image specified by serialNumber.

Returns
Number of valid measures in image
History
2013-12-18 Tracie Sucharski - Renamed from GetNumberOfMeasuresInImage, it is returning a count of only valid measures (Ignore=False).

Definition at line 1407 of file ControlNet.cpp.

References GetValidMeasuresInCube(), p_cameraList, and p_cameraValidMeasuresMap.

Referenced by Isis::ControlNetVitals::addMeasureToCounts(), Isis::ControlNetVitals::initializeVitals(), and Isis::ControlNetVitals::removeMeasureFromCounts().

◆ GetNumEditLockMeasures()

int Isis::ControlNet::GetNumEditLockMeasures ( )

Return the total number of edit locked measures for all control points in the network.

Returns
Number of edit locked measures

Definition at line 1357 of file ControlNet.cpp.

References points.

Referenced by Isis::ControlNetStatistics::GenerateControlNetStats().

◆ GetNumEditLockPoints()

int Isis::ControlNet::GetNumEditLockPoints ( )

Returns the number of edit locked control points.

Returns
Number of edit locked control points

Definition at line 1372 of file ControlNet.cpp.

References points.

Referenced by Isis::ControlNetStatistics::GenerateControlNetStats().

◆ GetNumIgnoredMeasures()

int Isis::ControlNet::GetNumIgnoredMeasures ( )

Return the total number of ignored measures for all control points in the network.

Returns
Number of valid measures

Definition at line 1389 of file ControlNet.cpp.

References points.

◆ GetNumMeasures()

int Isis::ControlNet::GetNumMeasures ( ) const

Returns the total number of measures for all control points in the network.

Returns
Number of control measures

Definition at line 1462 of file ControlNet.cpp.

References points.

Referenced by Isis::ControlNetVitals::addPoint(), and Isis::ControlNetVitals::initializeVitals().

◆ GetNumPoints()

◆ GetNumValidMeasures()

int Isis::ControlNet::GetNumValidMeasures ( )

Return the number of valid (non-ignored) measures for all control points in the network.

Returns
Number of valid measures
History
2011-03-17 Debbie A. Cook - Modified to not count ignored measures.

Definition at line 1487 of file ControlNet.cpp.

References points.

◆ GetNumValidPoints()

int Isis::ControlNet::GetNumValidPoints ( )

Returns the number of non-ignored control points.

Returns
Number of valid control points

Definition at line 1503 of file ControlNet.cpp.

References points.

◆ GetPoint() [1/4]

ControlPoint * Isis::ControlNet::GetPoint ( int index)

Definition at line 1855 of file ControlNet.cpp.

◆ GetPoint() [2/4]

const ControlPoint * Isis::ControlNet::GetPoint ( int index) const

Definition at line 1845 of file ControlNet.cpp.

◆ GetPoint() [3/4]

ControlPoint * Isis::ControlNet::GetPoint ( QString pointId)

Definition at line 1834 of file ControlNet.cpp.

◆ GetPoint() [4/4]

const ControlPoint * Isis::ControlNet::GetPoint ( QString pointId) const

Definition at line 1823 of file ControlNet.cpp.

◆ GetPointIds()

QList< QString > Isis::ControlNet::GetPointIds ( ) const

Return QList of ControlPoint Ids used in hash, in order of addition.

Definition at line 1544 of file ControlNet.cpp.

References pointIds.

◆ GetPoints()

◆ GetSerialConnections()

QList< QList< QString > > Isis::ControlNet::GetSerialConnections ( ) const

This method searches through all the cube serial numbers in the network.

Serials which are connected to other serials through points are grouped together in the same lists. The list containing the lists of strings is nothing more than a list of islands such that each island is a list of serials which are connected to each other. If the control network is completely connected, then this list will only have one element (a list of all the serials in the network).

Returns
A list of cube islands as serial numbers

Definition at line 963 of file ControlNet.cpp.

References m_controlGraph.

Referenced by Isis::MosaicControlNetTool::displayConnectivity(), Isis::ControlNetVitals::initializeVitals(), and Isis::ControlNetVitals::validateNetwork().

◆ GetTarget()

QString Isis::ControlNet::GetTarget ( ) const

Return the target name.

Definition at line 1515 of file ControlNet.cpp.

References p_targetName.

◆ GetUserName()

QString Isis::ControlNet::GetUserName ( ) const

Return the user name.

Definition at line 1521 of file ControlNet.cpp.

References p_userName.

◆ GetValidMeasuresInCube()

QList< ControlMeasure * > Isis::ControlNet::GetValidMeasuresInCube ( QString serialNumber)

Get all the valid measures pertaining to a given cube serial number.

Returns
A list of all valid measures which are in a given cube

Definition at line 1077 of file ControlNet.cpp.

References GetMeasuresInCube().

Referenced by Isis::ControlNetVitals::getImagesBelowMeasureThreshold(), and GetNumberOfValidMeasuresInImage().

◆ GraphToString()

QString Isis::ControlNet::GraphToString ( ) const

Used for verifying graph intergrity.

Returns
A string representation of the ControlNet graph

Definition at line 495 of file ControlNet.cpp.

References getAdjacentImages(), GetCubeSerials(), Isis::ControlPoint::GetId(), m_controlGraph, pointIds, and Isis::toString().

◆ IncrementNumberOfRejectedMeasuresInImage()

void Isis::ControlNet::IncrementNumberOfRejectedMeasuresInImage ( const QString & serialNumber)

Increment number of jigsaw rejected measures in image specified by serialNumber.

Definition at line 1442 of file ControlNet.cpp.

References p_cameraRejectedMeasuresMap.

◆ measureAdded()

void Isis::ControlNet::measureAdded ( ControlMeasure * measure)
private

Updates the ControlNet graph for the measure's serial number to reflect the addition.

If there is currently no node for this measure's serial, then a new node is created with this measure as its first.

Parameters
measureThe measure added to the network.
Exceptions
IException::Programmer"NULL measure passed to ControlNet::measureAdded!"
IException::Programmer"Control measure with NULL parent passed to ControlNet::measureAdded!"
IException::Programmer"ControlNet does not contain the point."

Definition at line 578 of file ControlNet.cpp.

References addEdge(), ContainsPoint(), Isis::ControlPoint::GetId(), Isis::ControlPoint::GetMeasure(), m_controlGraph, and Isis::IException::Programmer.

Referenced by Isis::ControlPoint::AddMeasure().

◆ measureDeleted()

void Isis::ControlNet::measureDeleted ( ControlMeasure * measure)
private

Updates the node for this measure's serial number to reflect the deletion.

Parameters
measureThe measure removed from the network.

Definition at line 752 of file ControlNet.cpp.

References m_controlGraph, and measureIgnored().

Referenced by Isis::ControlPoint::Delete().

◆ measureIgnored()

void Isis::ControlNet::measureIgnored ( ControlMeasure * measure)
private

Updates the edges in the ControlNet graph to reflect the ignored measure.

If this was the last measure connecting one node to another, then the edge is deleted as well.

Parameters
measureThe measure set to ignored from the network.

Definition at line 817 of file ControlNet.cpp.

References Isis::ControlPoint::GetMeasure(), Isis::IException::Programmer, removeEdge(), and ValidateSerialNumber().

Referenced by measureDeleted().

◆ measureUnIgnored()

void Isis::ControlNet::measureUnIgnored ( ControlMeasure * measure)
private

Updates the connections for the ControlNet graph associated with the measure's serial number to reflect the unignoration.

Parameters
measureThe measure unignored from the network.
Exceptions
IException::Programmer"NULL measure passed to ControlNet::measureUnIgnored!"
IException::Programmer"Control measure with NULL parent passed to ControlNet::measureUnIgnored!"
IException::Programmer"ControlNet does not contain the point."
IException::Programmer"Node does not exist for the cube serial number."

Definition at line 681 of file ControlNet.cpp.

References addEdge(), ContainsPoint(), Isis::ControlPoint::GetId(), Isis::ControlPoint::GetMeasure(), and Isis::IException::Programmer.

◆ nullify()

void Isis::ControlNet::nullify ( )
private

Definition at line 50 of file ControlNet.cpp.

◆ operator=()

ControlNet & Isis::ControlNet::operator= ( const ControlNet & other)

Assign other to this.

This is an exception-safe assignment operator.

Parameters
otherThe control net to assign to this.

Definition at line 1811 of file ControlNet.cpp.

References swap().

◆ operator[]() [1/4]

ControlPoint * Isis::ControlNet::operator[] ( int id)

Definition at line 1889 of file ControlNet.cpp.

◆ operator[]() [2/4]

const ControlPoint * Isis::ControlNet::operator[] ( int id) const

Definition at line 1884 of file ControlNet.cpp.

◆ operator[]() [3/4]

ControlPoint * Isis::ControlNet::operator[] ( QString id)

Definition at line 1879 of file ControlNet.cpp.

◆ operator[]() [4/4]

const ControlPoint * Isis::ControlNet::operator[] ( QString id) const

Definition at line 1874 of file ControlNet.cpp.

◆ pointAdded()

void Isis::ControlNet::pointAdded ( ControlPoint * point)
private

Adds a whole point to the control net graph.

Exceptions
IException::Programmer"NULL measure passed to ControlNet::pointAdded!"
IException::Programmer"Control measure with NULL parent passed to ControlNet::pointAdded"
IException::Programmer"ControlNet does not contain the point."

Definition at line 382 of file ControlNet.cpp.

References addEdge(), ContainsPoint(), Isis::ControlPoint::GetId(), Isis::ControlPoint::GetMeasure(), Isis::ControlPoint::getMeasures(), m_controlGraph, and Isis::IException::Programmer.

Referenced by AddPoint().

◆ pointIgnored()

void Isis::ControlNet::pointIgnored ( ControlPoint * point)
private

Update the ControlNet's internal structure when a ControlPoint is ignored.

Parameters
pointA pointer to the ignored point.

Definition at line 775 of file ControlNet.cpp.

References Isis::ControlPoint::getMeasures(), Isis::IException::Programmer, removeEdge(), and ValidateSerialNumber().

Referenced by Isis::ControlPoint::SetIgnored().

◆ pointUnIgnored()

void Isis::ControlNet::pointUnIgnored ( ControlPoint * point)
private

Update the ControlNet's internal structure when a ControlPoint is un-ignored.

Parameters
pointA pointer to the un-ignored point.

Definition at line 635 of file ControlNet.cpp.

References addEdge(), Isis::ControlPoint::getMeasures(), Isis::IException::Programmer, and ValidateSerialNumber().

Referenced by Isis::ControlPoint::SetIgnored().

◆ ReadControl()

void Isis::ControlNet::ReadControl ( const QString & filename,
Progress * progress = 0 )

Reads in the control points from the given file.

Parameters
ptfileName of file containing a Pvl list of control points
progressA pointer to the progress of reading in the control points
Exceptions
Isis::iException::User- "Invalid Network Type"
Isis::iException::User- "Invalid Control Point"
Isis::iException::User- "Invalid Format"
History

2009-04-07 Tracie Sucharski - Keep track of ignored measures.

2010-08-06 Tracie Sucharski, Updated for changes made after additional working sessions for Control network design.

2011-04-02 Debbie A. Cook - Added code to set the target radii in the surface points of the control points as they are read into memory instead of setting parent prematurely to be able to set the radii in ControlPoint.

2017-12-21 Jesse Mapel - Modified to use the ControlNetVersioner.

2018-04-05 Adam Goins - Added a check to the versionedReader targetRadii group to set radii values to those ingested from the versioner if they exist. Otherwise, we call SetTarget with the targetname.

Definition at line 269 of file ControlNet.cpp.

References AddPoint(), Isis::Progress::CheckStatus(), p_created, p_description, p_modified, p_networkId, p_userName, Isis::Progress::SetMaximumSteps(), SetTarget(), and Isis::Progress::SetText().

Referenced by ControlNet().

◆ removeEdge()

bool Isis::ControlNet::removeEdge ( QString sourceSerial,
QString targetSerial )
private

In the ControlNet graph, decrements the strength on the edge between the two serial numbers.

This is called when the ControlMeasures that connect these images are deleted or ignored. If it is the last measure connecting two verticies (serial numbers) the edge is removed.

Parameters
sourceSerialThe first serial number defining the end of the edge to have its strength decremented or be removed.
targetSerialThe second serial number defining the other end of the edge to have its strength decremented or be removed.
Returns
bool true if the edge is removed, otherwise false

Definition at line 469 of file ControlNet.cpp.

References m_controlGraph.

Referenced by measureIgnored(), and pointIgnored().

◆ SetCoordType()

void Isis::ControlNet::SetCoordType ( SurfacePoint::CoordinateType coordType)

Sets the control point coordinate type.

Parameters
coordTypeControl point coordinate type

Definition at line 857 of file ControlNet.cpp.

References m_coordType.

◆ SetCreatedDate()

void Isis::ControlNet::SetCreatedDate ( const QString & date)

Set the creation time.

Parameters
dateThe date this Control Network was created

Definition at line 1554 of file ControlNet.cpp.

References p_created.

◆ SetDescription()

void Isis::ControlNet::SetDescription ( const QString & newDescription)

Set the description of the network.

Parameters
descThe description of this Control Network

Definition at line 1564 of file ControlNet.cpp.

References p_description.

◆ SetImages() [1/2]

void Isis::ControlNet::SetImages ( const QString & imageListFile)

Creates the ControlNet's image cameras based on an input file.

Parameters
imageListFileThe list of images

Definition at line 1574 of file ControlNet.cpp.

References SetImages().

Referenced by Isis::QnetFileTool::open(), Isis::Project::setActiveImageList(), and SetImages().

◆ SetImages() [2/2]

void Isis::ControlNet::SetImages ( SerialNumberList & list,
Progress * progress = 0 )

Creates the ControlNet's image camera's based on the list of Serial Numbers.

Parameters
listThe list of Serial Numbers
progressA pointer to the progress of creating the cameras
Exceptions
Isis::iException::System- "Unable to create camera for cube file"
Isis::iException::User- "Control point measure does not have a cube with a matching serial number"
History

2009-01-06 Jeannie Walldren - Fixed typo in exception output.

2016-10-13 Ian Humphrey - Added initial check to see if cameras have already been set, and immediately return if yes. References #4293.

Definition at line 1595 of file ControlNet.cpp.

References Isis::Progress::CheckStatus(), Isis::CameraFactory::Create(), Isis::SerialNumberList::fileName(), Isis::ControlMeasure::GetCubeSerialNumber(), Isis::SerialNumberList::hasSerialNumber(), p_cameraList, p_cameraMap, p_cameraRejectedMeasuresMap, p_cameraValidMeasuresMap, points, Isis::SerialNumberList::serialNumber(), Isis::Progress::SetMaximumSteps(), Isis::Progress::SetText(), Isis::SerialNumberList::size(), Isis::IException::Unknown, and Isis::IException::User.

◆ SetModifiedDate()

void Isis::ControlNet::SetModifiedDate ( const QString & date)

Set the last modified date.

Parameters
dateThe last date this Control Network was modified

Definition at line 1662 of file ControlNet.cpp.

References p_modified.

◆ SetMutex()

void Isis::ControlNet::SetMutex ( QMutex * mutex)

Set mutex to lock for making Naif calls.

Author
2012-09-11 Tracie Sucharski
Parameters
mutex

Definition at line 1674 of file ControlNet.cpp.

Referenced by Isis::Control::openControlNet().

◆ SetNetworkId()

void Isis::ControlNet::SetNetworkId ( const QString & id)

Set the network id.

Parameters
idThe Id of this Control Network

Definition at line 1684 of file ControlNet.cpp.

References p_networkId.

◆ SetTarget() [1/2]

void Isis::ControlNet::SetTarget ( const QString & target)

Sets the target name and target radii, if available.

Note: The target radii are found using NAIF target codes. If the given target name is not recognized, the target radii vector will be filled with Isis::Null values.

See also
Target::radiiGroup(QString)
Parameters
targetThe name of the target of this Control Network

Definition at line 1700 of file ControlNet.cpp.

References p_targetName.

Referenced by Isis::QnetFileTool::open(), and ReadControl().

◆ SetTarget() [2/2]

void Isis::ControlNet::SetTarget ( Pvl label)

Sets the target name and radii using values found in the mapping group of the given label, if available.

If this fails, calls SetTarget(QString).

Parameters
labelA PVL Containing Target information (usually in a Mapping group or NaifKeywords object).

Definition at line 1712 of file ControlNet.cpp.

References Isis::PvlObject::findGroup(), Isis::PvlObject::findObject(), Isis::PvlObject::hasGroup(), Isis::PvlObject::hasObject(), p_targetName, and Isis::PvlObject::Traverse.

◆ SetUserName()

void Isis::ControlNet::SetUserName ( const QString & name)

Set the user name of the control network.

Parameters
nameThe name of the user creating or modifying this ControlNet

Definition at line 1738 of file ControlNet.cpp.

References p_userName.

Referenced by Isis::QnetFileTool::open().

◆ sortedMeasureList()

QList< ControlMeasure * > Isis::ControlNet::sortedMeasureList ( double(ControlMeasure::*)() const statFunc,
double min,
double max )

Get a sorted list of all the measures that have values in a given ragen.

Parameters
statFuncA pointer to a control Measure acessor
minthe minimum value of acessor return for list inclusion
maxthe maximum value of acessor return for list inclusion

Definition at line 1129 of file ControlNet.cpp.

References Isis::ControlPoint::GetMeasure(), and GetNumPoints().

◆ swap()

void Isis::ControlNet::swap ( ControlNet & other)

Swaps the member data with the given control net.

This is an optimized form of: ControlNet a = ... ControlNet b = ...

Swap 'a' and 'b' ControlNet tmp = a; a = b; b = tmp;

This is used primarily for the assignment operator in order to do copy-and-swap.

Parameters
otherThe control net to swap with.

Definition at line 1757 of file ControlNet.cpp.

References m_controlGraph, p_cameraList, p_cameraMap, p_cameraRejectedMeasuresMap, p_cameraValidMeasuresMap, p_created, p_description, p_modified, p_networkId, p_targetName, p_userName, pointIds, and points.

Referenced by operator=().

◆ take()

QList< ControlPoint * > Isis::ControlNet::take ( )

Transfer ownership of all points to caller.

This method is used to transfer ownership to the caller. This method is not reintrant in the sense that if someone else has already made this call, it is an error to attempt to take ownership again.

Note that it now becomes the responsibility of the caller to delete all the pointers to ControlPoints that are returned in the list.

WARNING!!! This call alone can create a situation where the owner could delete point memory after the point list is exported from this class creating a problem. For this reason, the clear() method be called!!!

Author
Kris Becker
Returns
QList<ControlPoint*> Returns the list of all control points to caller

Definition at line 224 of file ControlNet.cpp.

References clear(), GetPoints(), m_ownPoints, points, and Isis::IException::Programmer.

◆ UpdatePointReference()

void Isis::ControlNet::UpdatePointReference ( ControlPoint * point,
QString oldId )
private

Updates the key reference (poind Id) from the old one to what the point id was changet to.

This method should only be called from ControlPoint's SetId().

Parameters
pointThe point that needs to be updated.
oldIdThe pointId that the point had.

Definition at line 739 of file ControlNet.cpp.

References Isis::ControlPoint::GetId(), pointIds, and points.

Referenced by Isis::ControlPoint::SetId().

◆ ValidateSerialNumber()

bool Isis::ControlNet::ValidateSerialNumber ( QString serialNumber) const
private

Does a check to ensure that the given serial number is contained within the network.

Parameters
serialNumberthe cube serial number to validate
Returns
bool If the serial number is contained in the network.

Definition at line 1025 of file ControlNet.cpp.

Referenced by FindClosest(), getAdjacentImages(), GetMeasuresInCube(), measureIgnored(), pointIgnored(), and pointUnIgnored().

◆ Write()

void Isis::ControlNet::Write ( const QString & ptfile,
bool pvl = false )

Writes out the control network.

Parameters
ptfileName of file containing a Pvl list of control points
pvlBoolean indicating whether to write in pvl format (Default=false)
History

2010-10-05 Tracie Sucharski - Renamed old WRite method to WritePvl and created this new method to determine format to be written.

2017-12-21 Jesse Mapel - Modified to use new ControlNetVersioner.

Definition at line 309 of file ControlNet.cpp.

References Isis::IException::Io, and Isis::IException::Programmer.

Referenced by Isis::Control::copyToNewProjectRoot(), Isis::QnetFileTool::save(), Isis::QnetFileTool::saveAs(), and Isis::Control::write().

Friends And Related Symbol Documentation

◆ ControlMeasure

friend class ControlMeasure
friend

Definition at line 261 of file ControlNet.h.

◆ ControlPoint

friend class ControlPoint
friend

Definition at line 262 of file ControlNet.h.

Member Data Documentation

◆ m_controlGraph

Network Isis::ControlNet::m_controlGraph
private

◆ m_coordType

SurfacePoint::CoordinateType Isis::ControlNet::m_coordType
private

The coordinate type of the control points.

Definition at line 480 of file ControlNet.h.

Referenced by ControlNet(), ControlNet(), GetCoordType(), and SetCoordType().

◆ m_mutex

QMutex* Isis::ControlNet::m_mutex
private

Definition at line 465 of file ControlNet.h.

◆ m_ownPoints

bool Isis::ControlNet::m_ownPoints
private

Specifies ownership of point list. True if owned by this object.

Definition at line 479 of file ControlNet.h.

Referenced by clear(), ControlNet(), ControlNet(), and take().

◆ m_vertexMap

QHash<QString, ImageVertex> Isis::ControlNet::m_vertexMap
private

Definition at line 462 of file ControlNet.h.

◆ p_cameraList

QVector<Isis::Camera *> Isis::ControlNet::p_cameraList
private

Vector of image number to camera.

Definition at line 477 of file ControlNet.h.

Referenced by Camera(), GetNumberOfValidMeasuresInImage(), SetImages(), and swap().

◆ p_cameraMap

QMap<QString, Isis::Camera *> Isis::ControlNet::p_cameraMap
private

A map from serialnumber to camera.

Definition at line 473 of file ControlNet.h.

Referenced by Camera(), SetImages(), and swap().

◆ p_cameraRejectedMeasuresMap

QMap<QString, int> Isis::ControlNet::p_cameraRejectedMeasuresMap
private

A map from serialnumber to #rejected measures.

Definition at line 475 of file ControlNet.h.

Referenced by DecrementNumberOfRejectedMeasuresInImage(), GetNumberOfJigsawRejectedMeasuresInImage(), IncrementNumberOfRejectedMeasuresInImage(), SetImages(), and swap().

◆ p_cameraValidMeasuresMap

QMap<QString, int> Isis::ControlNet::p_cameraValidMeasuresMap
private

A map from serialnumber to #measures.

Definition at line 474 of file ControlNet.h.

Referenced by GetNumberOfValidMeasuresInImage(), SetImages(), and swap().

◆ p_created

QString Isis::ControlNet::p_created
private

Creation Date.

Definition at line 469 of file ControlNet.h.

Referenced by ControlNet(), CreatedDate(), ReadControl(), SetCreatedDate(), and swap().

◆ p_description

QString Isis::ControlNet::p_description
private

Textual Description of network.

Definition at line 471 of file ControlNet.h.

Referenced by Description(), ReadControl(), SetDescription(), and swap().

◆ p_modified

QString Isis::ControlNet::p_modified
private

Date Last Modified.

Definition at line 470 of file ControlNet.h.

Referenced by ControlNet(), GetLastModified(), ReadControl(), SetModifiedDate(), and swap().

◆ p_networkId

QString Isis::ControlNet::p_networkId
private

The Network Id.

Definition at line 468 of file ControlNet.h.

Referenced by ReadControl(), SetNetworkId(), and swap().

◆ p_targetName

QString Isis::ControlNet::p_targetName
private

Name of the target.

Definition at line 467 of file ControlNet.h.

Referenced by GetTarget(), SetTarget(), SetTarget(), and swap().

◆ p_userName

QString Isis::ControlNet::p_userName
private

The user who created the network.

Definition at line 472 of file ControlNet.h.

Referenced by GetUserName(), ReadControl(), SetUserName(), and swap().

◆ pointIds

QStringList* Isis::ControlNet::pointIds
private

◆ points


The documentation for this class was generated from the following files: