USGS

Isis 3.0 Object Programmers' Reference

Home

Isis::ObservationNumberList Class Reference

Needs Documentation. More...

#include <ObservationNumberList.h>

Inheritance diagram for Isis::ObservationNumberList:
Inheritance graph
[legend]
Collaboration diagram for Isis::ObservationNumberList:
Collaboration graph
[legend]

List of all members.

Classes

struct  ObservationSet

Public Member Functions

 ObservationNumberList (const QString &list, bool checkTarget=true)
 Creates an ObservationNumberList from a filename.
 ObservationNumberList (Isis::SerialNumberList *snlist)
 Creates an ObservationNumberList from a SerialNumberList.
 ~ObservationNumberList ()
 Destructor.
void Add (int isn, const int observationIndex, QString observationNumber)
 Adds a new serial number index / observation number index / observation number to the SerialNumberList.
int ObservationSize () const
 How many unique observations are in the list?
int ObservationNumberMapIndex (const int serialNumberIndex)
 Return a observation index given a serial number index.
void Remove (Isis::SerialNumberList *snlist)
 Removes all of the listed serial numbers from the observation.
void Remove (const QString &listfile)
 Removes all of the listed serial numbers from the observation.
bool HasObservationNumber (const QString &on)
 Determines whether or not the requested observation number exists in the list.
QString ObservationNumber (const QString &filename)
 return an observation number given a filename
QString ObservationNumber (int index)
 Return a observation number given an index.
std::vector< QString > PossibleFileNames (const QString &on)
 Return possible filenames given an observation number.
void Add (const QString &filename, bool def2filename=false)
 Adds a new filename / serial number pair to the SerialNumberList.
void Add (const QString &serialNumber, const QString &filename)
 Adds a new filename / and pre-composed serial number pair to the SerialNumberList.
void Add (const char *serialNumber, const char *filename)
bool HasSerialNumber (QString sn)
 Delete a serial number off of the list.
void Delete (const QString &sn)
 Delete a serial number off of the list given the Serial Number.
int Size () const
 How many serial number / filename combos are in the list.
QString FileName (const QString &sn)
 Return a filename given a serial number.
QString FileName (int index)
 Return the filename at the given index.
QString SerialNumber (const QString &filename)
 return a serial number given a filename
QString SerialNumber (int index)
 Return a serial number given an index.
int SerialNumberIndex (const QString &sn)
 return a list index given a serial number
int FileNameIndex (const QString &filename)
 Return a list index given a filename.
std::vector< QString > PossibleSerialNumbers (const QString &on)
 Return possible serial numbers given an observation number.

Protected Attributes

std::vector< Pairp_pairs
std::map< QString, int > p_serialMap
std::map< QString, int > p_fileMap
bool p_checkTarget
QString p_target

Private Member Functions

void init (Isis::SerialNumberList *snlist)
 Initiates the ObservationNumberList.

Private Attributes

std::vector< ObservationSetp_sets
std::multimap< int, int > p_indexMap
int p_numberObservations

Detailed Description

Needs Documentation.

Needs Documentation

Author:
2007-09-17 Debbie A. Cook

For internal use only.

History:
2007-09-17 Debbie A. Cook - Original version
History:
2008-01-11 Christopher Austin - Made class more general, inheriting SerialNumberList among others
History:
2008-05-01 Debbie A. Cook - Removed upper bound check in ObservationNumberMapIndex because when entries are removed from the observation list, the serialNumberIndex may exceed the size of the map
History:
2008-06-18 Steven Koechle - Fixed Documentation Errors
History:
2008-10-30 Steven Lambright - Fixed problem with definition of struct quad, pointed out by "novus0x2a" (Support Board Member)

Definition at line 54 of file ObservationNumberList.h.


Constructor & Destructor Documentation

Isis::ObservationNumberList::ObservationNumberList ( const QString &  listfile,
bool  checkTarget = true 
)

Creates an ObservationNumberList from a filename.

Parameters:
listfile The list of files to be given observation numbers
checkTarget Boolean value that specifies whether or not to check to make sure the target names match between files added to the observationnumber list

Definition at line 18 of file ObservationNumberList.cpp.

References init().

Isis::ObservationNumberList::ObservationNumberList ( Isis::SerialNumberList snlist  ) 

Creates an ObservationNumberList from a SerialNumberList.

Parameters:
snlist The serial number list from which to generate an observation number list

Definition at line 28 of file ObservationNumberList.cpp.

References init().

Isis::ObservationNumberList::~ObservationNumberList (  ) 

Destructor.

Definition at line 71 of file ObservationNumberList.cpp.


Member Function Documentation

void Isis::SerialNumberList::Add ( const QString &  serialNumber,
const QString &  filename 
) [inherited]

Adds a new filename / and pre-composed serial number pair to the SerialNumberList.

Parameters:
serialNumber the serial number to be added
filename the filename to be added
Author:
2012-07-12 Tracie Sucharski

For internal use only.

Definition at line 193 of file SerialNumberList.cpp.

