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

A control point is one or more measurements that identify the same feature or location in different images.
For internal use only.
Definition at line 84 of file ControlPoint.h.
Public Types | |
| Ground | |
| A Ground point is a Control Point whose lat/lon is well established and should not be changed. | |
| Tie | |
| A Tie point is a Control Point that identifies common measurements between two or more cubes. | |
| enum | PointType { Ground, Tie } |
| A control point can have one of two types, either Ground or Tie. More... | |
Public Member Functions | |
| ControlPoint () | |
| Construct a control point. | |
| ControlPoint (const std::string &id) | |
| Construct a control point with given Id. | |
| ~ControlPoint () | |
| Destroy a control point. | |
| void | Load (PvlObject &p, bool forceBuild=false) |
| Loads the PvlObject into a ControlPoint. | |
| PvlObject | CreatePvlObject () |
| Creates a PvlObject from the ControlPoint. | |
| void | SetId (const std::string &id) |
| Sets the Id of the control point. | |
| std::string | Id () const |
| Return the Id of the control point. | |
| void | Add (const ControlMeasure &measure, bool forceBuild=false) |
| Add a measurement to the control point. | |
| void | Delete (int index) |
| Remove a measurement from the control point. | |
| ControlMeasure & | operator[] (int index) |
| Return the ith measurement of the control point. | |
| const ControlMeasure & | operator[] (int index) const |
| Return the ith measurement of the control point. | |
| ControlMeasure & | operator[] (const std::string &serialNumber) |
| Return the measurement for the given serial number. | |
| const ControlMeasure & | operator[] (const std::string &serialNumber) const |
| Return the measurement for the given serial number. | |
| bool | HasSerialNumber (std::string &serialNumber) |
| Return true if given serial number exists in point. | |
| int | Size () const |
| Return the number of measurements in the control point. | |
| int | NumValidMeasures () |
| Returns the number of non-ignored control measures. | |
| void | SetIgnore (bool ignore) |
| Set whether to ignore or use control point. | |
| bool | Ignore () const |
| Return if the control point should be ignored. | |
| bool | Invalid () const |
| Return if the control point is invalid. | |
| void | SetHeld (bool held) |
| Set the control point as held to its lat/lon. | |
| bool | Held () const |
| Is the control point lat/lon held? | |
| void | SetType (PointType type) |
| Change the type of the control point. | |
| PointType | Type () const |
| Return the type of the point. | |
| const std::string | PointTypeToString (PointType type) const |
| Obtain a string representation of a given PointType. | |
| void | SetUniversalGround (double lat, double lon, double radius) |
| Set the ground coordinate of a control point. | |
| double | UniversalLatitude () const |
| Return the planetocentric latitude of the point. | |
| double | UniversalLongitude () const |
| Return the planetocentric longitude of the point. | |
| double | Radius () const |
| Return the radius of the point in meters. | |
| double | AverageError () const |
| Return the average error of all measurements. | |
| bool | HasReference () |
| Return true if there is a Reference measure, otherwise return false. | |
| int | ReferenceIndex () |
| Return the index of the reference measurement if none is specified, return the first measured CM. | |
| void | ComputeApriori () |
| This method computes the apriori lat/lon for a point. | |
| void | ComputeErrors () |
| This method computes the errors for a point. | |
| double | MaximumError () const |
| Return the maximum error magnitude of the measures in the point. | |
| double | WrapLongitude (double lon, double baselon) |
| Wraps the input longitude toward a base longitude. | |
Private Attributes | |
| std::string | p_id |
| Point Id. | |
| std::vector< Isis::ControlMeasure > | p_measures |
| List of Control Measures. | |
| PointType | p_type |
| This Control Point's Type. | |
| bool | p_ignore |
| If this Control Point is ignored. | |
| bool | p_held |
| If this Control Point is held. | |
| double | p_latitude |
| The Latitude of this Control Point. | |
| double | p_longitude |
| The Longtude of this Control Point. | |
| double | p_radius |
| The raduis of this Control Point. | |
| bool | p_invalid |
| If this Control Point is invalid. | |
A control point can have one of two types, either Ground or Tie.
| Ground |
A Ground point is a Control Point whose lat/lon is well established and should not be changed.
Some people will refer to this as a truth (i.e., ground truth). Holding a point is equivalent to making it a ground point. A ground point can be identifed in one or more cubes. |
| Tie |
A Tie point is a Control Point that identifies common measurements between two or more cubes.
While it could have a lat/lon, it is not necessarily correct and is subject to change. This is the most common type of control point. |
Definition at line 170 of file ControlPoint.h.
| Isis::ControlPoint::ControlPoint | ( | ) |
Construct a control point.
Definition at line 12 of file ControlPoint.cpp.
References Isis::Null, SetHeld(), SetId(), SetIgnore(), SetType(), SetUniversalGround(), and Tie.
| Isis::ControlPoint::ControlPoint | ( | const std::string & | id | ) |
Construct a control point with given Id.
| id | Control Point Id |
Definition at line 25 of file ControlPoint.cpp.
References Isis::Null, SetHeld(), SetId(), SetIgnore(), SetType(), SetUniversalGround(), and Tie.
| Isis::ControlPoint::~ControlPoint | ( | ) | [inline] |
| void Isis::ControlPoint::Add | ( | const ControlMeasure & | measure, | |
| bool | forceBuild = false | |||
| ) |
Add a measurement to the control point.
| measure | The ControlMeasure to add | |
| forceBuild | Forces the Control Measure to be added reguardless of validity |
Definition at line 129 of file ControlPoint.cpp.
References _FILEINFO_, Isis::ControlMeasure::CubeSerialNumber(), Isis::iException::Message(), p_invalid, p_measures, and Size().
Referenced by Load().
| double Isis::ControlPoint::AverageError | ( | ) | const |
Return the average error of all measurements.
Definition at line 266 of file ControlPoint.cpp.
References Ignore(), p_measures, and Type().
| void Isis::ControlPoint::ComputeApriori | ( | ) |
This method computes the apriori lat/lon for a point.
It computes this by determining the average lat/lon of all the measures. Note that this does not change held, ignored, or ground points. Also, it does not use unmeasured or ignored measures when computing the lat/lon.
Definition at line 337 of file ControlPoint.cpp.
References _FILEINFO_, cam, Isis::Camera::Camera(), Isis::Camera::DistortionMap(), Isis::Spice::EphemerisTime(), Ground, Held(), Id(), Ignore(), Isis::Sensor::LocalRadius(), Isis::iException::Message(), Isis::Null, p_latitude, p_longitude, p_measures, p_radius, Isis::Camera::SetImage(), SetUniversalGround(), Type(), Isis::CameraDistortionMap::UndistortedFocalPlaneX(), Isis::CameraDistortionMap::UndistortedFocalPlaneY(), Isis::Sensor::UniversalLatitude(), Isis::Sensor::UniversalLongitude(), WrapLongitude(), x, and y.
| void Isis::ControlPoint::ComputeErrors | ( | ) |
This method computes the errors for a point.
Definition at line 446 of file ControlPoint.cpp.
References _FILEINFO_, cam, Isis::Camera::Camera(), Isis::CameraFocalPlaneMap::DetectorLine(), Isis::CameraFocalPlaneMap::DetectorSample(), Id(), Ignore(), Isis::CameraDetectorMap::LineScaleFactor(), Isis::iException::Message(), p_measures, Isis::PI(), Radius(), Isis::CameraDetectorMap::SampleScaleFactor(), Isis::CameraFocalPlaneMap::SetFocalPlane(), Isis::Camera::SetImage(), UniversalLatitude(), and UniversalLongitude().
| PvlObject Isis::ControlPoint::CreatePvlObject | ( | ) |
Creates a PvlObject from the ControlPoint.
| Isis::iException::Programmer | - Invalid Point Enumeration |
Definition at line 89 of file ControlPoint.cpp.
References _FILEINFO_, Isis::PvlObject::AddGroup(), g, Ground, Isis::iException::Message(), Isis::Null, p_held, p_id, p_ignore, p_latitude, p_longitude, p_radius, p_type, Size(), and Tie.
| void Isis::ControlPoint::Delete | ( | int | index | ) |
Remove a measurement from the control point.
| index | The index of the control point to delete |
Definition at line 151 of file ControlPoint.cpp.
References Isis::ControlMeasure::CubeSerialNumber(), operator[](), p_invalid, p_measures, and Size().
| bool Isis::ControlPoint::HasReference | ( | ) |
Return true if there is a Reference measure, otherwise return false.
Definition at line 288 of file ControlPoint.cpp.
References _FILEINFO_, Id(), Isis::iException::Message(), and p_measures.
| bool Isis::ControlPoint::HasSerialNumber | ( | std::string & | serialNumber | ) |
Return true if given serial number exists in point.
| serialNumber | The serial number |
Definition at line 212 of file ControlPoint.cpp.
References Size().
| bool Isis::ControlPoint::Held | ( | ) | const [inline] |
Is the control point lat/lon held?
Definition at line 165 of file ControlPoint.h.
References p_held.
Referenced by Isis::BundleAdjust::AddPartials(), and ComputeApriori().
| std::string Isis::ControlPoint::Id | ( | ) | const [inline] |
Return the Id of the control point.
Definition at line 108 of file ControlPoint.h.
References p_id.
Referenced by Isis::ControlNet::Add(), ComputeApriori(), ComputeErrors(), Isis::ControlNet::Exists(), HasReference(), Load(), and ReferenceIndex().
| bool Isis::ControlPoint::Ignore | ( | ) | const [inline] |
Return if the control point should be ignored.
Definition at line 152 of file ControlPoint.h.
References p_ignore.
Referenced by Isis::BundleAdjust::AddPartials(), AverageError(), ComputeApriori(), ComputeErrors(), MaximumError(), and NumValidMeasures().
| bool Isis::ControlPoint::Invalid | ( | ) | const [inline] |
Return if the control point is invalid.
Definition at line 155 of file ControlPoint.h.
References p_invalid.
| void Isis::ControlPoint::Load | ( | PvlObject & | p, | |
| bool | forceBuild = false | |||
| ) |
Loads the PvlObject into a ControlPoint.
| p | PvlObject containing ControlPoint information | |
| forceBuild | Forces invalid Control Measures to be added to this Control Point |
| Isis::iException::User | - Invalid Point Type | |
| Isis::iException::User | - Unable to add ControlMeasure to ControlPoint |
Definition at line 47 of file ControlPoint.cpp.
References _FILEINFO_, Add(), e, g, Ground, Isis::PvlObject::Group(), Isis::PvlObject::Groups(), Isis::PvlObject::HasKeyword(), Id(), Isis::PvlContainer::IsNamed(), Isis::iException::Message(), SetHeld(), SetId(), SetIgnore(), SetType(), SetUniversalGround(), and Tie.
| double Isis::ControlPoint::MaximumError | ( | ) | const |
Return the maximum error magnitude of the measures in the point.
Ignored and unmeasured measures will not be included.
Definition at line 527 of file ControlPoint.cpp.
References Ignore(), p_measures, and Type().
| int Isis::ControlPoint::NumValidMeasures | ( | ) |
Returns the number of non-ignored control measures.
Definition at line 570 of file ControlPoint.cpp.
References Ignore(), p_measures, Size(), and size.
| const ControlMeasure & Isis::ControlPoint::operator[] | ( | const std::string & | serialNumber | ) | const |
Return the measurement for the given serial number.
| serialNumber | The serial number |
Definition at line 194 of file ControlPoint.cpp.
References _FILEINFO_, Isis::iException::Message(), and Size().
| ControlMeasure & Isis::ControlPoint::operator[] | ( | const std::string & | serialNumber | ) |
Return the measurement for the given serial number.
| serialNumber | The serial number |
Definition at line 175 of file ControlPoint.cpp.
References _FILEINFO_, Isis::iException::Message(), and Size().
| const ControlMeasure& Isis::ControlPoint::operator[] | ( | int | index | ) | const [inline] |
Return the ith measurement of the control point.
| index | Control Measure index |
Definition at line 129 of file ControlPoint.h.
References p_measures.
| ControlMeasure& Isis::ControlPoint::operator[] | ( | int | index | ) | [inline] |
Return the ith measurement of the control point.
| index | Control Measure index |
Definition at line 120 of file ControlPoint.h.
References p_measures.
Referenced by Delete().
| const std::string Isis::ControlPoint::PointTypeToString | ( | ControlPoint::PointType | type | ) | const |
Obtain a string representation of a given PointType.
| type | PointType to get a string representation of |
| iException::Programmer | When unable to translate type |
Definition at line 232 of file ControlPoint.cpp.
References _FILEINFO_, Ground, Isis::iException::Message(), str, and Tie.
| double Isis::ControlPoint::Radius | ( | ) | const [inline] |
Return the radius of the point in meters.
Definition at line 209 of file ControlPoint.h.
References p_radius.
Referenced by Isis::BundleAdjust::AddPartials(), ComputeErrors(), and Isis::BundleAdjust::PointPartial().
| int Isis::ControlPoint::ReferenceIndex | ( | ) |
Return the index of the reference measurement if none is specified, return the first measured CM.
Definition at line 308 of file ControlPoint.cpp.
References _FILEINFO_, Id(), Isis::iException::Message(), and p_measures.
| void Isis::ControlPoint::SetHeld | ( | bool | held | ) | [inline] |
Set the control point as held to its lat/lon.
| held | True to hold this Control Point, False to release |
Definition at line 162 of file ControlPoint.h.
References p_held.
Referenced by ControlPoint(), and Load().
| void Isis::ControlPoint::SetId | ( | const std::string & | id | ) | [inline] |
Sets the Id of the control point.
| id | Control Point Id |
Definition at line 101 of file ControlPoint.h.
References p_id.
Referenced by ControlPoint(), and Load().
| void Isis::ControlPoint::SetIgnore | ( | bool | ignore | ) | [inline] |
Set whether to ignore or use control point.
| ignore | True to ignore this Control Point, False to un-ignore |
Definition at line 149 of file ControlPoint.h.
References p_ignore.
Referenced by ControlPoint(), and Load().
| void Isis::ControlPoint::SetType | ( | PointType | type | ) | [inline] |
Change the type of the control point.
| type | The type for this Control Point |
Definition at line 193 of file ControlPoint.h.
References p_type.
Referenced by ControlPoint(), and Load().
| void Isis::ControlPoint::SetUniversalGround | ( | double | lat, | |
| double | lon, | |||
| double | radius | |||
| ) |
Set the ground coordinate of a control point.
| lat | planetocentric latitude in degrees | |
| lon | planetocentric longitude in degrees | |
| radius | radius at coordinate in meters |
Definition at line 259 of file ControlPoint.cpp.
References p_latitude, p_longitude, and p_radius.
Referenced by ComputeApriori(), ControlPoint(), and Load().
| int Isis::ControlPoint::Size | ( | ) | const [inline] |
Return the number of measurements in the control point.
Definition at line 141 of file ControlPoint.h.
References p_measures.
Referenced by Add(), Isis::BundleAdjust::AddPartials(), CreatePvlObject(), Delete(), Qisis::MosaicPointTool::findPoint(), HasSerialNumber(), NumValidMeasures(), and operator[]().
| PointType Isis::ControlPoint::Type | ( | ) | const [inline] |
Return the type of the point.
Definition at line 196 of file ControlPoint.h.
References p_type.
Referenced by Isis::BundleAdjust::AddPartials(), AverageError(), ComputeApriori(), Qisis::MosaicPointTool::findPoint(), and MaximumError().
| double Isis::ControlPoint::UniversalLatitude | ( | ) | const [inline] |
Return the planetocentric latitude of the point.
Definition at line 203 of file ControlPoint.h.
References p_latitude.
Referenced by Isis::BundleAdjust::AddPartials(), ComputeErrors(), and Isis::BundleAdjust::PointPartial().
| double Isis::ControlPoint::UniversalLongitude | ( | ) | const [inline] |
Return the planetocentric longitude of the point.
Definition at line 206 of file ControlPoint.h.
References p_longitude.
Referenced by Isis::BundleAdjust::AddPartials(), ComputeErrors(), and Isis::BundleAdjust::PointPartial().
| double Isis::ControlPoint::WrapLongitude | ( | double | lon, | |
| double | baselon | |||
| ) |
Wraps the input longitude toward a base longitude.
| lon | Input longitude to be wrapped | |
| baselon | Longitude to compare |
Definition at line 550 of file ControlPoint.cpp.
Referenced by ComputeApriori().
bool Isis::ControlPoint::p_held [private] |
If this Control Point is held.
Definition at line 232 of file ControlPoint.h.
Referenced by CreatePvlObject(), Held(), and SetHeld().
std::string Isis::ControlPoint::p_id [private] |
Point Id.
Definition at line 228 of file ControlPoint.h.
Referenced by CreatePvlObject(), Id(), and SetId().
bool Isis::ControlPoint::p_ignore [private] |
If this Control Point is ignored.
Definition at line 231 of file ControlPoint.h.
Referenced by CreatePvlObject(), Ignore(), and SetIgnore().
bool Isis::ControlPoint::p_invalid [private] |
double Isis::ControlPoint::p_latitude [private] |
The Latitude of this Control Point.
Definition at line 233 of file ControlPoint.h.
Referenced by ComputeApriori(), CreatePvlObject(), SetUniversalGround(), and UniversalLatitude().
double Isis::ControlPoint::p_longitude [private] |
The Longtude of this Control Point.
Definition at line 234 of file ControlPoint.h.
Referenced by ComputeApriori(), CreatePvlObject(), SetUniversalGround(), and UniversalLongitude().
std::vector<Isis::ControlMeasure> Isis::ControlPoint::p_measures [private] |
List of Control Measures.
Definition at line 229 of file ControlPoint.h.
Referenced by Add(), AverageError(), ComputeApriori(), ComputeErrors(), Delete(), HasReference(), MaximumError(), NumValidMeasures(), operator[](), ReferenceIndex(), and Size().
double Isis::ControlPoint::p_radius [private] |
The raduis of this Control Point.
Definition at line 235 of file ControlPoint.h.
Referenced by ComputeApriori(), CreatePvlObject(), Radius(), and SetUniversalGround().
PointType Isis::ControlPoint::p_type [private] |
This Control Point's Type.
Definition at line 230 of file ControlPoint.h.
Referenced by CreatePvlObject(), SetType(), and Type().