Isis Developer Reference
|
Container class for BundleAdjustment results. More...
#include <BundleSolutionInfo.h>
Public Slots | |
void | updateFileName (Project *) |
TODO: change description below to something more like english. | |
Public Member Functions | |
BundleSolutionInfo (BundleSettingsQsp inputSettings, FileName controlNetworkFileName, BundleResults outputStatistics, QList< ImageList * > imgList, QObject *parent=0) | |
Constructor. | |
BundleSolutionInfo (BundleSettingsQsp inputSettings, FileName controlNetworkFileName, FileName lidarDataFileName, BundleResults outputStatistics, QList< ImageList * > imgList, QObject *parent=0) | |
Constructor. | |
BundleSolutionInfo (Project *project, QXmlStreamReader *xmlReader, QObject *parent=0) | |
Handle an XML start element. | |
void | readBundleSolutionInfo (QXmlStreamReader *xmlReader) |
BundleSolutionInfo ()=default | |
~BundleSolutionInfo () | |
Destructor. | |
QString | savedBundleOutputFilename () |
Returns bundleout text filename. | |
QString | savedImagesFilename () |
Returns filename of output bundle images csv file. | |
QString | savedPointsFilename () |
Returns filename of output bundle points csv file. | |
QString | savedResidualsFilename () |
Returns filename of output bundle residuals csv file. | |
void | addAdjustedImages (ImageList *images) |
Adds a list of images that were adjusted (their labels were updated). | |
void | setOutputStatistics (BundleResults statisticsResults) |
Sets the stat results. | |
void | setOutputControl (Control *outputControl) |
Returns the name of the output control network. | |
void | setOutputControlName (QString name) |
Sets m_outputControlName. | |
void | setRunTime (QString runTime) |
Sets the run time, and the name if a name is not already set. | |
void | setName (QString name) |
Sets the name of the bundle. | |
QList< ImageList * > | adjustedImages () const |
Returns the list of images that were adjusted after a bundle. | |
QString | id () const |
Get a unique, identifying string associated with this BundleSolutionInfo object. | |
QString | inputControlNetFileName () const |
Returns the name of the input control network. | |
QString | outputControlNetFileName () const |
Returns the name of the output control network. | |
Control * | control () const |
Returns bundle output Control object. | |
QString | outputControlName () const |
Returns m_outputControlName. | |
QString | inputLidarDataFileName () const |
Returns name of input lidar data file (if any). | |
BundleSettingsQsp | bundleSettings () |
Returns bundle settings. | |
BundleResults | bundleResults () |
Returns the bundle results. | |
QList< ImageList * > | imageList () |
Returns the images used in the bundle. | |
QString | runTime () const |
Returns the run time. | |
QString | name () const |
Returns the name of the bundle. | |
bool | outputImagesCSVHeader (std::ofstream &fpOut, BundleObservationQsp observations) |
Outputs the header for the bundleout_images.csv file. | |
bool | outputHeader (std::ofstream &fpOut) |
Output header for bundle results file. | |
bool | outputText () |
Outputs a text file with the results of the BundleAdjust. | |
bool | outputImagesCSV () |
Outputs the bundleout_images.csv file which contains Jigsaw data about the images within each observation. | |
bool | outputPointsCSV () |
Outputs point data to a csv file. | |
bool | outputLidarCSV () |
Outputs lidar data to a csv file. | |
bool | outputResiduals () |
Outputs image coordinate residuals to a csv file. | |
void | save (QXmlStreamWriter &stream, const Project *project, FileName newProjectRoot) const |
Saves the BundleSolutionInfo to the project. | |
QString | surfacePointCoordName (SurfacePoint::CoordinateType type, SurfacePoint::CoordIndex coordInx) const |
Determine the control point coordinate name. | |
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...
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 |
Isis::BundleSolutionInfo::BundleSolutionInfo | ( | BundleSettingsQsp | inputSettings, |
FileName | controlNetworkFileName, | ||
FileName | lidarDataFileName, | ||
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 |
Isis::BundleSolutionInfo::BundleSolutionInfo | ( | Project * | project, |
QXmlStreamReader * | xmlReader, | ||
QObject * | parent = 0 ) |
Handle an XML start element.
This expects <image> and <displayProperties> elements.
namespaceURI | ??? |
localName | The keyword name given to the member variable in the XML. |
qName | ??? |
atts | The attribute containing the keyword value for the given local name. |
References readBundleSolutionInfo().
|
default |
Isis::BundleSolutionInfo::~BundleSolutionInfo | ( | ) |
Destructor.
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. |
Returns the list of images that were adjusted after a bundle.
This can potentially be an empty QList if no image labels were updated.
Referenced by Isis::ProjectItem::ProjectItem().
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::JigsawRunWidget::notifyThreadFinished(), and Isis::ProjectItem::ProjectItem().
BundleSettingsQsp Isis::BundleSolutionInfo::bundleSettings | ( | ) |
Returns bundle settings.
Referenced by Isis::ProjectItem::ProjectItem().
Control * Isis::BundleSolutionInfo::control | ( | ) | const |
Returns bundle output Control object.
Referenced by Isis::ProjectItem::ProjectItem().
QString Isis::BundleSolutionInfo::id | ( | ) | const |
Get a unique, identifying string associated with this BundleSolutionInfo object.
Returns the images used in the bundle.
QString Isis::BundleSolutionInfo::inputControlNetFileName | ( | ) | const |
Returns the name of the input control network.
References Isis::FileName::expanded().
QString Isis::BundleSolutionInfo::inputLidarDataFileName | ( | ) | const |
Returns name of input lidar data file (if any).
References Isis::FileName::expanded().
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()
Referenced by save(), Isis::ProjectItem::setBundleSolutionInfo(), setName(), and setOutputControlName().
QString Isis::BundleSolutionInfo::outputControlName | ( | ) | const |
QString Isis::BundleSolutionInfo::outputControlNetFileName | ( | ) | const |
Returns the name of the output control network.
References Isis::Control::fileName().
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::SurfacePoint::coordinateTypeToString(), Isis::iTime::CurrentLocalTime(), Isis::BundleResults::degreesOfFreedom(), Isis::BundleResults::elapsedTime(), Isis::BundleResults::elapsedTimeErrorProp(), Isis::FileName::expanded(), Isis::IException::Io, Isis::BundleResults::iterations(), Isis::SurfacePoint::Latitudinal, Isis::StatCumProbDistDynCalc::max(), Isis::BundleResults::maximumLikelihoodModelQuantile(), Isis::BundleResults::maximumLikelihoodModelWFunc(), Isis::StatCumProbDistDynCalc::min(), Isis::MaximumLikelihoodWFunctions::modelToString(), Isis::Null, Isis::BundleResults::numberConstrainedImageParameters(), Isis::BundleResults::numberConstrainedPointParameters(), Isis::BundleResults::numberConstrainedTargetParameters(), Isis::BundleResults::numberLidarRangeConstraintEquations(), Isis::BundleResults::numberObservations(), Isis::BundleResults::numberRejectedObservations(), Isis::BundleResults::numberUnknownParameters(), Isis::BundleResults::observations(), outputControlName(), Isis::BundleResults::outputControlNet(), Isis::BundleResults::outputLidarData(), Isis::IException::Programmer, Isis::SurfacePoint::Rectangular, Isis::BundleResults::residualsCumulativeProbabilityDistribution(), Isis::BundleResults::sigma0(), 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.
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, |
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. |
Referenced by outputImagesCSV().
bool Isis::BundleSolutionInfo::outputLidarCSV | ( | ) |
Outputs lidar data to a csv file.
References Isis::BundleResults::bundleLidarControlPoints().
bool Isis::BundleSolutionInfo::outputPointsCSV | ( | ) |
Outputs point data to a csv file.
References Isis::BundleResults::bundleControlPoints(), Isis::ControlPoint::Constrained, Isis::ControlPoint::Fixed, and Isis::ControlPoint::Free.
bool Isis::BundleSolutionInfo::outputResiduals | ( | ) |
Outputs image coordinate residuals to a csv file.
References Isis::BundleResults::bundleControlPoints(), and Isis::BundleResults::bundleLidarControlPoints().
bool Isis::BundleSolutionInfo::outputText | ( | ) |
Outputs a text file with the results of the BundleAdjust.
References Isis::BundleResults::bundleControlPoints(), Isis::BundleResults::bundleLidarControlPoints(), Isis::BundleResults::converged(), Isis::SurfacePoint::Latitudinal, 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(), Isis::SurfacePoint::One, outputHeader(), Isis::BundleResults::setCorrMatImgsAndParams(), Isis::BundleResults::sigmaCoord1StatisticsRms(), Isis::BundleResults::sigmaCoord2StatisticsRms(), Isis::BundleResults::sigmaCoord3StatisticsRms(), surfacePointCoordName(), Isis::SurfacePoint::Three, and Isis::SurfacePoint::Two.
void Isis::BundleSolutionInfo::readBundleSolutionInfo | ( | QXmlStreamReader * | xmlReader | ) |
References Isis::Project::projectRoot(), and Isis::BundleResults::readBundleResults().
Referenced by BundleSolutionInfo().
QString Isis::BundleSolutionInfo::runTime | ( | ) | const |
Returns the run time.
Referenced by 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. |
References _FILEINFO_, Isis::Project::bundleSolutionInfoRoot(), Isis::Project::bundleSolutionInfoRoot(), Isis::FileName::expanded(), Isis::Control::fileName(), Isis::IException::Io, 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.
QString Isis::BundleSolutionInfo::savedImagesFilename | ( | ) |
Returns filename of output bundle images csv file.
QString Isis::BundleSolutionInfo::savedPointsFilename | ( | ) |
Returns filename of output bundle points csv file.
QString Isis::BundleSolutionInfo::savedResidualsFilename | ( | ) |
Returns filename of output bundle residuals csv file.
void Isis::BundleSolutionInfo::setName | ( | QString | name | ) |
Sets the name of the bundle.
name | QString of the new name |
References name().
Referenced by Isis::ProjectItemModel::setData().
void Isis::BundleSolutionInfo::setOutputControl | ( | Control * | outputControl | ) |
Returns the name of the output control network.
void Isis::BundleSolutionInfo::setOutputControlName | ( | QString | name | ) |
void Isis::BundleSolutionInfo::setOutputStatistics | ( | BundleResults | statisticsResults | ) |
Sets the stat results.
statisticsResults | The new BundleResults |
void Isis::BundleSolutionInfo::setRunTime | ( | QString | runTime | ) |
Sets the run time, and the name if a name is not already set.
runTime | The run time. |
References runTime().
Referenced by Isis::JigsawRunWidget::bundleFinished().
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) |
References _FILEINFO_, Isis::SurfacePoint::Latitudinal, Isis::SurfacePoint::One, Isis::IException::Programmer, Isis::SurfacePoint::Rectangular, Isis::SurfacePoint::Three, Isis::toString(), and Isis::SurfacePoint::Two.
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 |
References Isis::Project::cnetRoot(), Isis::FileName::expanded(), and Isis::Control::fileName().