USGS

Isis 3.0 Developer's Reference (API)

Home

Isis::ControlNet Class Reference

a control network More...

#include <ControlNet.h>

Inherits QObject.

List of all members.

Signals

void networkStructureModified ()

Public Member Functions

 ControlNet ()
 Creates an empty ControlNet object.
 ControlNet (const ControlNet &other)
 ControlNet (const iString &filename, Progress *progress=0)
 Creates a ControlNet object with the given list of control points and cubes.
 ~ControlNet ()
void ReadControl (const iString &filename, Progress *progress=0)
 Reads in the control points from the given file.
void Write (const iString &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 (iString 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 (iString pointId) const
QList< QString > GetCubeSerials () const
 Use this method to get a complete list of all the cube serial numbers in the network.
QList< ControlCubeGraphNode * > GetCubeGraphNodes ()
QList< QList< QString > > GetSerialConnections () const
 This method searches through all the cube serial numbers in the network.
QList< QList
< ControlCubeGraphNode * > > 
GetNodeConnections () const
 This method searches through all the cube serial numbers in the network.
int getEdgeCount () const
iString CubeGraphToString () const
 Used for verifying graph intergrity.
QList< ControlMeasure * > GetMeasuresInCube (iString serialNumber)
 Get all the measures pertaining to a given cube serial number.
void DeleteMeasuresWithId (iString serialNumber)
 Essentially removes a cube from the networkid.
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)
const ControlCubeGraphNodegetGraphNode (QString serialNumber) const
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.
iString CreatedDate () const
 Return the Created Date.
iString Description () const
 Return the description of the network.
ControlPointFindClosest (iString 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.
bool IsValid () const
 Return if the control point is invalid.
double GetMaximumResidual ()
 Determine the maximum error of all points in the network.
iString 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 GetNumberOfMeasuresInImage (const std::string &serialNumber)
 Return the number of measures in image specified by serialNumber.
int GetNumberOfJigsawRejectedMeasuresInImage (const std::string &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 std::string &serialNumber)
 Increment number of jigsaw rejected measures in image specified by serialNumber.
void DecrementNumberOfRejectedMeasuresInImage (const std::string &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.
iString GetTarget () const
 Return the target name.
iString GetUserName () const
 Return the user name.
QList< ControlPoint * > getPoints () const
 Return QList of ControlPoints.
QList< QString > GetPointIds () const
 Return QList of ControlPoint Ids used in hash, in order of addition.
std::vector< DistanceGetTargetRadii ()
 Get the target radii.
void SetCreatedDate (const iString &date)
 Set the creation time.
void SetDescription (const iString &newDescription)
 Set the description of the network.
void SetImages (const iString &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 iString &date)
 Set the last modified date.
void SetNetworkId (const iString &id)
 Set the network id.
void SetTarget (const iString &target)
 Set the target name.
void SetUserName (const iString &name)
 Set the user name.
const ControlNetoperator= (ControlNet other)
const ControlPointoperator[] (QString id) const
ControlPointoperator[] (QString id)
const ControlPointoperator[] (int id) const
ControlPointoperator[] (int id)

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

Constructor & Destructor Documentation

Isis::ControlNet::ControlNet (  ) 

Creates an empty ControlNet object.

Isis::ControlNet::ControlNet ( const ControlNet other  ) 
Isis::ControlNet::ControlNet ( const iString ptfile,
Progress progress = 0 
)

Creates a ControlNet object with the given list of control points and cubes.

Parameters:
ptfile Name of file containing a Pvl list of control points
progress A pointer to the progress of reading in the control points

References ReadControl().

Isis::ControlNet::~ControlNet (  ) 

Member Function Documentation

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

Adds a ControlPoint to the ControlNet.

Parameters:
point Control point to be added
Exceptions:
Isis::iException::Programmer - "ControlPoint must have unique Id"

References _FILEINFO_, ContainsPoint(), Isis::ControlPoint::GetId(), Isis::ControlPoint::getMeasures(), Isis::iException::Message(), networkStructureModified(), and Isis::iException::Programmer.

Referenced by ReadControl().

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

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

Referenced by Isis::BundleAdjust::Solve().

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

Returns the camera list from the given image number.

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

Referenced by Isis::BundleAdjust::Cmatrix(), Isis::BundleAdjust::Solve(), Isis::BundleAdjust::SolveCholesky(), and Isis::BundleAdjust::SpVector().

void Isis::ControlNet::ClearJigsawRejected (  ) 

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

Called by BundleAdjust::Init method

References Isis::ControlPoint::ClearJigsawRejected().

void Isis::ControlNet::ComputeApriori (  ) 

Compute aprior values for each point in the network.

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

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

Referenced by Isis::BundleAdjust::Solve(), and Isis::BundleAdjust::SolveCholesky().

void Isis::ControlNet::ComputeResiduals (  ) 

Compute error for each point in the network.

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

Referenced by Isis::BundleAdjust::Solve().

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

Referenced by AddPoint().

iString Isis::ControlNet::CreatedDate (  )  const

Return the Created Date.

Author:
Sharmila Prasad (10/6/2010)
Returns:
std::string
iString Isis::ControlNet::CubeGraphToString (  )  const

Used for verifying graph intergrity.

Returns:
A string representation of the cube graph

References str.

void Isis::ControlNet::DecrementNumberOfRejectedMeasuresInImage ( const std::string &  serialNumber  ) 

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

void Isis::ControlNet::DeleteMeasuresWithId ( iString  serialNumber  ) 

Essentially removes a cube from the networkid.

Parameters:
serialNumber The cube serial number to be removed from the network

References Isis::ControlPoint::Delete(), Isis::ControlCubeGraphNode::getMeasures(), and Isis::ControlMeasure::Parent().

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

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

Parameters:
index The index of the Control Point to be deleted.

References _FILEINFO_, DeletePoint(), Isis::iException::Message(), and Isis::iException::Programmer.

int Isis::ControlNet::DeletePoint ( iString  pointId  ) 
int Isis::ControlNet::DeletePoint ( ControlPoint point  ) 

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

Parameters:
point The point to delete

References _FILEINFO_, Isis::ControlPoint::GetId(), Isis::iException::Message(), and Isis::iException::User.

Referenced by DeletePoint().

iString Isis::ControlNet::Description (  )  const

Return the description of the network.

Returns:
The description of this Control Network
ControlPoint * Isis::ControlNet::FindClosest ( iString  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:
serialNumber The serial number of the the file the ControlMeasure is on
sample The sample number of the ControlMeasure
line The line number of the ControlMeasure
Returns:
ControlPoint* Pointer to the ControlPoint closest to the given line, sample position

References _FILEINFO_, dist, Isis::ControlMeasure::GetLine(), Isis::ControlCubeGraphNode::getMeasures(), Isis::ControlMeasure::GetSample(), Isis::iException::Message(), Isis::ControlMeasure::Parent(), and Isis::iException::Programmer.

QList< ControlCubeGraphNode * > Isis::ControlNet::GetCubeGraphNodes (  ) 
Returns:
A list of all the cube graph nodes in the network

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

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.
int Isis::ControlNet::getEdgeCount (  )  const
Returns:
The total number of edges in the bi-directional graph for images

References Isis::ControlCubeGraphNode::getAdjacentNodes().

const ControlCubeGraphNode * Isis::ControlNet::getGraphNode ( QString  serialNumber  )  const
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

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

Referenced by Isis::BundleAdjust::Solve().

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

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

Returns:
A list of all measures which are in a given cube
iString Isis::ControlNet::GetNetworkId (  )  const
QList< QList< ControlCubeGraphNode * > > Isis::ControlNet::GetNodeConnections (  )  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 graph nodes

Referenced by GetSerialConnections().

int Isis::ControlNet::GetNumberOfJigsawRejectedMeasuresInImage ( const std::string &  serialNumber  ) 

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

Returns:
Number of jigsaw rejected measures in image
int Isis::ControlNet::GetNumberOfMeasuresInImage ( const std::string &  serialNumber  ) 

Return the number of measures in image specified by serialNumber.

Returns:
Number of valid measures in image
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

References Isis::ControlPoint::GetNumLockedMeasures().

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

int Isis::ControlNet::GetNumEditLockPoints (  ) 

Returns the number of edit locked control points.

Returns:
Number of edit locked control points

References Isis::ControlPoint::IsEditLocked().

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

int Isis::ControlNet::GetNumIgnoredMeasures (  ) 

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

Returns:
Number of valid measures

References Isis::ControlPoint::GetNumMeasures(), and Isis::ControlPoint::GetNumValidMeasures().

int Isis::ControlNet::GetNumMeasures (  )  const

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

Returns:
Number of control measures

References Isis::ControlPoint::GetNumMeasures().

int Isis::ControlNet::GetNumPoints (  )  const
int Isis::ControlNet::GetNumValidMeasures (  ) 

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

Returns:
Number of valid measures

References Isis::ControlPoint::GetNumValidMeasures(), and Isis::ControlPoint::IsIgnored().

Referenced by Isis::BundleAdjust::Solve().

int Isis::ControlNet::GetNumValidPoints (  ) 

Returns the number of non-ignored control points.

Returns:
Number of valid control points

References Isis::ControlPoint::IsIgnored().

Referenced by Isis::BundleAdjust::BasisColumns(), and Isis::BundleAdjust::GetSparseParameterCorrections().

ControlPoint * Isis::ControlNet::GetPoint ( int  index  ) 
const ControlPoint * Isis::ControlNet::GetPoint ( int  index  )  const
ControlPoint * Isis::ControlNet::GetPoint ( QString  pointId  ) 
const ControlPoint * Isis::ControlNet::GetPoint ( QString  pointId  )  const
QList< QString > Isis::ControlNet::GetPointIds (  )  const

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

QList< ControlPoint * > Isis::ControlNet::getPoints (  )  const

Return QList of ControlPoints.

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

References append, and GetNodeConnections().

iString Isis::ControlNet::GetTarget (  )  const

Return the target name.

std::vector< Distance > Isis::ControlNet::GetTargetRadii (  ) 

Get the target radii.

Returns:
the radii of the target body

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

iString Isis::ControlNet::GetUserName (  )  const

Return the user name.

void Isis::ControlNet::IncrementNumberOfRejectedMeasuresInImage ( const std::string &  serialNumber  ) 

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

bool Isis::ControlNet::IsValid (  )  const

Return if the control point is invalid.

void Isis::ControlNet::networkStructureModified (  )  [signal]

Referenced by AddPoint(), and DeletePoint().

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

References GetPoint().

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

References GetPoint().

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

References GetPoint().

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

References GetPoint().

void Isis::ControlNet::ReadControl ( const iString filename,
Progress progress = 0 
)
void Isis::ControlNet::SetCreatedDate ( const iString date  ) 

Set the creation time.

Parameters:
date The date this Control Network was created
void Isis::ControlNet::SetDescription ( const iString newDescription  ) 

Set the description of the network.

Parameters:
desc The description of this Control Network
void Isis::ControlNet::SetImages ( SerialNumberList list,
Progress progress = 0 
)

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

Parameters:
list The list of Serial Numbers
progress A 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"

References _FILEINFO_, cam, Isis::Progress::CheckStatus(), Isis::SerialNumberList::Filename(), Isis::ControlMeasure::GetCubeSerialNumber(), Isis::ControlPoint::getCubeSerialNumbers(), Isis::ControlPoint::GetId(), Isis::SerialNumberList::HasSerialNumber(), Isis::ControlMeasure::IsIgnored(), Isis::iException::Message(), pvl(), Isis::SerialNumberList::SerialNumber(), Isis::ControlMeasure::SetCamera(), Isis::Progress::SetMaximumSteps(), Isis::Progress::SetText(), Isis::SerialNumberList::Size(), Isis::iException::System, and Isis::iException::User.

void Isis::ControlNet::SetImages ( const iString imageListFile  ) 

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

Parameters:
imageListFile The list of images
void Isis::ControlNet::SetModifiedDate ( const iString date  ) 

Set the last modified date.

Parameters:
date The last date this Control Network was modified
void Isis::ControlNet::SetNetworkId ( const iString id  ) 

Set the network id.

Parameters:
id The Id of this Control Network
void Isis::ControlNet::SetTarget ( const iString target  ) 

Set the target name.

Parameters:
target The name of the target of this Control Network

References Isis::Distance::Meters, and Isis::Projection::TargetRadii().

Referenced by ReadControl().

void Isis::ControlNet::SetUserName ( const iString name  ) 

Set the user name.

Parameters:
name The name of the user creating or modifying this Control Net
void Isis::ControlNet::Write ( const iString ptfile,
bool  pvl = false 
)

Writes out the control network.

Parameters:
ptfile Name of file containing a Pvl list of control points
pvl Boolean indicating whether to write in pvl format (Default=false)
Exceptions:
Isis::iException::Programmer - "Invalid Net Enumeration"
Isis::iException::Io - "Unable to write PVL infomation to file"
History:
2010-10-05 Tracie Sucharski - Renamed old WRite method to WritePvl and created this new method to determine format to be written.

References Isis::ControlNetFileV0002::GetNetworkHeader(), Isis::ControlNetFileV0002::GetNetworkPoints(), Isis::ControlNetFileHeaderV0002::set_created(), Isis::ControlNetFileHeaderV0002::set_description(), Isis::ControlNetFileHeaderV0002::set_lastmodified(), Isis::ControlNetFileHeaderV0002::set_networkid(), Isis::ControlNetFileHeaderV0002::set_targetname(), Isis::ControlNetFileHeaderV0002::set_username(), and Isis::ControlPoint::ToFileEntry().


Friends And Related Function Documentation

friend class ControlMeasure [friend]
friend class ControlPoint [friend]

Referenced by ControlNet(), operator=(), and ReadControl().


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