Isis Developer Reference
Isis::BundleSolutionInfo Class Reference

Container class for BundleAdjustment results. More...

#include <BundleSolutionInfo.h>

Inheritance diagram for Isis::BundleSolutionInfo:
Inheritance graph
Collaboration diagram for Isis::BundleSolutionInfo:
Collaboration graph

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, XmlStackedHandlerReader *xmlReader, QObject *parent=0)
 Constructor.
 
 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.
 
Controlcontrol () 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.
 

Detailed Description

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

Author
2014-07-08 Jeannie Backer

Constructor & Destructor Documentation

◆ BundleSolutionInfo() [1/4]

Isis::BundleSolutionInfo::BundleSolutionInfo ( BundleSettingsQsp inputSettings,
FileName controlNetworkFileName,
BundleResults outputStatistics,
QList< ImageList * > imgList,
QObject * parent = 0 )

Constructor.

Creates a BundleSolutionInfo.

Parameters
inputSettingsThe settings saved in BundleSolutionInfo
controlNetworkFileNameThe file name and path of the control network
outputStatisticsThe results of the BundleAdjust
parentThe Qt-relationship parent

◆ BundleSolutionInfo() [2/4]

Isis::BundleSolutionInfo::BundleSolutionInfo ( BundleSettingsQsp inputSettings,
FileName controlNetworkFileName,
FileName lidarDataFileName,
BundleResults outputStatistics,
QList< ImageList * > imgList,
QObject * parent = 0 )

Constructor.

Creates a BundleSolutionInfo.

Parameters
inputSettingsThe settings saved in BundleSolutionInfo
controlNetworkFileNameThe file name and path of the control network
outputStatisticsThe results of the BundleAdjust
parentThe Qt-relationship parent

◆ BundleSolutionInfo() [3/4]

Isis::BundleSolutionInfo::BundleSolutionInfo ( Project * project,
XmlStackedHandlerReader * xmlReader,
QObject * parent = 0 )

Constructor.

Creates a BundleSolutionInfo from disk.

Parameters
projectThe current project
xmlReaderAn XML reader that's up to an <bundleSettings> tag.
parentThe Qt-relationship parent

◆ BundleSolutionInfo() [4/4]

Isis::BundleSolutionInfo::BundleSolutionInfo ( )
default

◆ ~BundleSolutionInfo()

Isis::BundleSolutionInfo::~BundleSolutionInfo ( )

Destructor.

Member Function Documentation

◆ addAdjustedImages()

void Isis::BundleSolutionInfo::addAdjustedImages ( ImageList * images)

Adds a list of images that were adjusted (their labels were updated).

Parameters
ImageList*images The list of images to add that had their labels updated.

◆ adjustedImages()

QList< ImageList * > Isis::BundleSolutionInfo::adjustedImages ( ) const

Returns the list of images that were adjusted after a bundle.

This can potentially be an empty QList if no image labels were updated.

Returns
QList<ImageList*> Returns the adjusted images (images with updated labels).

Referenced by Isis::ProjectItem::ProjectItem().

◆ bundleResults()

BundleResults Isis::BundleSolutionInfo::bundleResults ( )

Returns the bundle results.

Exceptions
IException::Unknown"Results for this bundle is NULL."
Returns
BundleResults The bundle results.

References _FILEINFO_, and Isis::IException::Unknown.

Referenced by Isis::JigsawRunWidget::notifyThreadFinished(), and Isis::ProjectItem::ProjectItem().

◆ bundleSettings()

BundleSettingsQsp Isis::BundleSolutionInfo::bundleSettings ( )

Returns bundle settings.

Returns
BundleSettingsQsp Bundle settings.

Referenced by Isis::ProjectItem::ProjectItem().

◆ control()

Control * Isis::BundleSolutionInfo::control ( ) const

Returns bundle output Control object.

Returns
Control* Pointer to bundle output Control object.

Referenced by Isis::ProjectItem::ProjectItem().

◆ id()

QString Isis::BundleSolutionInfo::id ( ) const

Get a unique, identifying string associated with this BundleSolutionInfo object.

Returns
QString A unique ID for this BundleSolutionInfo object

◆ imageList()

QList< ImageList * > Isis::BundleSolutionInfo::imageList ( )

Returns the images used in the bundle.

Returns
m_imageList The image list used in the bundle

◆ inputControlNetFileName()

QString Isis::BundleSolutionInfo::inputControlNetFileName ( ) const

Returns the name of the input control network.

Returns
QString The name of the input control network.

References Isis::FileName::expanded().

◆ inputLidarDataFileName()

QString Isis::BundleSolutionInfo::inputLidarDataFileName ( ) const

Returns name of input lidar data file (if any).

Returns
QString Name of input lidar data file.

References Isis::FileName::expanded().

◆ name()

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()

Returns
QString Name of the bundle

Referenced by save(), Isis::ProjectItem::setBundleSolutionInfo(), setName(), and setOutputControlName().

◆ outputControlName()

QString Isis::BundleSolutionInfo::outputControlName ( ) const

Returns m_outputControlName.

Returns
QString of the value

Referenced by outputHeader().

◆ outputControlNetFileName()

QString Isis::BundleSolutionInfo::outputControlNetFileName ( ) const