References _FILEINFO_, Isis::SerialNumberList::FileName(), Isis::PvlObject::FindGroup(), Isis::PvlObject::FindObject(), Isis::PvlObject::HasGroup(), Isis::SerialNumberList::HasSerialNumber(), Isis::SerialNumberList::SerialNumberIndex(), and Isis::IException::User.

void Isis::SerialNumberList::Add ( const QString &  filename,
bool  def2filename = false 
) [inherited]

Adds a new filename / serial number pair to the SerialNumberList.

Parameters:
filename the filename to be added
def2filename If a serial number could not be found, try to return the filename

For internal use only.

History:
2007-06-04 Tracie Sucharski - Expand filename to include full path before adding to list.
History:
2010-11-24 Tracie Sucharski - Added bool def2filename parameter. This will allow level 2 images to be added to a serial number list.
History:
2010-11-29 Tracie Sucharski - Only read the Instrument group if p_checkTarget is True. If def2filename is True, check for Mapping group if Target does not exist.

Definition at line 104 of file SerialNumberList.cpp.

References _FILEINFO_, Isis::ObservationNumber::Compose(), Isis::SerialNumber::Compose(), Isis::SerialNumberList::FileName(), Isis::PvlObject::FindGroup(), Isis::PvlObject::FindObject(), Isis::PvlObject::HasGroup(), Isis::SerialNumberList::HasSerialNumber(), Isis::SerialNumberList::SerialNumberIndex(), and Isis::IException::User.

Referenced by Isis::ControlNetGraphicsItem::buildChildren(), Isis::MatchTool::serialNumberList(), Isis::SerialNumberList::SerialNumberList(), and Isis::StereoTool::setFiles().

void Isis::ObservationNumberList::Add ( int  isn,
const int  observationIndex,
QString  observationNumber 
)

Adds a new serial number index / observation number index / observation number to the SerialNumberList.

Parameters:
isn The serial number index of the observation set to be added
observationIndex The observation number index of the observation set to be added
observationNumber The observation number of the observation set to be added

Definition at line 135 of file ObservationNumberList.cpp.

Referenced by init(), and Remove().

void Isis::SerialNumberList::Delete ( const QString &  sn  )  [inherited]
QString Isis::SerialNumberList::FileName ( int  index  )  [inherited]

Return the filename at the given index.

Parameters:
index The index of the desired filename
Returns:
QString The filename at the given index

Definition at line 410 of file SerialNumberList.cpp.

References _FILEINFO_, Isis::IException::Programmer, and Isis::toString().

QString Isis::SerialNumberList::FileName ( const QString &  sn  )  [inherited]

Return a filename given a serial number.

Parameters:
sn The serial number of the desired filename
Returns:
QString The filename matching the input serial number

Definition at line 290 of file SerialNumberList.cpp.

References _FILEINFO_, Isis::SerialNumberList::HasSerialNumber(), and Isis::IException::Programmer.

Referenced by Isis::SerialNumberList::Add(), Isis::SerialNumber::ComposeObservation(), Isis::ControlNetFilter::CubeConvexHullFilter(), Isis::ControlNetFilter::CubeDistanceFilter(), Isis::ControlNetFilter::CubeNameExpressionFilter(), Isis::ControlNetFilter::CubeNumPointsFilter(), Isis::SerialNumberList::Delete(), Isis::MatchTool::deletePoint(), Isis::BundleAdjust::FileName(), Isis::SerialNumberList::FileNameIndex(), Isis::InterestOperator::FindCnetRef(), Isis::ImageOverlapSet::FindImageOverlaps(), Isis::ControlNetStatistics::GenerateImageStats(), Isis::ImageOverlapSet::HandleError(), Isis::InterestOperator::InterestByMeasure(), Isis::InterestOperator::InterestByPoint(), Isis::MatchTool::loadMeasureTable(), Isis::MatchTool::loadPoint(), ObservationNumber(), Isis::BundleAdjust::OutputImagesCSV(), Isis::BundleAdjust::OutputNoErrorPropagation(), Isis::BundleAdjust::OutputResiduals(), Isis::BundleAdjust::OutputWithErrorPropagation(), Isis::ControlNetFilter::PointCubeNamesFilter(), Isis::ControlNetFilter::PointDistanceFilter(), Isis::ControlNetFilter::PointLatLonFilter(), Isis::ControlNetFilter::PointMeasurePropertiesFilter(), Isis::ControlNetFilter::PrintCubeFileSerialNum(), Isis::ControlNetStatistics::PrintImageStats(), Isis::InterestOperator::ProcessLocked_Point_Reference(), Isis::MatchTool::selectLeftMeasure(), Isis::MatchTool::selectRightMeasure(), Isis::SerialNumberList::SerialNumber(), Isis::MatchTool::serialNumberList(), Isis::ControlNet::SetImages(), Isis::BundleAdjust::SetObservationMode(), and Isis::BundleAdjust::validateNetwork().

int Isis::SerialNumberList::FileNameIndex ( const QString &  filename  )  [inherited]

