Isis 3 Programmer Reference
Isis::BundleObservationVector Class Reference

This class is a container class for BundleObservations. More...

#include <BundleObservationVector.h>

Inheritance diagram for Isis::BundleObservationVector:
Inheritance graph
Collaboration diagram for Isis::BundleObservationVector:
Collaboration graph

Public Member Functions

 BundleObservationVector ()
 Constructs an empty BundleObservationVector.
 
 BundleObservationVector (const BundleObservationVector &src)
 Copy constructor.
 
 ~BundleObservationVector ()
 Destructor.
 
BundleObservationVectoroperator= (const BundleObservationVector &src)
 Assignment operator.
 
BundleObservationQsp addNew (BundleImageQsp image, QString observationNumber, QString instrumentId, BundleSettingsQsp bundleSettings)
 Adds a new BundleObservation to this vector or fetches an existing BundleObservation if this vector already contains the passed observation number.
 
int numberParameters ()
 Returns the sum of the position parameters and pointing parameters for the contained BundleObservations.
 
BundleObservationQsp observationByCubeSerialNumber (QString cubeSerialNumber)
 Accesses a BundleObservation associated with the passed serial number.
 
double vtpvContribution ()
 Compute vtpv, the weighted sum of squares of constrained image parameter residuals.
 
QList< QString > instrumentIds () const
 Get a list of all instrument IDs that there are observations for.
 
QList< BundleObservationQspobservationsByInstId (QString instrumentId) const
 Get all of the observations with a specific instrument ID.
 

Private Attributes

QMap< QString, BundleObservationQspm_observationNumberToObservationMap
 Map between observation number and pointer to observation.
 
QMap< QString, BundleObservationQspm_imageSerialToObservationMap
 Map between image serial number and pointer to observation.
 
QMultiMap< QString, BundleObservationQspm_instIdToObservationMap
 Map between instrument ID and pointer to observation.
 

Detailed Description

This class is a container class for BundleObservations.

It can be used for managing multiple BundleObservations.

Contained BundleObservations are stored as shared pointers, so they will be automatically deleted when all shared pointers are deleted.

Author
2014-05-22 Ken Edmundson
History

2014-05-22 Ken Edmundson - Original version.

2015-02-20 Jeannie Backer - Brought closer to ISIS coding standards.

2016-06-30 Jeannie Backer - Changed method name from "getObservationByCubeSerialNumber" to "observationByCubeSerialNumber" to comply with ISIS coding standards. References #4078.

2016-08-03 Jesse Mapel - Changed contained member type to a vector of QSharedPointers. Removed commented out block of paths. Fixes #4150, #4155.

2016-08-03 Ian Humphrey - Updated documentation and coding standards. Replaced getObservationByCubeSerialNumber with observationByCubeSerialNumber.

2016-08-11 Jesse Mapel - Defined assignment operator and copy constructor. Fixes #4159.

2016-10-13 Ian Humphrey - Modified addnew so that we set solve settings based on the BundleObsevation's observation number. Renamed addnew to addNew(). References #4293.

2018-02-12 Ken Edmundson Renamed initializeBodyRotation method to setBodyRotation.

2018-11-29 Ken Edmundson Modified addNew method. Removed setBodyRotation method.

Definition at line 57 of file BundleObservationVector.h.

Constructor & Destructor Documentation

◆ BundleObservationVector() [1/2]

Isis::BundleObservationVector::BundleObservationVector ( )

Constructs an empty BundleObservationVector.

Definition at line 26 of file BundleObservationVector.cpp.

◆ BundleObservationVector() [2/2]

Isis::BundleObservationVector::BundleObservationVector ( const BundleObservationVector & src)

Copy constructor.

Constructs a BundleObservationVector as a copy of another BundleObservationVector.

Parameters
srcA reference to the BundleObservationVector to copy from.

Definition at line 37 of file BundleObservationVector.cpp.

References m_imageSerialToObservationMap, m_instIdToObservationMap, and m_observationNumberToObservationMap.

◆ ~BundleObservationVector()

Isis::BundleObservationVector::~BundleObservationVector ( )

Destructor.

Contained BundleObservations will remain until all shared pointers to them are deleted.

Definition at line 50 of file BundleObservationVector.cpp.

Member Function Documentation

◆ addNew()

BundleObservationQsp Isis::BundleObservationVector::addNew ( BundleImageQsp bundleImage,
QString observationNumber,
QString instrumentId,
BundleSettingsQsp bundleSettings )

Adds a new BundleObservation to this vector or fetches an existing BundleObservation if this vector already contains the passed observation number.

