17#include "ControlMeasure.h"
18#include "SurfacePoint.h"
20template<
typename A,
typename B >
class QHash;
26 class ControlPointFileEntryV0002;
29 class PBControlNet_PBControlPoint;
30 class PBControlNetLogData_Point;
388 static const int PointTypeCount = 3;
418 Coord1Constrained = 0,
419 Coord2Constrained = 1,
420 Coord3Constrained = 2
468 ControlNet *Parent() {
return parentNetwork; }
474 int Delete(QString serialNumber);
516 QString GetChooserName()
const;
517 QString GetDateTime()
const;
518 bool IsEditLocked()
const;
519 bool IsRejected()
const;
520 QString
GetId()
const;
521 bool IsIgnored()
const;
522 bool IsValid()
const;
524 bool IsInvalid()
const;
527 bool HasAprioriCoordinates();
549 RadiusSource::Source GetAprioriRadiusSource()
const;
551 QString GetAprioriRadiusSourceFile()
const;
552 SurfacePointSource::Source GetAprioriSurfacePointSource()
const;
554 QString GetAprioriSurfacePointSourceFile()
const;
556 int GetNumMeasures()
const;
563 int IndexOf(QString sn,
bool throws =
true)
const;
574 QList< ControlMeasure * >
getMeasures(
bool excludeIgnored =
false)
const;
599 QHash< QString, ControlMeasure * > * measures;
ModType
Control Measure Modification Types.
const ControlMeasure * GetRefMeasure() const
Get the reference control measure.
static QString RadiusSourceToString(RadiusSource::Source source)
Obtain a string representation of a given RadiusSource.
static SurfacePointSource::Source StringToSurfacePointSource(QString str)
Obtain a SurfacePoint::Source from a string.
Status
This is a return status for many of the mutating (setter) method calls.
@ PointLocked
This is returned when the operation requires Edit Lock to be false but it is currently true.
@ Success
This is returned when the operation successfully took effect.
@ Failure
This is returned when an operation cannot be performed due to a problem such as the point is ignored ...
int NumberOfConstrainedCoordinates()
Return bool indicating if point is Constrained or not.
Status SetEditLock(bool editLock)
Set the EditLock state.
QString dateTime
This is the last modified date and time.
const ControlPoint & operator=(const ControlPoint &pPoint)
bool editLock
This stores the edit lock state.
bool IsFree() const
Return bool indicating if point is Free or not.
static RadiusSource::Source StringToRadiusSource(QString str)
Obtain a RadiusSource::Source from a string.
ConstraintStatus
This is a convenience member for checking number of constrained coordinates in the SurfacePoint.
bool invalid
If we forced a build that we would normally have thrown an exception for then this is set to true.
bool operator==(const ControlPoint &pPoint) const
Compare two Control Points for equality.
void ClearJigsawRejected()
Set jigsaw rejected flag for all measures to false and set the jigsaw rejected flag for the point its...
Status SetAprioriSurfacePoint(SurfacePoint aprioriSP)
This updates the apriori surface point.
QString id
This is the control point ID.
void ValidateMeasure(QString serialNumber) const
Throws an exception if none of the point's measures have the given serial number.
QString aprioriRadiusSourceFile
The name of the file that derives the apriori surface point's radius.
ModType
Control Point Modification Types.
Status SetId(QString id)
Sets the Id of the control point.
QString aprioriSurfacePointSourceFile
FileName where the apriori surface point originated from.
Status SetAprioriRadiusSource(RadiusSource::Source source)
This updates the source of the radius of the apriori surface point.
double GetResidualRms() const
Get rms of residuals.
SurfacePoint aprioriSurfacePoint
The apriori surface point.
bool jigsawRejected
This stores the jigsaw rejected state.
RadiusSource::Source aprioriRadiusSource
Where the apriori surface point's radius originated from, most commonly used by jigsaw.
bool IsReferenceExplicit() const
Status ComputeResiduals_Millimeters()
This method computes the residuals for a point.
virtual ~ControlPoint()
This destroys the current instance and cleans up any and all allocated memory.
bool HasDateTime() const
Returns true if the datetime is not empty.
Status SetChooserName(QString name)
Set the point's chooser name.
bool HasRefMeasure() const
Checks to see if a reference measure is set.
int GetNumValidMeasures() const
QList< QString > getCubeSerialNumbers() const
int GetNumLockedMeasures() const
Returns the number of locked control measures.
int Delete(ControlMeasure *measure)
Remove a measurement from the control point, deleting reference measure is allowed.
Status SetRejected(bool rejected)
Set the jigsawRejected state.
SurfacePoint adjustedSurfacePoint
This is the calculated, or aposterori, surface point.
void Add(ControlMeasure *measure)
Add a measurement to the control point, taking ownership of the measure in the process.
PointType GetType() const
Status SetAdjustedSurfacePoint(SurfacePoint newSurfacePoint)
Set or update the surface point relating to this control point.
void SetExplicitReference(ControlMeasure *measure)
Explicitly defines a new reference measure by pointer.
int numberOfRejectedMeasures
This parameter is used and maintained by BundleAdjust for the jigsaw application.
PointType
These are the valid 'types' of point.
@ Constrained
A Constrained point is a Control Point whose lat/lon/radius is somewhat established and should not be...
@ Free
A Free point is a Control Point that identifies common measurements between two or more cubes.
@ Fixed
A Fixed point is a Control Point whose lat/lon is well established and should not be changed.
Status SetType(PointType newType)
Updates the control point's type.
Status SetAprioriSurfacePointSourceFile(QString sourceFile)
This updates the filename of where the apriori surface point came from.
int IndexOfRefMeasure() const
Status SetAprioriSurfacePointSource(SurfacePointSource::Source source)
This updates the source of the surface point.
const ControlMeasure * GetMeasure(QString serialNumber) const
Get a control measure based on its cube's serial number.
PointType type
What this control point is tying together.
bool ignore
True if we should preserve but ignore the entire control point and its measures.
double GetLineResidualRms() const
Get rms of line residuals.
bool IsCoord2Constrained()
Return bool indicating if 2nd coordinate is Constrained or not.
bool HasAprioriRadiusSourceFile() const
Checks to see if the radius source file has been set.
bool IsCoord1Constrained()
Return bool indicating if 1st coordinate is Constrained or not.
QString GetPointTypeString() const
Obtain a string representation of the PointType.
double GetSampleResidualRms() const
Get rms of sample residuals.
bool HasChooserName() const
Returns true if the choosername is not empty.
Status SetIgnored(bool newIgnoreStatus)
Set whether to ignore or use control point.
Status SetDateTime(QString newDateTime)
Set the point's last modified time.
bool IsCoord3Constrained()
Return bool indicating if 3rd coordinate is Constrained or not.
ControlPoint()
Construct a control point.
Statistics GetStatistic(double(ControlMeasure::*statFunc)() const) const
This function will call a given method on every control measure that this point has.
bool IsConstrained()
Return bool indicating if point is Constrained or not.
void PointModified()
List of Control Measures.
QString chooserName
This is the user name of the person who last modified this control point.
static QString PointTypeToString(PointType type)
Obtain a string representation of a given PointType.
void AddMeasure(ControlMeasure *measure)
Do the actual work of adding a measure to this point, without changing any extra data.
static PointType StringToPointType(QString pointTypeString)
Obtain a PointType given a string representation of it.
bool referenceExplicitlySet
This indicates if a program has explicitely set the reference in this point or the implicit reference...
bool operator!=(const ControlPoint &pPoint) const
Compare two Control Points for inequality.
Status ComputeResiduals()
This method computes the BundleAdjust residuals for a point.
QString GetId() const
Return the Id of the control point.
static QString SurfacePointSourceToString(SurfacePointSource::Source source)
Obtain a string representation of a given SurfacePointSource.
std::bitset< 3 > constraintStatus
This stores the constraint status of the a priori SurfacePoint.
QList< ControlMeasure * > getMeasures(bool excludeIgnored=false) const
Status ResetApriori()
Reset all the Apriori info to defaults.
void ZeroNumberOfRejectedMeasures()
Initialize the number of rejected measures to 0.
int GetNumberOfRejectedMeasures() const
Get the number of rejected measures on the control point.
bool HasSerialNumber(QString serialNumber) const
Return true if given serial number exists in point.
int IndexOf(ControlMeasure *, bool throws=true) const
void SetNumberOfRejectedMeasures(int numRejected)
Set (update) the number of rejected measures for the control point.
bool HasAprioriSurfacePointSourceFile() const
Checks to see if the surface point source file has been set.
void Load(PvlObject &p)
Loads the PvlObject into a ControlPoint.
const ControlMeasure * operator[](QString serialNumber) const
Same as GetMeasure (provided for convenience)
SurfacePoint GetBestSurfacePoint() const
Returns the adjusted surface point if it exists, otherwise returns the a priori surface point.
Status SetRefMeasure(ControlMeasure *cm)
Set the point's reference measure.
Status ComputeApriori()
Computes a priori lat/lon/radius point coordinates by determining the average lat/lon/radius of all m...
bool IsFixed() const
Return bool indicating if point is Fixed or not.
Status SetAprioriRadiusSourceFile(QString sourceFile)
This updates the filename of the DEM that the apriori radius came from.
SurfacePointSource::Source aprioriSurfacePointSource
Where the apriori surface point originated from.
QString GetRadiusSourceString() const
Obtain a string representation of the RadiusSource.
void emitMeasureModified(ControlMeasure *measure, ControlMeasure::ModType modType, QVariant oldValue, QVariant newValue)
This method is a wrapper to emit the measureModified() signal in the parent network is called wheneve...
QString GetReferenceSN() const
QString GetSurfacePointSourceString() const
Obtain a string representation of the SurfacePointSource.
Contains Pvl Groups and Pvl Objects.
This class is used to accumulate statistics on double arrays.
This class defines a body-fixed surface point.
This is free and unencumbered software released into the public domain.
This is free and unencumbered software released into the public domain.