1 #ifndef BundleResults_h
2 #define BundleResults_h
47 #include "XmlStackedHandler.h"
52 class QXmlStreamWriter;
110 QString minLatPointId, QString maxLatPointId);
112 QString minLonPointId, QString maxLonPointId);
114 QString minRadPointId, QString maxRadPointId);
116 double rmsFromSigmaLonStats,
117 double rmsFromSigmaRadStats);
135 double computeRejectionLimit(
ControlNet *p_Cnet,
136 double outlierRejectionMultiplier,
137 int numObservations);
141 double computeResiduals(
143 std::vector< boost::numeric::ublas::bounded_vector< double, 3 > > pointWeights,
144 std::vector< boost::numeric::ublas::bounded_vector< double, 3 > > pointCorrections,
146 std::vector< double > imageParameterWeights,
147 int numImagePartials,
202 double rmsRx()
const;
203 double rmsRy()
const;
246 void save(QXmlStreamWriter &stream,
const Project *project)
const;
248 QDataStream &
write(QDataStream &stream)
const;
249 QDataStream &
read(QDataStream &stream);
251 void createH5Group(hid_t locationId, QString locationName)
const;
252 void parseH5Group(hid_t locationId, QString locationName);
254 void createH5Group(H5::CommonFG &locationObject, QString locationName)
const;
255 void openH5Group(H5::CommonFG &locationObject, QString locationName);
256 BundleResults(H5::CommonFG &locationObject, QString locationName);
274 virtual bool startElement(
const QString &namespaceURI,
const QString &localName,
275 const QString &qName,
const QXmlAttributes &atts);
277 virtual bool endElement(
const QString &namespaceURI,
const QString &localName,
278 const QString &qName);
285 QString m_xmlHandlerCharacters;
286 int m_xmlHandlerResidualsListSize;
287 int m_xmlHandlerSampleResidualsListSize;
288 int m_xmlHandlerLineResidualsListSize;
289 int m_xmlHandlerXSigmasListSize;
290 int m_xmlHandlerYSigmasListSize;
291 int m_xmlHandlerZSigmasListSize;
292 int m_xmlHandlerRASigmasListSize;
293 int m_xmlHandlerDECSigmasListSize;
294 int m_xmlHandlerTWISTSigmasListSize;
298 QString m_xmlHandlerCorrelationImageId;
443 #endif // BundleResults_h
QDataStream & read(QDataStream &stream)
Reads the data from a QDataStream into the BundleResults object.
void save(QXmlStreamWriter &stream, const Project *project) const
Saves the BundleResults object to an XML file.
void setObservations(BundleObservationVector observations)
Sets the vector of BundleObservations.
double sigmaLongitudeStatisticsRms() const
Returns the RMS of the adjusted longitude sigmas.
This class is a container class for BundleObservations.
double rmsRy() const
Returns the RMS of the y residuals.
int numberHeldImages() const
Returns the number of 'held' images.
virtual bool startElement(const QString &namespaceURI, const QString &localName, const QString &qName, const QXmlAttributes &atts)
Writes a starting XML element.
virtual bool characters(const QString &ch)
Adds a QString to the XmlHandler's internal character data.
BundleObservationVector m_observations
The vector of BundleObservations from BundleAdjust.
QString minSigmaRadiusPointId() const
Returns the minimum sigma radius point id.
void incrementFixedPoints()
Increase the number of 'fixed' (ground) points.
Distance m_minSigmaLongitudeDistance
The minimum sigma longitude distance.
The main project for cnetsuite.
void setElapsedTime(double time)
Sets the elapsed time for the bundle adjustment.
QVector< Statistics > m_rmsImageYSigmas
< The root mean square image y sigmas.
void setNumberImageParameters(int numberParameters)
Sets the number of image parameters.
int iterations() const
Returns the number of iterations taken by the BundleAdjust.
void setRmsFromSigmaStatistics(double rmsFromSigmaLatStats, double rmsFromSigmaLonStats, double rmsFromSigmaRadStats)
Sets the root mean square values of the adjusted latitiude sigmas, adjusted longitude sigmas...
StatCumProbDistDynCalc * m_cumProRes
This class keeps track of the cumulative probability distribution of residuals (in unweighted pixels)...
QString m_maxSigmaLongitudePointId
The maximum sigma longitude point id.
void setCorrMatCovFileName(FileName name)
Set the covariance file name for the matrix used to calculate the correlation matrix.
This is a container for the correlation matrix that comes from a bundle adjust.
File name manipulation and expansion.
void resetNumberConstrainedPointParameters()
Resets the number of contrained point parameters to 0.
QString minSigmaLongitudePointId() const
Returns the minimum sigma longitude point id.
Distance m_minSigmaRadiusDistance
The minimum sigma radius distance.
QSharedPointer< ControlNet > ControlNetQsp
This typedef is for future implementation of target body.
const BundleObservationVector & observations() const
Returns a reference to the observations used by the BundleAdjust.
QString maxSigmaRadiusPointId() const
Returns the maximum sigma radius point id.
void printMaximumLikelihoodTierInformation()
Prints out information about which tier the solution is in and the status of the residuals.
QString m_minSigmaLongitudePointId
The minimum sigma longitude point id.
XmlHandler(BundleResults *statistics, Project *project)
Constructs an XmlHandler used to save a BundleResults object.
Distance m_maxSigmaLatitudeDistance
The maximum sigma latitude distance.
void incrementNumberConstrainedImageParameters(int incrementAmount)
Increase the number of constrained image parameters.
ControlNetQsp m_outNet
The output control net from BundleAdjust.
QString maxSigmaLongitudePointId() const
Returns the maximum sigma longitude point id.
int numberConstrainedTargetParameters() const
Return the number of constrained target parameters.
double m_rmsSigmaRadiusStats
rms of adjusted Radius sigmas
QVector< Statistics > rmsImageDECSigmas() const
Returns the list of RMS image declination sigma statistics.
int m_numberHeldImages
number of 'held' images (define)
void setRmsImageResidualLists(QList< Statistics > rmsImageLineResiduals, QList< Statistics > rmsImageSampleResiduals, QList< Statistics > rmsImageResiduals)
Sets the root mean square image residual Statistics lists.
QString m_maxSigmaLatitudePointId
The maximum sigma latitude point id.
int m_numberConstrainedImageParameters
number of constrained image parameters
double m_radiansToMeters
radian to meters conversion factor for the body
CorrelationMatrix correlationMatrix() const
Returns the Correlation Matrix.
Distance minSigmaLatitudeDistance() const
Returns the minimum sigma latitude distance.
QList< Statistics > m_rmsImageSampleResiduals
List of RMS image sample residual statistics for each image in the bundle.
void addProbabilityDistributionObservation(double obsValue)
Adds an observation to the cumulative probability distribution of |R^2 residuals|.
QString m_maxSigmaRadiusPointId
The maximum sigma radius point id.
QVector< BundleControlPointQsp > m_bundleControlPoints
The vector of BundleControlPoints from BundleAdjust.
QVector< Statistics > m_rmsImageRASigmas
< The root mean square image right ascension sigmas.
void setSigmaLongitudeRange(Distance minLonDist, Distance maxLonDist, QString minLonPointId, QString maxLonPointId)
Sets the min and max sigma longitude distances and point ids.
double sigma0() const
Returns the Sigma0 of the bundle adjustment.
double m_rmsYResiduals
rms of y residuals
Q_DECLARE_METATYPE(Isis::Cube *)
This allows Cube *'s to be stored in a QVariant.
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
int numberImageParameters() const
Returns the total number of image parameters.
void resetNumberConstrainedImageParameters()
Resets the number of constrained image parameters to 0.
int numberIgnoredPoints() const
Returns the number of ignored points.
void maximumLikelihoodSetUp(QList< QPair< MaximumLikelihoodWFunctions::Model, double > > modelsWithQuantiles)
This method steps up the maximum likelihood estimation solution.
QString m_minSigmaRadiusPointId
The minimum sigma radius point id.
double sigmaLatitudeStatisticsRms() const
Returns the RMS of the adjusted latitude sigmas.
void setOutputControlNet(ControlNetQsp outNet)
Sets the output ControlNet.
void setNumberUnknownParameters(int numberParameters)
Sets the total number of parameters to solve for.
void setElapsedTimeErrorProp(double time)
Sets the elapsed time for error propegation.
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
Distance measurement, usually in meters.
BundleResults & operator=(const BundleResults &src)
Assignment operator for BundleResults.
double m_rejectionLimit
current rejection limit
double rejectionLimit() const
Returns the rejection limit.
ControlNetQsp outputControlNet() const
Returns a shared pointer to the output control network.
void computeDegreesOfFreedom()
Computes the degrees of freedom of the bundle adjustment and stores it internally.
QVector< Statistics > rmsImageXSigmas() const
Returns the list of RMS image x sigma statistics.
double elapsedTimeErrorProp() const
Returns the elapsed time for error propagation.
QVector< Statistics > m_rmsImageDECSigmas
< The root mean square image declination sigmas.
QVector< BundleControlPointQsp > & bundleControlPoints()
Returns a reference to the BundleControlPoint vector.
double m_rmsXYResiduals
rms of all x and y residuals
StatCumProbDistDynCalc * m_cumPro
This class will be used to calculate the cumulative probability distribution of |R^2 residuals|...
int degreesOfFreedom() const
Returns the degrees of freedom.
StatCumProbDistDynCalc cumulativeProbabilityDistribution() const
Returns the cumulative probability distribution of the |R^2 residuals|.
QVector< Statistics > rmsImageTWISTSigmas() const
Returns the list of RMS image twist sigma statistics.
void setRejectionLimit(double rejectionLimit)
Sets the rejection limit.
int m_numberIgnoredPoints
number of ignored points
double m_elapsedTime
elapsed time for bundle
This class is used to approximate cumulative probibility distributions of a stream of observations wi...
boost::numeric::ublas::vector< double > Vector
Definition for an Isis::LinearAlgebra::Vector of doubles.
int numberRejectedObservations() const
Returns the number of observation that were rejected.
int m_numberObservations
number of image coordinate observations
int maximumLikelihoodModelIndex() const
Returns which step the bundle adjustment is on.
virtual bool endElement(const QString &namespaceURI, const QString &localName, const QString &qName)
Writes an ending XML element.
void setBundleControlPoints(QVector< BundleControlPointQsp > controlPoints)
Sets the bundle control point vector.
StatCumProbDistDynCalc residualsCumulativeProbabilityDistribution() const
Returns the cumulative probability distribution of the residuals used for reporting.
QVector< Statistics > rmsImageYSigmas() const
Returns the list of RMS image y sigma statistics.
int numberFixedPoints() const
Returns the number of 'fixed' (ground) points.
int m_numberConstrainedTargetParameters
number of constrained target parameters
void incrementIgnoredPoints()
Increase the number of ignored points.
double m_rmsXResiduals
rms of x residuals
This class is an XmlHandler used to read and write BundleResults objects from and to XML files...
double maximumLikelihoodMedianR2Residuals() const
Returns the median of the |R^2 residuals|.
void incrementNumberConstrainedPointParameters(int incrementAmount)
Increase the number of contrained point parameters.
double m_elapsedTimeErrorProp
elapsed time for error propagation
std::istream & operator>>(std::istream &is, CSVReader &csv)
Input read operator for input stream sources.
int m_numberConstrainedPointParameters
number of constrained point parameters
QList< Statistics > rmsImageResiduals() const
Returns the list of RMS image residuals statistics.
double m_maximumLikelihoodMedianR2Residuals
Median of R^2 residuals.
QVector< Statistics > rmsImageZSigmas() const
Returns the list of RMS image z sigma statistics.
XML Handler that parses XMLs in a stack-oriented way.
QString maxSigmaLatitudePointId() const
Returns the maximum sigma latitude point id.
void addResidualsProbabilityDistributionObservation(double obsValue)
Adds an observation to the cumulative probability distribution of residuals used for reporting...
int m_numberRejectedObservations
number of rejected image coordinate observations
Distance m_minSigmaLatitudeDistance
The minimum sigma latitude distance.
void resizeSigmaStatisticsVectors(int numberImages)
Resizes all image sigma vectors.
double sigmaRadiusStatisticsRms() const
Returns the RMS of the adjusted raidus sigmas.
void computeSigma0(double dvtpv, BundleSettings::ConvergenceCriteria criteria)
Computes the sigma0 and stores it internally.
Class provides maximum likelihood estimation functions for robust parameter estimation, e.g.
void setNumberRejectedObservations(int numberObservations)
Sets the number of rejected observations.
Distance m_maxSigmaRadiusDistance
The maximum sigma radius distance.
BundleResults(QObject *parent=0)
Constructs a BundleSettings object.
Distance minSigmaRadiusDistance() const
Returns the minimum sigma redius distance.
QList< QPair< MaximumLikelihoodWFunctions, double > > m_maximumLikelihoodFunctions
< The maximum likelihood models and their quantiles.
void initializeResidualsProbabilityDistribution(unsigned int nodes=20)
Initializes or resets the cumulative probability distribution of residuals used for reporting...
int m_iterations
The number of iterations taken by BundleAdjust.
int m_numberUnknownParameters
total number of parameters to solve for
void openH5Group(H5::CommonFG &locationObject, QString locationName)
Reads from an hdf5 group.
void setCorrMatImgsAndParams(QMap< QString, QStringList > imgsAndParams)
Set the images and their associated parameters of the correlation matrix.
QDataStream & write(QDataStream &stream) const
Writes the BundleResults object to a QDataStream.
QString minSigmaLatitudePointId() const
Returns the minimum sigma latitude point id.
CorrelationMatrix * m_correlationMatrix
The correlation matrix from the BundleAdjust.
void initializeProbabilityDistribution(unsigned int nodes=20)
Initializes or resets the cumulative probability distribution of |R^2 residuals|. ...
int m_numberFixedPoints
number of 'fixed' (ground) points (define)
bool converged() const
Returns whether or not the bundle adjustment converged.
int numberObservations() const
Returns the number of observations.
Distance maxSigmaLongitudeDistance() const
Returns the maximum sigma longitude distance.
int numberConstrainedImageParameters() const
Returns the number of constrained image parameters.
QVector< Statistics > rmsImageRASigmas() const
Returns the list of RMS image right ascension sigma statistics.
void setNumberObservations(int numberObservations)
Sets the number of observations.
int m_maximumLikelihoodIndex
This count keeps track of which stage of the maximum likelihood adjustment the bundle is currently on...
QString m_minSigmaLatitudePointId
The minimum sigma latitude point id.
QVector< Statistics > m_rmsImageZSigmas
< The root mean square image z sigmas.
Distance maxSigmaLatitudeDistance() const
Returns the maximum sigma latitude distance.
int m_degreesOfFreedom
degrees of freedom
void setSigmaLatitudeRange(Distance minLatDist, Distance maxLatDist, QString minLatPointId, QString maxLatPointId)
Sets the min and max sigma latitude distances and point ids.
void setRadiansToMeters(double rtm)
Sets the radians to meters conversion constant for the target body.
QList< Statistics > m_rmsImageLineResiduals
List of RMS image line residual statistics for each image in the bundle.
int numberUnknownParameters() const
Returns the number of unknown parameters.
~XmlHandler()
Destroys an XmlHandler.
QList< Statistics > rmsImageSampleResiduals() const
Returns the list of RMS image sample residuals statistics.
void setRmsXYResiduals(double rx, double ry, double rxy)
Sets the root mean square of the x and y residuals.
void initialize()
Initializes the BundleResults to a default state where all numeric members are set to 0 or another de...
void incrementMaximumLikelihoodModelIndex()
Increases the value that indicates which stage the maximum likelihood adjustment is currently on...
double m_rmsSigmaLatitudeStats
rms of adjusted Latitude sigmas
~BundleResults()
Destroys this BundleResults object.
void incrementHeldImages()
Increases the number of 'held' images.
A container class for statistical results from a BundleAdjust solution.
Distance maxSigmaRadiusDistance() const
Returns the maximum sigma redius distance.
void resetNumberConstrainedTargetParameters()
Resets the number of constrained target parameters to 0.
PvlObject pvlObject(QString name="BundleResults") const
Saves the BundleResults object as a PvlObject.
double elapsedTime() const
Returns the elapsed time for the bundle adjustment.
QList< Statistics > rmsImageLineResiduals() const
Returns the list of RMS image line residuals statistics.
void setSigmaRadiusRange(Distance minRadDist, Distance maxRadDist, QString minRadPointId, QString maxRadPointId)
Sets the min and max sigma radius distances and point ids.
double rmsRx() const
Returns the RMS of the x residuals.
void setSigma0(double sigma0)
Sets the sigma0.
double m_rmsSigmaLongitudeStats
rms of adjusted Longitude sigmas
Distance minSigmaLongitudeDistance() const
Returns the minimum sigma longitude distance.
QDebug operator<<(QDebug debug, const Hillshade &hillshade)
Print this class out to a QDebug object.
int m_numberImageParameters
number of image parameters
void incrementNumberConstrainedTargetParameters(int incrementAmount)
Increases the number of constrained target parameters.
void setConverged(bool converged)
Sets if the bundle adjustment converged.
Serial Number list generator.
Contains Pvl Groups and Pvl Objects.
void setIterations(int iterations)
Sets the number of iterations taken by the BundleAdjust.
int numberConstrainedPointParameters() const
Returns the number of constrained point parameters.
double radiansToMeters() const
Returns the radians to meters conversion factor for the target body.
Distance m_maxSigmaLongitudeDistance
The maximum sigma longitude distance.
double m_sigma0
std deviation of unit weight
his enables stack-based XML parsing of XML files.
QList< Statistics > m_rmsImageResiduals
RMS image sample and line residual statistics for each image in the bundle.
double rmsRxy() const
Returns the RMS of the x and y residuals.
MaximumLikelihoodWFunctions maximumLikelihoodModelWFunc(int modelIndex) const
Returns the maximum likelihood model at the given index.
QUuid * m_id
A unique ID for this object (useful for others to reference this object when saving to disk)...
ConvergenceCriteria
This enum defines the options for the bundle adjustment's convergence.
void setDegreesOfFreedom(double degreesOfFreedom)
Sets the degrees of freedom.
QVector< Statistics > m_rmsImageTWISTSigmas
< The root mean square image twist sigmas.
int numberMaximumLikelihoodModels() const
Returns how many maximum likelihood models were used in the bundle adjustment.
double maximumLikelihoodModelQuantile(int modelIndex) const
Returns the quantile of the maximum likelihood model at the given index.