If observation mode is off, adds a new BundleObservation to this vector. Otherwise, if observation mode is on and the BundleObservation has already been added with the same observation number, the passed BundleImage is added to the existing BundleObservation.

Parameters
bundleImageQSharedPointer to the BundleImage to create or fetch a BundleObservation from
observationNumberObservation number of the observation to add or fetch
instrumentIdInstrument id of the observation
bundleSettingsQsp to BundleSettings for the observation
Exceptions
IException::Programmer"Unable to allocate new BundleObservation"
Returns
BundleObservationQsp Returns a pointer to the BundleObservation that was added
History
2016-10-13 Ian Humphrey - When appending a new BundleObservation and there are multiple BundleObservationSolveSettings, we set the settings according to the observation number passed. References #4293.

Definition at line 98 of file BundleObservationVector.cpp.

References Isis::Camera::Csm, m_imageSerialToObservationMap, m_instIdToObservationMap, m_observationNumberToObservationMap, and Isis::IException::Programmer.

Referenced by Isis::BundleAdjust::init().

◆ instrumentIds()

QList< QString > Isis::BundleObservationVector::instrumentIds ( ) const

Get a list of all instrument IDs that there are observations for.

Definition at line 241 of file BundleObservationVector.cpp.

References m_instIdToObservationMap.

◆ numberParameters()

int Isis::BundleObservationVector::numberParameters ( )

Returns the sum of the position parameters and pointing parameters for the contained BundleObservations.

Returns
int Returns the total number of parameters for the contained BundleObservations

Definition at line 207 of file BundleObservationVector.cpp.

Referenced by Isis::BundleAdjust::applyParameterCorrections(), Isis::BundleAdjust::init(), and Isis::BundleAdjust::initializeNormalEquationsMatrix().

◆ observationByCubeSerialNumber()

BundleObservationQsp Isis::BundleObservationVector::observationByCubeSerialNumber ( QString cubeSerialNumber)

Accesses a BundleObservation associated with the passed serial number.

If there is no BundleObservation associated with the serial number, a NULL pointer is returned.

Parameters
cubeSerialNumberSerial number of a cube to try to find an associated BundleObservation
Returns
BundleObservationQsp Pointer to the associated BundleObservation (NULL if not found)

Definition at line 227 of file BundleObservationVector.cpp.

References m_imageSerialToObservationMap.

Referenced by Isis::BundleAdjust::init().

◆ observationsByInstId()

QList< BundleObservationQsp > Isis::BundleObservationVector::observationsByInstId ( QString instrumentId) const

Get all of the observations with a specific instrument ID.

Definition at line 249 of file BundleObservationVector.cpp.

References m_instIdToObservationMap.

◆ operator=()

BundleObservationVector & Isis::BundleObservationVector::operator= ( const BundleObservationVector & src)

Assignment operator.

Assigns the state of the source BundleObservationVector to this BundleObservationVector.

Parameters
srcThe BundleObservationVector to assign from.
Returns
BundleObservationVector& A reference to this BundleObservationVector.

Definition at line 64 of file BundleObservationVector.cpp.

References m_imageSerialToObservationMap, m_instIdToObservationMap, and m_observationNumberToObservationMap.

◆ vtpvContribution()

double Isis::BundleObservationVector::vtpvContribution ( )

Compute vtpv, the weighted sum of squares of constrained image parameter residuals.

Returns
double Weighted sum of squares of constrained image parameter residuals.

Definition at line 263 of file BundleObservationVector.cpp.

Member Data Documentation

◆ m_imageSerialToObservationMap

QMap<QString, BundleObservationQsp> Isis::BundleObservationVector::m_imageSerialToObservationMap
private

Map between image serial number and pointer to observation.

Definition at line 83 of file BundleObservationVector.h.

Referenced by addNew(), BundleObservationVector(), observationByCubeSerialNumber(), and operator=().

◆ m_instIdToObservationMap

QMultiMap<QString, BundleObservationQsp> Isis::BundleObservationVector::m_instIdToObservationMap
private

Map between instrument ID and pointer to observation.

Definition at line 85 of file BundleObservationVector.h.

Referenced by addNew(), BundleObservationVector(), instrumentIds(), observationsByInstId(), and operator=().

◆ m_observationNumberToObservationMap

QMap<QString, BundleObservationQsp> Isis::BundleObservationVector::m_observationNumberToObservationMap
private

Map between observation number and pointer to observation.

Definition at line 81 of file BundleObservationVector.h.

Referenced by addNew(), BundleObservationVector(), and operator=().


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