Isis 3 Programmer Reference
|
Container class for BundleAdjustment results. More...
#include <BundleSolutionInfo.h>
Classes | |
class | XmlHandler |
This class is used to read an images.xml file into an image list. More... | |
Public Slots | |
void | updateFileName (Project *) |
TODO: change description below to something more like english. More... | |
Public Member Functions | |
BundleSolutionInfo (BundleSettingsQsp inputSettings, FileName controlNetworkFileName, BundleResults outputStatistics, QList< ImageList * > imgList, QObject *parent=0) | |
Constructor. More... | |
BundleSolutionInfo (Project *project, XmlStackedHandlerReader *xmlReader, QObject *parent=0) | |
Constructor. More... | |
~BundleSolutionInfo () | |
Destructor. More... | |
QString | savedBundleOutputFilename () |
Returns bundleout text filename. More... | |
QString | savedImagesFilename () |
Returns filename of output bundle images csv file. More... | |
QString | savedPointsFilename () |
Returns filename of output bundle points csv file. More... | |
QString | savedResidualsFilename () |
Returns filename of output bundle residuals csv file. More... | |
void | addAdjustedImages (ImageList *images) |
Adds a list of images that were adjusted (their labels were updated). More... | |
void | setOutputStatistics (BundleResults statisticsResults) |
Sets the stat results. More... | |
void | setOutputControl (Control *outputControl) |
Returns the name of the output control network. More... | |
void | setOutputControlName (QString name) |
Sets m_outputControlName. More... | |
void | setRunTime (QString runTime) |
Sets the run time, and the name if a name is not already set. More... | |
void | setName (QString name) |
Sets the name of the bundle. More... | |
QList< ImageList * > | adjustedImages () const |
Returns the list of images that were adjusted after a bundle. More... | |
QString | id () const |
Get a unique, identifying string associated with this BundleSolutionInfo object. More... | |
QString | inputControlNetFileName () const |
Returns the name of the input control network. More... | |
QString | outputControlNetFileName () const |
Returns the name of the output control network. More... | |
Control * | control () const |
Returns bundle output Control object. More... | |
QString | outputControlName () const |
Returns m_outputControlName. More... | |
BundleSettingsQsp | bundleSettings () |
Returns bundle settings. More... | |
BundleResults | bundleResults () |
Returns the bundle results. More... | |
QList< ImageList * > | imageList () |
Returns the images used in the bundle. More... | |
QString | runTime () const |
Returns the run time. More... | |
QString | name () const |
Returns the name of the bundle. More... | |
bool | outputImagesCSVHeader (std::ofstream &fpOut, BundleObservationQsp observations) |
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... | |
void | save (QXmlStreamWriter &stream, const Project *project, FileName newProjectRoot) const |
Saves the BundleSolutionInfo to the project. More... | |
QString | surfacePointCoordName (SurfacePoint::CoordinateType type, SurfacePoint::CoordIndex coordInx) const |
Determine the control point coordinate name. More... | |
Private Attributes | |
QUuid * | m_id |
A unique ID for this BundleSolutionInfo object (useful for others to reference this object when saving to disk). More... | |
QString | m_name |
Name of the bundle. Defaults to the id. More... | |
QString | m_runTime |
Run time of the bundle adjustment. More... | |
FileName * | m_inputControlNetFileName |
Input control network file name. More... | |
Control * | m_outputControl |
Output control. More... | |
QString | m_outputControlName |
BundleSettingsQsp | m_settings |
Bundle settings. More... | |
BundleResults * | m_statisticsResults |
Bundle statistical results. More... | |
QList< ImageList * > * | m_images |
Input image list. More... | |
QList< ImageList * > * | m_adjustedImages |
Adjusted image list. More... | |
QString | m_txtBundleOutputFilename |
QString | m_csvSavedImagesFilename |
QString | m_csvSavedPointsFilename |
QString | m_csvSavedResidualsFilename |
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. NOTE: BundleSolutionInfo is derived from QObject as it has one slot (perhaps more signals and slots in the future? As a child of QObject it should have no copy constructor or assignment operator. See for example...
http://doc.qt.io/qt-5/qobject.html#no-copy-constructor
Definition at line 159 of file BundleSolutionInfo.h.
Isis::BundleSolutionInfo::BundleSolutionInfo | ( | BundleSettingsQsp | inputSettings, |
FileName | controlNetworkFileName, | ||
BundleResults | outputStatistics, | ||
QList< ImageList * > | imgList, | ||
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 |
Definition at line 47 of file BundleSolutionInfo.cpp.
References m_adjustedImages, m_id, m_images, m_inputControlNetFileName, m_name, m_outputControl, m_runTime, m_settings, and m_statisticsResults.
Isis::BundleSolutionInfo::BundleSolutionInfo | ( | Project * | project, |
XmlStackedHandlerReader * | xmlReader, | ||
QObject * | parent = 0 |
||
) |
Constructor.
Creates a BundleSolutionInfo from disk.
project | The current project |
xmlReader | An XML reader that's up to an <bundleSettings> tag. |
parent | The Qt-relationship parent |
Definition at line 72 of file BundleSolutionInfo.cpp.
References m_adjustedImages, m_id, m_images, m_inputControlNetFileName, m_name, m_outputControl, m_runTime, m_statisticsResults, and Isis::XmlStackedHandlerReader::pushContentHandler().
Isis::BundleSolutionInfo::~BundleSolutionInfo | ( | ) |
Destructor.
Definition at line 95 of file BundleSolutionInfo.cpp.
References m_id, m_images, m_inputControlNetFileName, m_outputControl, and m_statisticsResults.
void Isis::BundleSolutionInfo::addAdjustedImages | ( | ImageList * | images | ) |
Adds a list of images that were adjusted (their labels were updated).
ImageList | *images The list of images to add that had their labels updated. |
Definition at line 166 of file BundleSolutionInfo.cpp.
References m_adjustedImages.
Referenced by Isis::JigsawRunWidget::on_JigsawAcceptButton_clicked().
Returns the list of images that were adjusted after a bundle.
This can potentially be an empty QList if no image labels were updated.
Definition at line 222 of file BundleSolutionInfo.cpp.
References m_adjustedImages.
Referenced by Isis::Project::XmlHandler::endElement(), and Isis::ProjectItem::ProjectItem().
BundleResults Isis::BundleSolutionInfo::bundleResults | ( | ) |
Returns the bundle results.
IException::Unknown | "Results for this bundle is NULL." |
Definition at line 349 of file BundleSolutionInfo.cpp.
References m_statisticsResults, and Isis::IException::Unknown.
Referenced by Isis::JigsawRunWidget::notifyThreadFinished(), Isis::JigsawRunWidget::on_JigsawAcceptButton_clicked(), and Isis::ProjectItem::ProjectItem().
BundleSettingsQsp Isis::BundleSolutionInfo::bundleSettings | ( | ) |
Returns bundle settings.
Definition at line 337 of file BundleSolutionInfo.cpp.
References m_settings.
Referenced by Isis::JigsawRunWidget::on_JigsawAcceptButton_clicked(), and Isis::ProjectItem::ProjectItem().
Control * Isis::BundleSolutionInfo::control | ( | ) | const |
Returns bundle output Control object.
Definition at line 327 of file BundleSolutionInfo.cpp.
References m_outputControl.
Referenced by Isis::ProjectItem::ProjectItem().
QString Isis::BundleSolutionInfo::id | ( | ) | const |
Get a unique, identifying string associated with this BundleSolutionInfo object.
Definition at line 232 of file BundleSolutionInfo.cpp.
References m_id.
Returns the images used in the bundle.
Definition at line 366 of file BundleSolutionInfo.cpp.
References m_images.
Referenced by Isis::JigsawRunWidget::on_JigsawAcceptButton_clicked().
QString Isis::BundleSolutionInfo::inputControlNetFileName | ( | ) | const |
Returns the name of the input control network.
Definition at line 274 of file BundleSolutionInfo.cpp.
References Isis::FileName::expanded(), and m_inputControlNetFileName.
Referenced by Isis::JigsawRunWidget::on_JigsawAcceptButton_clicked().
QString Isis::BundleSolutionInfo::name | ( | ) | const |
Returns the name of the bundle.
The name defaults to the id, unless the name has been set using setName()
Definition at line 387 of file BundleSolutionInfo.cpp.
References m_name.
Referenced by Isis::ProjectItemModel::onBundleSolutionInfoAdded(), save(), Isis::ProjectItem::setBundleSolutionInfo(), setName(), and setOutputControlName().
QString Isis::BundleSolutionInfo::outputControlName | ( | ) | const |
Returns m_outputControlName.
Definition at line 318 of file BundleSolutionInfo.cpp.
Referenced by outputHeader().
QString Isis::BundleSolutionInfo::outputControlNetFileName | ( | ) | const |
Returns the name of the output control network.
Definition at line 284 of file BundleSolutionInfo.cpp.
References Isis::Control::fileName(), and m_outputControl.
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" |
Definition at line 479 of file BundleSolutionInfo.cpp.
References Isis::Statistics::AddData(), Isis::BundleObservationSolveSettings::aprioriPointingSigmas(), Isis::BundleObservationSolveSettings::aprioriPositionSigmas(), Isis::BundleObservationSolveSettings::ckDegree(), Isis::BundleObservationSolveSettings::ckSolveDegree(), Isis::SurfacePoint::coordinateTypeToString(), Isis::iTime::CurrentLocalTime(), Isis::BundleResults::elapsedTime(), Isis::BundleResults::elapsedTimeErrorProp(), Isis::FileName::expanded(), Isis::IException::Io, Isis::BundleResults::iterations(), Isis::SurfacePoint::Latitudinal, m_inputControlNetFileName, m_settings, m_statisticsResults, 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(), outputControlName(), Isis::BundleResults::outputControlNet(), Isis::IException::Programmer, Isis::SurfacePoint::Rectangular, Isis::BundleResults::residualsCumulativeProbabilityDistribution(), Isis::Statistics::Rms(), Isis::BundleResults::sigma0(), Isis::BundleObservationSolveSettings::solvePolyOverPointing(), Isis::BundleObservationSolveSettings::solvePositionOverHermite(), Isis::BundleObservationSolveSettings::solveTwist(), Isis::BundleObservationSolveSettings::spkDegree(), Isis::BundleObservationSolveSettings::spkSolveDegree(), Isis::toString(), 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.
Definition at line 1085 of file BundleSolutionInfo.cpp.
References Isis::BundleResults::converged(), Isis::BundleObservationVector::instrumentIds(), m_settings, m_statisticsResults, Isis::BundleResults::observations(), Isis::BundleObservationVector::observationsByInstId(), outputImagesCSVHeader(), Isis::BundleResults::rmsImageLineResiduals(), Isis::BundleResults::rmsImageResiduals(), Isis::BundleResults::rmsImageSampleResiduals(), and Isis::toString().
Referenced by Isis::JigsawRunWidget::on_JigsawAcceptButton_clicked().
bool Isis::BundleSolutionInfo::outputImagesCSVHeader | ( | std::ofstream & | fpOut, |
BundleObservationQsp | observation | ||
) |
Outputs the header for the bundleout_images.csv file.
fpOut | The output file stream. |
observation | An observation for the instrument that this header is for. |
Definition at line 403 of file BundleSolutionInfo.cpp.
Referenced by outputImagesCSV().
bool Isis::BundleSolutionInfo::outputPointsCSV | ( | ) |
Outputs point data to a csv file.
Definition at line 1404 of file BundleSolutionInfo.cpp.
References Isis::BundleResults::bundleControlPoints(), Isis::ControlPoint::Constrained, Isis::ControlPoint::Fixed, Isis::ControlPoint::Free, m_settings, and m_statisticsResults.
Referenced by Isis::JigsawRunWidget::on_JigsawAcceptButton_clicked().
bool Isis::BundleSolutionInfo::outputResiduals | ( | ) |
Outputs image coordinate residuals to a csv file.
Definition at line 1517 of file BundleSolutionInfo.cpp.
References Isis::BundleResults::bundleControlPoints(), m_settings, and m_statisticsResults.
Referenced by Isis::JigsawRunWidget::on_JigsawAcceptButton_clicked().
bool Isis::BundleSolutionInfo::outputText | ( | ) |
Outputs a text file with the results of the BundleAdjust.
Definition at line 1201 of file BundleSolutionInfo.cpp.
References Isis::BundleResults::bundleControlPoints(), Isis::BundleResults::converged(), Isis::SurfacePoint::Latitudinal, m_settings, m_statisticsResults, Isis::BundleResults::maxSigmaCoord1Distance(), Isis::BundleResults::maxSigmaCoord1PointId(), Isis::BundleResults::maxSigmaCoord2Distance(), Isis::BundleResults::maxSigmaCoord2PointId(), Isis::BundleResults::maxSigmaCoord3Distance(), Isis::BundleResults::maxSigmaCoord3PointId(), Isis::Distance::meters(), Isis::BundleResults::minSigmaCoord1Distance(), Isis::BundleResults::minSigmaCoord1PointId(), Isis::BundleResults::minSigmaCoord2Distance(), Isis::BundleResults::minSigmaCoord2PointId(), Isis::BundleResults::minSigmaCoord3Distance(), Isis::BundleResults::minSigmaCoord3PointId(), Isis::BundleResults::observations(), outputHeader(), Isis::BundleResults::setCorrMatImgsAndParams(), Isis::BundleResults::sigmaCoord1StatisticsRms(), Isis::BundleResults::sigmaCoord2StatisticsRms(), Isis::BundleResults::sigmaCoord3StatisticsRms(), and surfacePointCoordName().
Referenced by Isis::JigsawRunWidget::on_JigsawAcceptButton_clicked().
QString Isis::BundleSolutionInfo::runTime | ( | ) | const |
Returns the run time.
Definition at line 264 of file BundleSolutionInfo.cpp.
References m_runTime.
Referenced by Isis::JigsawRunWidget::on_JigsawAcceptButton_clicked(), 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. |
Definition at line 1616 of file BundleSolutionInfo.cpp.
References Isis::Project::bundleSolutionInfoRoot(), Isis::FileName::expanded(), Isis::Control::fileName(), Isis::IException::Io, m_adjustedImages, m_id, m_inputControlNetFileName, m_name, m_outputControl, m_settings, m_statisticsResults, Isis::FileName::name(), name(), Isis::Project::newProjectRoot(), Isis::FileName::path(), Isis::Project::projectRoot(), runTime(), Isis::BundleResults::save(), Isis::Control::save(), and Isis::FileName::toString().
QString Isis::BundleSolutionInfo::savedBundleOutputFilename | ( | ) |
Returns bundleout text filename.
Definition at line 126 of file BundleSolutionInfo.cpp.
Referenced by Isis::ProjectItemModel::onBundleSolutionInfoAdded().
QString Isis::BundleSolutionInfo::savedImagesFilename | ( | ) |
Returns filename of output bundle images csv file.
Definition at line 136 of file BundleSolutionInfo.cpp.
Referenced by Isis::ProjectItemModel::onBundleSolutionInfoAdded().
QString Isis::BundleSolutionInfo::savedPointsFilename | ( | ) |
Returns filename of output bundle points csv file.
Definition at line 146 of file BundleSolutionInfo.cpp.
Referenced by Isis::ProjectItemModel::onBundleSolutionInfoAdded().
QString Isis::BundleSolutionInfo::savedResidualsFilename | ( | ) |
Returns filename of output bundle residuals csv file.
Definition at line 156 of file BundleSolutionInfo.cpp.
Referenced by Isis::ProjectItemModel::onBundleSolutionInfoAdded().
void Isis::BundleSolutionInfo::setName | ( | QString | name | ) |
Sets the name of the bundle.
name | QString of the new name |
Definition at line 376 of file BundleSolutionInfo.cpp.
References m_name, and name().
Referenced by Isis::ProjectItemModel::setData().
void Isis::BundleSolutionInfo::setOutputControl | ( | Control * | outputControl | ) |
Returns the name of the output control network.
Definition at line 298 of file BundleSolutionInfo.cpp.
References m_outputControl.
Referenced by Isis::JigsawRunWidget::on_JigsawAcceptButton_clicked().
void Isis::BundleSolutionInfo::setOutputControlName | ( | QString | name | ) |
Sets m_outputControlName.
name | QString of the new value |
Definition at line 308 of file BundleSolutionInfo.cpp.
References name().
void Isis::BundleSolutionInfo::setOutputStatistics | ( | BundleResults | statisticsResults | ) |
Sets the stat results.
statisticsResults | The new BundleResults |
Definition at line 176 of file BundleSolutionInfo.cpp.
References m_statisticsResults.
void Isis::BundleSolutionInfo::setRunTime | ( | QString | runTime | ) |
Sets the run time, and the name if a name is not already set.
runTime | The run time. |
Definition at line 242 of file BundleSolutionInfo.cpp.
References m_name, m_runTime, and runTime().
Referenced by Isis::JigsawRunWidget::bundleFinished(), and Isis::BundleAdjust::bundleSolveInformation().
QString Isis::BundleSolutionInfo::surfacePointCoordName | ( | SurfacePoint::CoordinateType | type, |
SurfacePoint::CoordIndex | coordIdx | ||
) | const |
Determine the control point coordinate name.
type | The control point coordinate type (see SurfacePoint.h) |
coordIdx | The coordinate index (see SurfacePoint.h) |
Definition at line 1883 of file BundleSolutionInfo.cpp.
References Isis::SurfacePoint::Latitudinal, m_settings, Isis::IException::Programmer, Isis::SurfacePoint::Rectangular, and Isis::toString().
Referenced by outputText().
|
slot |
TODO: change description below to something more like english.
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 |
Definition at line 195 of file BundleSolutionInfo.cpp.
References Isis::Project::cnetRoot(), Isis::FileName::dir(), Isis::FileName::expanded(), Isis::Control::fileName(), m_inputControlNetFileName, m_outputControl, and Isis::FileName::name().
Adjusted image list.
Definition at line 260 of file BundleSolutionInfo.h.
Referenced by addAdjustedImages(), adjustedImages(), BundleSolutionInfo(), and save().
|
private |
A unique ID for this BundleSolutionInfo object (useful for others to reference this object when saving to disk).
Definition at line 251 of file BundleSolutionInfo.h.
Referenced by BundleSolutionInfo(), id(), save(), and ~BundleSolutionInfo().
Input image list.
Definition at line 259 of file BundleSolutionInfo.h.
Referenced by BundleSolutionInfo(), imageList(), and ~BundleSolutionInfo().
|
private |
Input control network file name.
Definition at line 254 of file BundleSolutionInfo.h.
Referenced by BundleSolutionInfo(), inputControlNetFileName(), outputHeader(), save(), updateFileName(), and ~BundleSolutionInfo().
|
private |
Name of the bundle. Defaults to the id.
Definition at line 252 of file BundleSolutionInfo.h.
Referenced by BundleSolutionInfo(), name(), save(), setName(), and setRunTime().
|
private |
Output control.
Definition at line 255 of file BundleSolutionInfo.h.
Referenced by BundleSolutionInfo(), control(), outputControlNetFileName(), save(), setOutputControl(), updateFileName(), and ~BundleSolutionInfo().
|
private |
Run time of the bundle adjustment.
Definition at line 253 of file BundleSolutionInfo.h.
Referenced by BundleSolutionInfo(), runTime(), and setRunTime().
|
private |
Bundle settings.
Definition at line 257 of file BundleSolutionInfo.h.
Referenced by bundleSettings(), BundleSolutionInfo(), outputHeader(), outputImagesCSV(), outputPointsCSV(), outputResiduals(), outputText(), save(), and surfacePointCoordName().
|
private |
Bundle statistical results.
Definition at line 258 of file BundleSolutionInfo.h.
Referenced by bundleResults(), BundleSolutionInfo(), outputHeader(), outputImagesCSV(), outputPointsCSV(), outputResiduals(), outputText(), save(), setOutputStatistics(), and ~BundleSolutionInfo().