|
Isis 3.0 Object Programmers' Reference |
Home |
#include <ControlNet.h>
Collaboration diagram for Isis::ControlNet:

This class is used to store a network of ControlPoints
For internal use only.
Definition at line 76 of file ControlNet.h.
Public Types | |
| Singleton | |
| Singleton is a network that identifies unique points such as reseaus, tic-marks, etc. | |
| ImageToImage | |
| ImageToImage is a network used to tie two or more images together using line/sample coordinates only. | |
| ImageToGround | |
| ImageToGround is a network used to tie one or more images (typically many) between each other and a target (e.g., Mars). | |
| enum | NetworkType { Singleton, ImageToImage, ImageToGround } |
| Enumeration defining network type. More... | |
Public Member Functions | |
| ControlNet () | |
| Creates an empty ControlNet object. | |
| ControlNet (const std::string &ptfile, Progress *progress=0, bool forceBuild=false) | |
| Creates a ControlNet object with the given list of control points and cubes. | |
| ~ControlNet () | |
| Destroy the control network. | |
| void | SetType (const NetworkType &type) |
| Set the type of network. | |
| NetworkType | Type () const |
| Return the type of network. | |
| void | SetTarget (const std::string &target) |
| Set the target name. | |
| std::string | Target () const |
| Return the target name. | |
| void | SetNetworkId (const std::string &id) |
| Set the network id. | |
| std::string | NetworkId () const |
| Return the network id. | |
| void | SetUserName (const std::string &name) |
| Set the user name. | |
| std::string | UserName () const |
| Return the user name. | |
| void | SetDescription (const std::string &desc) |
| Set the description of the network. | |
| std::string | Description () const |
| Return the description of the network. | |
| void | SetCreatedDate (const std::string &date) |
| Set the creation time. | |
| void | SetModifiedDate (const std::string &date) |
| Set the last modified date. | |
| ControlPoint & | operator[] (int index) |
| Return the ith control point. | |
| int | Size () const |
| Return the number of control points in the network. | |
| int | NumValidPoints () |
| Returns the number of non-ignored control points. | |
| bool | Invalid () const |
| Return if the control point is invalid. | |
| int | NumMeasures () const |
| Return the total number of measures for all control points in the network. | |
| int | NumValidMeasures () const |
| Return the number of valid (non-ignored) measures. | |
| int | NumIgnoredMeasures () const |
| Return the number of ignored measures. | |
| void | Add (const ControlPoint &point, bool forceBuild=false) |
| Adds a ControlPoint to the ControlNet. | |
| void | Delete (int index) |
| Deletes the ControlPoint at the specified index in the ControlNet. | |
| void | Delete (const std::string &id) |
| Deletes the ControlPoint with the given id in the ControlNet. | |
| void | ReadControl (const std::string &ptfile, Progress *progress=0, bool forceBuild=false) |
| Reads in the control points from the given file. | |
| void | Write (const std::string &ptfile) |
| Writes out the ControlPoints. | |
| ControlPoint * | Find (const std::string &id) |
| Finds and returns a pointer to the ControlPoint with the specified id. | |
| ControlPoint * | FindClosest (const std::string &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 | Exists (ControlPoint &point) |
| Returns true if the given ControlPoint has the same id as another ControlPoint in class. | |
| double | AverageError () |
| Compute the average error of all points in the network. | |
| double | MaximumError () |
| Determine the maximum error of all points in the network. | |
| void | ComputeErrors () |
| Compute error for each point in the network. | |
| void | ComputeApriori () |
| Compute aprior values for each point in the network. | |
| void | SetImages (const std::string &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. | |
| Isis::Camera * | Camera (int index) |
| Returns the camera list from the given image number. | |
Private Attributes | |
| QVector< QString > | p_pointIds |
| QVector of ControlPoint Ids. | |
| QHash< QString, ControlPoint > | p_pointsHash |
| Hash table of Control Points. | |
| std::string | p_targetName |
| Name of the target. | |
| std::string | p_networkId |
| The Network Id. | |
| std::string | p_created |
| Creation Date. | |
| std::string | p_modified |
| Date Last Modified. | |
| std::string | p_description |
| Textual Description of network. | |
| std::string | p_userName |
| The user who created the network. | |
| NetworkType | p_type |
| The type of network being used. | |
| int | p_numMeasures |
| Total number of measures in the network. | |
| int | p_numIgnoredMeasures |
| Number of ignored measures. | |
| std::map< std::string, Isis::Camera * > | p_cameraMap |
| A map from serialnumber to camera. | |
| std::vector< Isis::Camera * > | p_cameraList |
| Vector of image number to camera. | |
| bool | p_invalid |
| If the Control Network is currently invalid. | |
Enumeration defining network type.
| Singleton | Singleton is a network that identifies unique points such as reseaus, tic-marks, etc. |
| ImageToImage | ImageToImage is a network used to tie two or more images together using line/sample coordinates only. |
| ImageToGround | ImageToGround is a network used to tie one or more images (typically many) between each other and a target (e.g., Mars). |
Definition at line 88 of file ControlNet.h.
| Isis::ControlNet::ControlNet | ( | ) |
Creates an empty ControlNet object.
Definition at line 9 of file ControlNet.cpp.
References p_invalid, p_numIgnoredMeasures, and p_numMeasures.
| Isis::ControlNet::ControlNet | ( | const std::string & | ptfile, | |
| Progress * | progress = 0, |
|||
| bool | forceBuild = false | |||
| ) |
Creates a ControlNet object with the given list of control points and cubes.
| ptfile | Name of file containing a Pvl list of control points | |
| progress | A pointer to the progress of reading in the control points | |
| forceBuild | Forces invalid Control Points to be added to this Control Network |
Definition at line 24 of file ControlNet.cpp.
References p_invalid, p_numIgnoredMeasures, p_numMeasures, and ReadControl().
| Isis::ControlNet::~ControlNet | ( | ) | [inline] |
| void Isis::ControlNet::Add | ( | const ControlPoint & | point, | |
| bool | forceBuild = false | |||
| ) |
Adds a ControlPoint to the ControlNet.
| point | Control point to be added | |
| forceBuild | Forces invalid Control Points to be added to this Control Network |
| Isis::iException::Programmer | - "ControlPoint must have unique Id" |
Definition at line 42 of file ControlNet.cpp.
References _FILEINFO_, Isis::ControlPoint::Id(), Isis::iException::Message(), p_pointIds, and p_pointsHash.
Referenced by ReadControl().
| double Isis::ControlNet::AverageError | ( | ) |
Compute the average error of all points in the network.
Definition at line 373 of file ControlNet.cpp.
References p_pointIds, and p_pointsHash.
Referenced by Isis::BundleAdjust::Solve().
| Isis::Camera* Isis::ControlNet::Camera | ( | int | index | ) | [inline] |
Returns the camera list from the given image number.
| index | The image number |
Definition at line 216 of file ControlNet.h.
Referenced by Isis::BundleAdjust::Cmatrix(), Isis::BundleAdjust::Solve(), Isis::BundleAdjust::SpVector(), and Isis::BundleAdjust::Update().
| void Isis::ControlNet::ComputeApriori | ( | ) |
Compute aprior values for each point in the network.
Definition at line 335 of file ControlNet.cpp.
References p_pointIds, and p_pointsHash.
Referenced by Isis::BundleAdjust::Solve().
| void Isis::ControlNet::ComputeErrors | ( | ) |
Compute error for each point in the network.
Definition at line 346 of file ControlNet.cpp.
References p_pointIds, and p_pointsHash.
Referenced by Isis::BundleAdjust::Solve().
| void Isis::ControlNet::Delete | ( | const std::string & | id | ) |
Deletes the ControlPoint with the given id in the ControlNet.
| id | The id of the ControlPoint to be deleted |
| Isis::iException::User | - "A ControlPoint matching the id was not found in the ControlNet" |
Definition at line 97 of file ControlNet.cpp.
References _FILEINFO_, Isis::iException::Message(), p_pointIds, and p_pointsHash.
| void Isis::ControlNet::Delete | ( | int | index | ) |
Deletes the ControlPoint at the specified index in the ControlNet.
| index | The index of the ControlPoint to be deleted |
| Isis::iException::User | - "There is no ControlPoint at the given index number" |
Definition at line 61 of file ControlNet.cpp.
References _FILEINFO_, Invalid(), Isis::iException::Message(), p_invalid, p_pointIds, p_pointsHash, and Size().
| std::string Isis::ControlNet::Description | ( | ) | const [inline] |
Return the description of the network.
Definition at line 145 of file ControlNet.h.
References p_description.
| bool Isis::ControlNet::Exists | ( | ControlPoint & | point | ) |
Returns true if the given ControlPoint has the same id as another ControlPoint in class.
| point | The ControlPoint whos id is being compared |
Definition at line 290 of file ControlNet.cpp.
References Isis::ControlPoint::Id(), and p_pointsHash.
| ControlPoint * Isis::ControlNet::Find | ( | const std::string & | id | ) |
Finds and returns a pointer to the ControlPoint with the specified id.
| id | The id of the ControlPoint to be deleted |
| Isis::iException::User | - "A ControlPoint matching the id was not found in the ControlNet" |
Definition at line 272 of file ControlNet.cpp.
References _FILEINFO_, Isis::iException::Message(), p_pointIds, and p_pointsHash.
Referenced by Qisis::MosaicPointTool::findPoint().
| ControlPoint * Isis::ControlNet::FindClosest | ( | const std::string & | 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.
| 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 |
Definition at line 310 of file ControlNet.cpp.
References dist, p_pointIds, and p_pointsHash.
| bool Isis::ControlNet::Invalid | ( | ) | const [inline] |
Return if the control point is invalid.
Definition at line 175 of file ControlNet.h.
References p_invalid.
Referenced by Delete().
| double Isis::ControlNet::MaximumError | ( | ) |
Determine the maximum error of all points in the network.
Definition at line 358 of file ControlNet.cpp.
References p_pointIds, and p_pointsHash.
Referenced by Isis::BundleAdjust::Solve().
| std::string Isis::ControlNet::NetworkId | ( | ) | const [inline] |
| int Isis::ControlNet::NumIgnoredMeasures | ( | ) | const [inline] |
Return the number of ignored measures.
Definition at line 184 of file ControlNet.h.
References p_numIgnoredMeasures.
| int Isis::ControlNet::NumMeasures | ( | ) | const [inline] |
Return the total number of measures for all control points in the network.
Definition at line 178 of file ControlNet.h.
References p_numMeasures.
| int Isis::ControlNet::NumValidMeasures | ( | ) | const [inline] |
Return the number of valid (non-ignored) measures.
Definition at line 181 of file ControlNet.h.
References p_numIgnoredMeasures, and p_numMeasures.
Referenced by Isis::BundleAdjust::Solve().
| int Isis::ControlNet::NumValidPoints | ( | ) |
Returns the number of non-ignored control points.
Definition at line 463 of file ControlNet.cpp.
References p_pointIds, p_pointsHash, Size(), and size.
| ControlPoint& Isis::ControlNet::operator[] | ( | int | index | ) | [inline] |
Return the ith control point.
| index | Control Point index |
Definition at line 168 of file ControlNet.h.
References p_pointIds, and p_pointsHash.
| void Isis::ControlNet::ReadControl | ( | const std::string & | ptfile, | |
| Progress * | progress = 0, |
|||
| bool | forceBuild = false | |||
| ) |
Reads in the control points from the given file.
| ptfile | Name of file containing a Pvl list of control points | |
| progress | A pointer to the progress of reading in the control points | |
| forceBuild | Forces invalid Control Points to be added to this Control Network |
| Isis::iException::User | - "Invalid Network Type" | |
| Isis::iException::User | - "Invalid Control Point" | |
| Isis::iException::User | - "Invalid Format" |
For internal use only.
Definition at line 139 of file ControlNet.cpp.
References _FILEINFO_, Add(), Isis::Progress::CheckStatus(), e, Isis::PvlObject::FindObject(), ImageToGround, ImageToImage, Isis::PvlContainer::IsNamed(), Isis::iException::Message(), Isis::PvlObject::Object(), Isis::PvlObject::Objects(), p_created, p_description, p_modified, p_networkId, p_numIgnoredMeasures, p_numMeasures, p_targetName, p_type, p_userName, Isis::Progress::SetMaximumSteps(), Isis::Progress::SetText(), and Singleton.
Referenced by ControlNet().
| void Isis::ControlNet::SetCreatedDate | ( | const std::string & | date | ) | [inline] |
Set the creation time.
| date | The date this Control Network was created |
Definition at line 152 of file ControlNet.h.
References p_created.
Referenced by Write().
| void Isis::ControlNet::SetDescription | ( | const std::string & | desc | ) | [inline] |
Set the description of the network.
| desc | The description of this Control Network |
Definition at line 138 of file ControlNet.h.
References p_description.
| void Isis::ControlNet::SetImages | ( | SerialNumberList & | list, | |
| Progress * | progress = 0 | |||
| ) |
Creates the ControlNet's image camera's based on the list of Serial Numbers.
| list | The list of Serial Numbers | |
| progress | A pointer to the progress of creating the cameras |
| 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" |
For internal use only.
Definition at line 411 of file ControlNet.cpp.
References _FILEINFO_, cam, Isis::Progress::CheckStatus(), Isis::CameraFactory::Create(), e, Isis::SerialNumberList::Filename(), Isis::SerialNumberList::HasSerialNumber(), Isis::iException::Message(), p_cameraList, p_cameraMap, p_pointIds, p_pointsHash, pvl(), Isis::SerialNumberList::SerialNumber(), Isis::Progress::SetMaximumSteps(), Isis::Progress::SetText(), Size(), and Isis::SerialNumberList::Size().
| void Isis::ControlNet::SetImages | ( | const std::string & | imageListFile | ) |
Creates the ControlNet's image cameras based on an input file.
| imageListFile | The list of images |
Definition at line 392 of file ControlNet.cpp.
Referenced by Isis::BundleAdjust::Init().
| void Isis::ControlNet::SetModifiedDate | ( | const std::string & | date | ) | [inline] |
Set the last modified date.
| date | The last date this Control Network was modified |
Definition at line 159 of file ControlNet.h.
References p_modified.
Referenced by Write().
| void Isis::ControlNet::SetNetworkId | ( | const std::string & | id | ) | [inline] |
Set the network id.
| id | The Id of this Control Network |
Definition at line 118 of file ControlNet.h.
References p_networkId.
| void Isis::ControlNet::SetTarget | ( | const std::string & | target | ) | [inline] |
Set the target name.
| target | The name of the target of this Control Network |
Definition at line 108 of file ControlNet.h.
References p_targetName.
| void Isis::ControlNet::SetType | ( | const NetworkType & | type | ) | [inline] |
Set the type of network.
| type | This Control Network's type |
Definition at line 98 of file ControlNet.h.
References p_type.
| void Isis::ControlNet::SetUserName | ( | const std::string & | name | ) | [inline] |
Set the user name.
| name | The name of the user creating or modifying this Control Net |
Definition at line 128 of file ControlNet.h.
References p_userName.
| int Isis::ControlNet::Size | ( | ) | const [inline] |
Return the number of control points in the network.
Definition at line 171 of file ControlNet.h.
References p_pointsHash.
Referenced by Isis::BundleAdjust::ApplyHeldList(), Isis::BundleAdjust::BasisColumns(), Delete(), Qisis::MosaicItem::displayControlPoints(), Isis::BundleAdjust::Init(), NumValidPoints(), SetImages(), Isis::BundleAdjust::Solve(), and Isis::BundleAdjust::Update().
| std::string Isis::ControlNet::Target | ( | ) | const [inline] |
| NetworkType Isis::ControlNet::Type | ( | ) | const [inline] |
| std::string Isis::ControlNet::UserName | ( | ) | const [inline] |
| void Isis::ControlNet::Write | ( | const std::string & | ptfile | ) |
Writes out the ControlPoints.
| ptfile | Name of file containing a Pvl list of control points |
| Isis::iException::Programmer | - "Invalid Net Enumeration" | |
| Isis::iException::Io | - "Unable to write PVL infomation to file" |
Definition at line 211 of file ControlNet.cpp.
References _FILEINFO_, Isis::PvlObject::AddObject(), Isis::iTime::CurrentLocalTime(), e, ImageToGround, ImageToImage, Isis::iException::Message(), p_created, p_description, p_modified, p_networkId, p_pointIds, p_pointsHash, p_targetName, p_type, p_userName, SetCreatedDate(), SetModifiedDate(), Singleton, and Isis::Pvl::Write().
std::vector<Isis::Camera *> Isis::ControlNet::p_cameraList [private] |
Vector of image number to camera.
Definition at line 231 of file ControlNet.h.
Referenced by SetImages().
std::map<std::string,Isis::Camera *> Isis::ControlNet::p_cameraMap [private] |
A map from serialnumber to camera.
Definition at line 230 of file ControlNet.h.
Referenced by SetImages().
std::string Isis::ControlNet::p_created [private] |
Creation Date.
Definition at line 223 of file ControlNet.h.
Referenced by ReadControl(), SetCreatedDate(), and Write().
std::string Isis::ControlNet::p_description [private] |
Textual Description of network.
Definition at line 225 of file ControlNet.h.
Referenced by Description(), ReadControl(), SetDescription(), and Write().
bool Isis::ControlNet::p_invalid [private] |
If the Control Network is currently invalid.
Definition at line 233 of file ControlNet.h.
Referenced by ControlNet(), Delete(), and Invalid().
std::string Isis::ControlNet::p_modified [private] |
Date Last Modified.
Definition at line 224 of file ControlNet.h.
Referenced by ReadControl(), SetModifiedDate(), and Write().
std::string Isis::ControlNet::p_networkId [private] |
The Network Id.
Definition at line 222 of file ControlNet.h.
Referenced by NetworkId(), ReadControl(), SetNetworkId(), and Write().
int Isis::ControlNet::p_numIgnoredMeasures [private] |
Number of ignored measures.
Definition at line 229 of file ControlNet.h.
Referenced by ControlNet(), NumIgnoredMeasures(), NumValidMeasures(), and ReadControl().
int Isis::ControlNet::p_numMeasures [private] |
Total number of measures in the network.
Definition at line 228 of file ControlNet.h.
Referenced by ControlNet(), NumMeasures(), NumValidMeasures(), and ReadControl().
QVector<QString> Isis::ControlNet::p_pointIds [private] |
QVector of ControlPoint Ids.
Definition at line 216 of file ControlNet.h.
Referenced by Add(), AverageError(), ComputeApriori(), ComputeErrors(), Delete(), Find(), FindClosest(), MaximumError(), NumValidPoints(), operator[](), SetImages(), and Write().
QHash<QString, ControlPoint> Isis::ControlNet::p_pointsHash [private] |
Hash table of Control Points.
Definition at line 220 of file ControlNet.h.
Referenced by Add(), AverageError(), ComputeApriori(), ComputeErrors(), Delete(), Exists(), Find(), FindClosest(), MaximumError(), NumValidPoints(), operator[](), SetImages(), Size(), and Write().
std::string Isis::ControlNet::p_targetName [private] |
Name of the target.
Definition at line 221 of file ControlNet.h.
Referenced by ReadControl(), SetTarget(), Target(), and Write().
NetworkType Isis::ControlNet::p_type [private] |
The type of network being used.
Definition at line 227 of file ControlNet.h.
Referenced by ReadControl(), SetType(), Type(), and Write().
std::string Isis::ControlNet::p_userName [private] |
The user who created the network.
Definition at line 226 of file ControlNet.h.
Referenced by ReadControl(), SetUserName(), UserName(), and Write().