Return a list index given a filename.

Parameters:
filename The filename to be searched for
Returns:
int The index of the input filename

For internal use only.

History:
2007-06-04 Tracie Sucharski - Expand filename to include full path before searching list.
History:
2007-07-11 Stuart Sides - Fixed bug where the correct index was not returned.

Definition at line 391 of file SerialNumberList.cpp.

References _FILEINFO_, Isis::SerialNumberList::FileName(), pos, and Isis::IException::Programmer.

Referenced by ObservationNumber(), and Isis::SerialNumberList::SerialNumber().

bool Isis::ObservationNumberList::HasObservationNumber ( const QString &  on  ) 

Determines whether or not the requested observation number exists in the list.

Parameters:
on The observation number to be checked for
Returns:
bool

Definition at line 165 of file ObservationNumberList.cpp.

bool Isis::SerialNumberList::HasSerialNumber ( QString  sn  )  [inherited]
void Isis::ObservationNumberList::init ( Isis::SerialNumberList snlist  )  [private]

Initiates the ObservationNumberList.

Parameters:
snlist The already created SerialNumberList used to create the ObservationNumberList object

Definition at line 39 of file ObservationNumberList.cpp.

References _FILEINFO_, Add(), Isis::SerialNumberList::ObservationNumber(), Isis::SerialNumberList::Size(), and Isis::IException::User.

Referenced by ObservationNumberList().

QString Isis::ObservationNumberList::ObservationNumber ( int  index  ) 

Return a observation number given an index.

Parameters:
index The index of the desired observation number
Returns:
QString The observation number returned

Reimplemented from Isis::SerialNumberList.

Definition at line 219 of file ObservationNumberList.cpp.

References _FILEINFO_, Isis::IException::Programmer, and Isis::toString().

QString Isis::ObservationNumberList::ObservationNumber ( const QString &  filename  ) 

return an observation number given a filename

Parameters:
filename The filename to be matched
Returns:
QString The observation number corresponding to the input filename

Definition at line 201 of file ObservationNumberList.cpp.

References _FILEINFO_, Isis::SerialNumberList::FileName(), Isis::SerialNumberList::FileNameIndex(), and Isis::IException::Programmer.

Referenced by Remove().

int Isis::ObservationNumberList::ObservationNumberMapIndex ( const int  serialNumberIndex  ) 

Return a observation index given a serial number index.

Parameters:
serialNumberIndex The index of the serial number to map
Returns:
int The observation index mapped to the serial number

Definition at line 181 of file ObservationNumberList.cpp.

References _FILEINFO_, Isis::IException::Programmer, and Isis::toString().

Referenced by Isis::BundleAdjust::ImageIndex(), Isis::BundleAdjust::Solve(), and Isis::BundleAdjust::SolveCholesky().

int Isis::ObservationNumberList::ObservationSize (  )  const

How many unique observations are in the list?

Returns:
int Returns number of unique observations currently in the list

Definition at line 152 of file ObservationNumberList.cpp.

Referenced by Isis::BundleAdjust::Observations(), Isis::BundleAdjust::Solve(), and Isis::BundleAdjust::SolveCholesky().

std::vector< QString > Isis::ObservationNumberList::PossibleFileNames ( const QString &  on  ) 

Return possible filenames given an observation number.

Parameters:
on The observation number of the desired filename
Returns:
vector<QString> The list of possible filenames matching the input observation number

Definition at line 237 of file ObservationNumberList.cpp.

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

std::vector< QString > Isis::SerialNumberList::PossibleSerialNumbers ( const QString &  on  )  [inherited]

Return possible serial numbers given an observation number.

Parameters:
on The observation number of the possible serial number
Returns:
vector<QString> The list of possible serial numbers matching the input observation number

Definition at line 431 of file SerialNumberList.cpp.

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

void Isis::ObservationNumberList::Remove ( const QString &  listfile  ) 

Removes all of the listed serial numbers from the observation.

Parameters:
listfile The list of SerialNumbers to remove

Definition at line 118 of file ObservationNumberList.cpp.

References Remove().

void Isis::ObservationNumberList::Remove ( Isis::SerialNumberList snlist  ) 

Removes all of the listed serial numbers from the observation.

Parameters:
snlist The list of SerialNumbers to remove

Definition at line 79 of file ObservationNumberList.cpp.

References _FILEINFO_, Add(), Isis::SerialNumberList::HasSerialNumber(), ObservationNumber(), Isis::SerialNumberList::Size(), and Isis::IException::User.

Referenced by Remove().

QString Isis::SerialNumberList::SerialNumber ( int  index  )  [inherited]

Return a serial number given an index.

Parameters:
index The index of the desired serial number
Returns:
QString The serial number returned

Definition at line 332 of file SerialNumberList.cpp.

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

QString Isis::SerialNumberList::SerialNumber ( const QString &  filename  )  [inherited]
int Isis::SerialNumberList::SerialNumberIndex ( const QString &  sn  )  [inherited]
int Isis::SerialNumberList::Size (  )  const [inherited]

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