Returns the name of the output control network.

Returns
QString The name of the output control network.

References Isis::Control::fileName().

◆ outputHeader()

bool Isis::BundleSolutionInfo::outputHeader ( std::ofstream & fpOut)

Output header for bundle results file.

Parameters
fpOutThe output stream that the header will be sent to.
Returns
bool If the header was successfully output to the output stream.
Exceptions
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().

◆ outputImagesCSV()

bool Isis::BundleSolutionInfo::outputImagesCSV ( )

Outputs the bundleout_images.csv file which contains Jigsaw data about the images within each observation.

Returns
True upon success, False if something went wrong.

References Isis::BundleResults::converged(), Isis::BundleResults::observations(), outputImagesCSVHeader(), Isis::BundleResults::rmsImageLineResiduals(), Isis::BundleResults::rmsImageResiduals(), Isis::BundleResults::rmsImageSampleResiduals(), and Isis::toString().

◆ outputImagesCSVHeader()

bool Isis::BundleSolutionInfo::outputImagesCSVHeader ( std::ofstream & fpOut,
BundleObservationQsp observation )

Outputs the header for the bundleout_images.csv file.

Parameters
fpOutThe output file stream.
observationAn observation for the instrument that this header is for.
Returns
True if the write is successful, False otherwise.

Referenced by outputImagesCSV().

◆ outputLidarCSV()

bool Isis::BundleSolutionInfo::outputLidarCSV ( )

Outputs lidar data to a csv file.

Returns
bool If the point data was successfully output.

References Isis::BundleResults::bundleLidarControlPoints().

◆ outputPointsCSV()

bool Isis::BundleSolutionInfo::outputPointsCSV ( )

Outputs point data to a csv file.

Returns
bool If the point data was successfully output.

References Isis::BundleResults::bundleControlPoints(), Isis::ControlPoint::Constrained, Isis::ControlPoint::Fixed, and Isis::ControlPoint::Free.

◆ outputResiduals()

bool Isis::BundleSolutionInfo::outputResiduals ( )

Outputs image coordinate residuals to a csv file.

Returns
bool If the residuals were successfully output.

References Isis::BundleResults::bundleControlPoints(), and Isis::BundleResults::bundleLidarControlPoints().

◆ outputText()

◆ runTime()

QString Isis::BundleSolutionInfo::runTime ( ) const

Returns the run time.

Returns
QString The run time.

Referenced by save(), Isis::ProjectItem::setBundleSolutionInfo(), and setRunTime().

◆ save()

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)

Parameters
streamThe stream to which the BundleSolutionInfo will be saved
projectThe project to which this BundleSolutionInfo will be saved
newProjectRootThe 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().

◆ savedBundleOutputFilename()

QString Isis::BundleSolutionInfo::savedBundleOutputFilename ( )

Returns bundleout text filename.

Returns
QString Bundleout text filename.

◆ savedImagesFilename()

QString Isis::BundleSolutionInfo::savedImagesFilename ( )

Returns filename of output bundle images csv file.

Returns
QString filename of output bundle images csv file.

◆ savedPointsFilename()

QString Isis::BundleSolutionInfo::savedPointsFilename ( )

Returns filename of output bundle points csv file.

Returns
QString filename of output bundle points csv file.

◆ savedResidualsFilename()

QString Isis::BundleSolutionInfo::savedResidualsFilename ( )

Returns filename of output bundle residuals csv file.

Returns
QString filename of output bundle residuals csv file.

◆ setName()

void Isis::BundleSolutionInfo::setName ( QString name)

Sets the name of the bundle.

Parameters
nameQString of the new name

References name().

Referenced by Isis::ProjectItemModel::setData().

◆ setOutputControl()

void Isis::BundleSolutionInfo::setOutputControl ( Control * outputControl)

Returns the name of the output control network.

Returns
QString The name of the output control network.

◆ setOutputControlName()

void Isis::BundleSolutionInfo::setOutputControlName ( QString name)

Sets m_outputControlName.

Parameters
nameQString of the new value

References name().

◆ setOutputStatistics()

void Isis::BundleSolutionInfo::setOutputStatistics ( BundleResults statisticsResults)

Sets the stat results.

Parameters
statisticsResultsThe new BundleResults

◆ setRunTime()

void Isis::BundleSolutionInfo::setRunTime ( QString runTime)

Sets the run time, and the name if a name is not already set.

Parameters
runTimeThe run time.

References runTime().

Referenced by Isis::JigsawRunWidget::bundleFinished().

◆ surfacePointCoordName()

QString Isis::BundleSolutionInfo::surfacePointCoordName ( SurfacePoint::CoordinateType type,
SurfacePoint::CoordIndex coordIdx ) const

Determine the control point coordinate name.

Parameters
typeThe control point coordinate type (see SurfacePoint.h)
coordIdxThe coordinate index (see SurfacePoint.h)
Returns
QString Coordinate name

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().

◆ updateFileName

void Isis::BundleSolutionInfo::updateFileName ( Project * project)
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.

Parameters
projectThe project that this BundleSolutionInfo is stored in

References Isis::Project::cnetRoot(), Isis::FileName::expanded(), and Isis::Control::fileName().


The documentation for this class was generated from the following files: