Container class for BundleAdjustment results. More...
#include <BundleSolutionInfo.h>
Inherits QObject.
Public Slots | |
void | updateFileName (Project *) |
Change the on-disk file name for the control network used to be where the control network ought to be in the given project. More... | |
Public Member Functions | |
BundleSolutionInfo (BundleSettingsQsp inputSettings, FileName controlNetworkFileName, BundleResults outputStatistics, QObject *parent=0) | |
Constructor. More... | |
BundleSolutionInfo (Project *project, XmlStackedHandlerReader *xmlReader, QObject *parent=0) | |
Constructor. More... | |
BundleSolutionInfo (FileName bundleSolutionInfoFile) | |
Constructor. More... | |
BundleSolutionInfo (const BundleSolutionInfo &src) | |
Constructor. More... | |
~BundleSolutionInfo () | |
Destructor. More... | |
BundleSolutionInfo & | operator= (const BundleSolutionInfo &src) |
Creates an equal operator for BundleSolutionInfos. More... | |
void | setOutputStatistics (BundleResults statisticsResults) |
Sets the stat results. More... | |
void | setRunTime (QString runTime) |
Sets the run time. More... | |
QString | id () const |
Get a unique, identifying string associated with this BundleSolutionInfo object. More... | |
QString | controlNetworkFileName () const |
Returns the name of the control network. More... | |
BundleSettingsQsp | bundleSettings () |
Returns the bundle settings. More... | |
BundleResults | bundleResults () |
Returns the bundle results. More... | |
QString | runTime () const |
Returns the run time. More... | |
bool | outputImagesCSVHeader (std::ofstream &fpOut) |
Outputs the header for the bundleout_images.csv file. More... | |
bool | outputHeader (std::ofstream &fpOut) |
Output header for bundle results file. More... | |
bool | outputText () |
Outputs a text file with the results of the BundleAdjust. More... | |
bool | outputImagesCSV () |
Outputs the bundleout_images.csv file which contains Jigsaw data about the images within each observation. More... | |
bool | outputPointsCSV () |
Outputs point data to a csv file. More... | |
bool | outputResiduals () |
Outputs image coordinate residuals to a csv file. More... | |
PvlObject | pvlObject (QString resultsName="BundleSolutionInfo", QString settingsName="InputSettings", QString statisticsName="StatisticsResults") |
Writes the results from BundleAdjust to a Pvl. More... | |
void | save (QXmlStreamWriter &stream, const Project *project, FileName newProjectRoot) const |
Saves the BundleSolutionInfo to the project. More... | |
void | save (QXmlStreamWriter &stream, const Project *project) const |
Saves the BundleSolutionInfo to the project. More... | |
QDataStream & | write (QDataStream &stream) const |
Writes the data to the stream. More... | |
QDataStream & | read (QDataStream &stream) |
Reads the data from the stream. More... | |
void | writeH5File (FileName outputFileName) const |
void | readH5File (FileName outputFileName) const |
void | createH5File (FileName outputFileName) const |
Creates a new file using H5F_ACC_EXCL. More... | |
void | openH5File (FileName outputFileName) |
Reads the settings and results from another BundleSolutionInfo. More... | |
Container class for BundleAdjustment results.
This class includes the settings used to run the bundle adjustment, the resulting statistics values, and the name of the control network used.
Isis::BundleSolutionInfo::BundleSolutionInfo | ( | BundleSettingsQsp | inputSettings, |
FileName | controlNetworkFileName, | ||
BundleResults | outputStatistics, | ||
QObject * | parent = 0 |
||
) |
Constructor.
Creates a BundleSolutionInfo.
inputSettings | The settings saved in BundleSolutionInfo |
controlNetworkFileName | The file name and path of the control network |
outputStatistics | The results of the BundleAdjust |
parent | The Qt-relationship parent |
Isis::BundleSolutionInfo::BundleSolutionInfo | ( | Project * | project, |
XmlStackedHandlerReader * | xmlReader, | ||
QObject * | parent = 0 |
||
) |
Constructor.
Creates a BundleSolutionInfo.
project | The current project |
xmlReader | An XML reader that's up to an <bundleSettings> tag. |
parent | The Qt-relationship parent |
References Isis::XmlStackedHandlerReader::pushContentHandler().
Isis::BundleSolutionInfo::BundleSolutionInfo | ( | FileName | bundleSolutionInfoFile | ) |
Constructor.
Creates a BundleSolutionInfo.
bundleSolutionInfo | Filename of another BundleSolutionInfo and reads the settings and BundleResults from that. |
References openH5File().
Isis::BundleSolutionInfo::BundleSolutionInfo | ( | const BundleSolutionInfo & | src | ) |
Constructor.
Creates a BundleSolutionInfo.
src | BundleSolutionInfo where the settings and BundleResults are read from. |
Isis::BundleSolutionInfo::~BundleSolutionInfo | ( | ) |
Destructor.
BundleResults Isis::BundleSolutionInfo::bundleResults | ( | ) |
Returns the bundle results.
IException::Unknown | "Results for this bundle is NULL." |
References _FILEINFO_, and Isis::IException::Unknown.
Referenced by Isis::JigsawDialog::bundleFinished(), Isis::ProjectItem::ProjectItem(), and pvlObject().
BundleSettingsQsp Isis::BundleSolutionInfo::bundleSettings | ( | ) |
Returns the bundle settings.
Referenced by Isis::Project::addBundleSolutionInfo(), Isis::ProjectItem::ProjectItem(), and pvlObject().
QString Isis::BundleSolutionInfo::controlNetworkFileName | ( | ) | const |
Returns the name of the control network.
References Isis::FileName::expanded().
Referenced by Isis::ProjectItem::ProjectItem(), pvlObject(), and read().
void Isis::BundleSolutionInfo::createH5File | ( | FileName | outputFileName | ) | const |
Creates a new file using H5F_ACC_EXCL.
IException::Io | "A file already exists with the given name [" |
IException::Unknown | "H5 exception handler has detected an error when invoking the function" |
IException::Unknown | "Unable to save bundle solution information to an HDF5 file." |
outputFileName | The name of the file we are creating. |
References _FILEINFO_, Isis::BundleResults::createH5Group(), Isis::FileName::expanded(), Isis::FileName::fileExists(), Isis::IException::Io, and Isis::IException::Unknown.
Referenced by Isis::Project::addBundleSolutionInfo().
QString Isis::BundleSolutionInfo::id | ( | ) | const |
Get a unique, identifying string associated with this BundleSolutionInfo object.
Referenced by Isis::Project::loadBundleSolutionInfo(), and read().
void Isis::BundleSolutionInfo::openH5File | ( | FileName | bundleSolutionInfoFile | ) |
Reads the settings and results from another BundleSolutionInfo.
IException::Io | "No file with the given name was found." |
IException::Io | "The given file is unsupported for constructing BundleSolutionInfo objects. Supported file types include [hdf]." |
IException::Unknown | "H5 exception handler has detected an error when invoking the function" |
IException::Unknown | "Unable to read bundle solution information from the given HDF5 file" |
bundleSolutionInfoFile | The name of the BundleSolutionInfo we are reading from |
References _FILEINFO_, Isis::ImageList::append(), Isis::FileName::expanded(), Isis::FileName::extension(), Isis::FileName::fileExists(), Isis::IException::Io, Isis::BundleResults::openH5Group(), and Isis::IException::Unknown.
Referenced by BundleSolutionInfo().
BundleSolutionInfo & Isis::BundleSolutionInfo::operator= | ( | const BundleSolutionInfo & | src | ) |
Creates an equal operator for BundleSolutionInfos.
src | the BundleSolutionInfo that we are comparing the current BundleSolutionInfo to. |
References Isis::FileName::expanded().
bool Isis::BundleSolutionInfo::outputHeader | ( | std::ofstream & | fpOut | ) |
Output header for bundle results file.
fpOut | The output stream that the header will be sent to. |
IException::Io | "Failed to output residual percentiles for bundleout" |
IException::Io | "Failed to output residual box plot for bundleout" |
References _FILEINFO_, Isis::BundleObservationSolveSettings::aprioriPointingSigmas(), Isis::BundleObservationSolveSettings::aprioriPositionSigmas(), Isis::BundleObservationSolveSettings::ckDegree(), Isis::BundleObservationSolveSettings::ckSolveDegree(), Isis::iTime::CurrentLocalTime(), Isis::BundleResults::elapsedTime(), Isis::BundleResults::elapsedTimeErrorProp(), Isis::FileName::expanded(), Isis::IException::Io, Isis::BundleResults::iterations(), Isis::StatCumProbDistDynCalc::max(), Isis::BundleResults::maximumLikelihoodModelQuantile(), Isis::BundleResults::maximumLikelihoodModelWFunc(), Isis::StatCumProbDistDynCalc::min(), Isis::MaximumLikelihoodWFunctions::modelToString(), Isis::Null, Isis::BundleObservationSolveSettings::numberCameraAngleCoefficientsSolved(), Isis::BundleObservationSolveSettings::numberCameraPositionCoefficientsSolved(), Isis::BundleResults::numberConstrainedImageParameters(), Isis::BundleResults::numberConstrainedPointParameters(), Isis::BundleResults::numberConstrainedTargetParameters(), Isis::BundleResults::numberObservations(), Isis::BundleResults::numberRejectedObservations(), Isis::BundleResults::numberUnknownParameters(), Isis::BundleResults::observations(), Isis::BundleResults::outputControlNet(), Isis::BundleResults::residualsCumulativeProbabilityDistribution(), Isis::BundleResults::sigma0(), Isis::BundleObservationSolveSettings::solvePolyOverPointing(), Isis::BundleObservationSolveSettings::solvePositionOverHermite(), Isis::BundleObservationSolveSettings::solveTwist(), Isis::BundleObservationSolveSettings::spkDegree(), Isis::BundleObservationSolveSettings::spkSolveDegree(), Isis::MaximumLikelihoodWFunctions::tweakingConstant(), Isis::StatCumProbDistDynCalc::value(), and Isis::MaximumLikelihoodWFunctions::weightedResidualCutoff().
Referenced by outputText().
bool Isis::BundleSolutionInfo::outputImagesCSV | ( | ) |
Outputs the bundleout_images.csv file which contains Jigsaw data about the images within each observation.
References Isis::BundleResults::converged(), Isis::BundleResults::observations(), outputImagesCSVHeader(), Isis::BundleResults::rmsImageLineResiduals(), Isis::BundleResults::rmsImageResiduals(), Isis::BundleResults::rmsImageSampleResiduals(), and Isis::toString().
bool Isis::BundleSolutionInfo::outputImagesCSVHeader | ( | std::ofstream & | fpOut | ) |
Outputs the header for the bundleout_images.csv file.
fpOut | The output file stream. |
References Isis::BundleObservationSolveSettings::numberCameraAngleCoefficientsSolved(), Isis::BundleObservationSolveSettings::numberCameraPositionCoefficientsSolved(), and Isis::toString().
Referenced by outputImagesCSV().
bool Isis::BundleSolutionInfo::outputPointsCSV | ( | ) |
Outputs point data to a csv file.
References Isis::BundleResults::bundleControlPoints(), Isis::ControlPoint::Constrained, Isis::DEG2RAD(), Isis::ControlPoint::Fixed, Isis::ControlPoint::Free, and Isis::BundleResults::radiansToMeters().
bool Isis::BundleSolutionInfo::outputResiduals | ( | ) |
Outputs image coordinate residuals to a csv file.
References Isis::BundleResults::bundleControlPoints().
bool Isis::BundleSolutionInfo::outputText | ( | ) |
Outputs a text file with the results of the BundleAdjust.
References Isis::BundleResults::bundleControlPoints(), Isis::BundleResults::converged(), Isis::BundleResults::maxSigmaLatitudeDistance(), Isis::BundleResults::maxSigmaLatitudePointId(), Isis::BundleResults::maxSigmaLongitudeDistance(), Isis::BundleResults::maxSigmaLongitudePointId(), Isis::BundleResults::maxSigmaRadiusDistance(), Isis::BundleResults::maxSigmaRadiusPointId(), Isis::Distance::meters(), Isis::BundleResults::minSigmaLatitudeDistance(), Isis::BundleResults::minSigmaLatitudePointId(), Isis::BundleResults::minSigmaLongitudeDistance(), Isis::BundleResults::minSigmaLongitudePointId(), Isis::BundleResults::minSigmaRadiusDistance(), Isis::BundleResults::minSigmaRadiusPointId(), Isis::BundleResults::observations(), outputHeader(), Isis::BundleResults::radiansToMeters(), Isis::BundleResults::setCorrMatImgsAndParams(), Isis::BundleResults::sigmaLatitudeStatisticsRms(), Isis::BundleResults::sigmaLongitudeStatisticsRms(), and Isis::BundleResults::sigmaRadiusStatisticsRms().
PvlObject Isis::BundleSolutionInfo::pvlObject | ( | QString | resultsName = "BundleSolutionInfo" , |
QString | settingsName = "InputSettings" , |
||
QString | statisticsName = "StatisticsResults" |
||
) |
Writes the results from BundleAdjust to a Pvl.
resultsName | The name of the results |
settingsName | The name of the settings |
statisticsName | The name of the statistics |
References bundleResults(), bundleSettings(), controlNetworkFileName(), Isis::FileName::expanded(), Isis::BundleResults::pvlObject(), and runTime().
QDataStream & Isis::BundleSolutionInfo::read | ( | QDataStream & | stream | ) |
Reads the data from the stream.
stream | The stream we are reading from |
References controlNetworkFileName(), and id().
Referenced by Isis::operator>>().
void Isis::BundleSolutionInfo::readH5File | ( | FileName | outputFileName | ) | const |
QString Isis::BundleSolutionInfo::runTime | ( | ) | const |
Returns the run time.
Referenced by Isis::Project::addBundleSolutionInfo(), pvlObject(), save(), Isis::ProjectItem::setBundleSolutionInfo(), and setRunTime().
void Isis::BundleSolutionInfo::save | ( | QXmlStreamWriter & | stream, |
const Project * | project, | ||
FileName | newProjectRoot | ||
) | const |
Saves the BundleSolutionInfo to the project.
Output format:
<image id="..." filename="..."> ... </image>
(fileName attribute is just the base name)
stream | The stream to which the BundleSolutionInfo will be saved |
project | The project to which this BundleSolutionInfo will be saved |
newProjectRoot | The location of the project root directory. This is not used. |
References Isis::FileName::expanded(), runTime(), and Isis::BundleResults::save().
void Isis::BundleSolutionInfo::save | ( | QXmlStreamWriter & | stream, |
const Project * | project | ||
) | const |
Saves the BundleSolutionInfo to the project.
stream | The stream to which the BundleSolutionInfo will be saved |
project | The project to which this BundleSolutionInfo will be saved |
References Isis::FileName::expanded(), runTime(), and Isis::BundleResults::save().
void Isis::BundleSolutionInfo::setOutputStatistics | ( | BundleResults | statisticsResults | ) |
Sets the stat results.
statisticsResults | The new BundleResults |
void Isis::BundleSolutionInfo::setRunTime | ( | QString | runTime | ) |
Sets the run time.
runTime | The run time. |
References runTime().
Referenced by Isis::JigsawDialog::bundleFinished().
|
slot |
Change the on-disk file name for the control network used to be where the control network ought to be in the given project.
This method is modelled after the updateFileName() methods in Image and Control. Those methods close something (cubes for Image and a control net for control) but there is not a close method in BundleSolutionInfo.
project | The project that this BundleSolutionInfo is stored in |
References Isis::Project::cnetRoot(), Isis::FileName::dir(), Isis::FileName::expanded(), and Isis::FileName::name().
QDataStream & Isis::BundleSolutionInfo::write | ( | QDataStream & | stream | ) | const |
Writes the data to the stream.
stream | The stream we are writing to and returning |
References Isis::FileName::expanded().
Referenced by Isis::operator<<().
void Isis::BundleSolutionInfo::writeH5File | ( | FileName | outputFileName | ) | const |
U.S. Department of the Interior | U.S. Geological Survey ISIS | Privacy & Disclaimers | Astrogeology Research Program To contact us, please post comments and questions on the ISIS Support Center File Modified: 07/12/2023 23:32:43 |