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
Collaboration diagram for Isis::ObservationNumberList:
Collaboration graph

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
History:

2007-09-17 Debbie A. Cook - Original version

2008-01-11 Christopher Austin - Made class more general, inheriting SerialNumberList among others

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

2008-06-18 Steven Koechle - Fixed Documentation Errors

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
listfileThe list of files to be given observation numbers
checkTargetBoolean 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
snlistThe 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::ObservationNumberList::Add ( int  isn,
const int  observationIndex,
QString  observationNumber 
)

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

Parameters
isnThe serial number index of the observation set to be added
observationIndexThe observation number index of the observation set to be added
observationNumberThe 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::Add ( const QString &  filename,
bool  def2filename = false 
)
inherited

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

Parameters
filenamethe filename to be added
def2filenameIf a serial number could not be found, try to return the filename
History:

2007-06-04 Tracie Sucharski - Expand filename to include full path before adding to list.

2010-11-24 Tracie Sucharski - Added bool def2filename parameter. This will allow level 2 images to be added to a serial number list.

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::QnetTool::openGround(), Isis::SerialNumberList::SerialNumberList(), Isis::MatchTool::serialNumberList(), and Isis::StereoTool::setFiles().

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
serialNumberthe serial number to be added
filenamethe filename to be added
Author
2012-07-12 Tracie Sucharski

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::Delete ( const QString &  sn)
inherited
QString Isis::SerialNumberList::FileName ( const QString &  sn)
inherited

Return a filename given a serial number.

Parameters
snThe 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::QnetTool::addMeasure(), Isis::SerialNumber::ComposeObservation(), Isis::QnetPointCubeNameFilter::createCubeList(), Isis::QnetTool::createFixedPoint(), Isis::QnetTool::createPoint(), Isis::ControlNetFilter::CubeConvexHullFilter(), Isis::ControlNetFilter::CubeDistanceFilter(), Isis::ControlNetFilter::CubeNameExpressionFilter(), Isis::ControlNetFilter::CubeNumPointsFilter(), Isis::SerialNumberList::Delete(), Isis::MatchTool::deletePoint(), Isis::QnetTool::deletePoint(), Isis::QnetCubeNameFilter::filter(), Isis::InterestOperator::FindCnetRef(), Isis::ImageOverlapSet::FindImageOverlaps(), Isis::ImageOverlapSet::HandleError(), Isis::InterestOperator::InterestByMeasure(), Isis::InterestOperator::InterestByPoint(), Isis::QnetTool::loadGroundMeasure(), Isis::QnetFileTool::loadImage(), Isis::MatchTool::loadMeasureTable(), Isis::QnetTool::loadMeasureTable(), Isis::MatchTool::loadPoint(), Isis::QnetTool::loadPoint(), Isis::ControlNetFilter::PointCubeNamesFilter(), Isis::ControlNetFilter::PointDistanceFilter(), Isis::ControlNetFilter::PointLatLonFilter(), Isis::ControlNetFilter::PointMeasurePropertiesFilter(), Isis::ControlNetFilter::PrintCubeFileSerialNum(), Isis::InterestOperator::ProcessLocked_Point_Reference(), Isis::MatchTool::selectLeftMeasure(), Isis::MatchTool::selectRightMeasure(), Isis::MatchTool::serialNumberList(), Isis::QnetNewPointDialog::setFiles(), Isis::QnetNewMeasureDialog::setFiles(), Isis::QnetFixedPointDialog::setFiles(), and Isis::ControlNet::SetImages().

QString Isis::SerialNumberList::FileName ( int  index)
inherited

Return the filename at the given index.

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

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

Return a list index given a filename.

Parameters
filenameThe filename to be searched for
Returns
int The index of the input filename
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_, and Isis::IException::Programmer.

Referenced by Isis::QnetTool::addMeasure(), Isis::QnetTool::createFixedPoint(), Isis::QnetTool::createPoint(), 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
onThe observation number to be checked for
Returns
bool

Definition at line 165 of file ObservationNumberList.cpp.

bool Isis::SerialNumberList::HasSerialNumber ( QString  sn)
inherited

Delete a serial number off of the list.

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

Parameters
snThe serial number to be checked for
Returns
bool

Definition at line 266 of file SerialNumberList.cpp.

Referenced by Isis::SerialNumberList::Add(), Isis::MatchTool::deletePoint(), Isis::QnetTool::drawAllMeasurments(), Isis::SerialNumberList::FileName(), Isis::QnetTool::openGround(), Remove(), Isis::SerialNumberList::SerialNumberIndex(), Isis::MatchTool::serialNumberList(), Isis::StereoTool::setFiles(), and Isis::ControlNet::SetImages().

void Isis::ObservationNumberList::init ( Isis::SerialNumberList snlist)
private

Initiates the ObservationNumberList.

Parameters
snlistThe 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 ( const QString &  filename)

return an observation number given a filename

Parameters
filenameThe 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::FileNameIndex(), and Isis::IException::Programmer.

Referenced by Remove().

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

Return a observation number given an index.

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

Definition at line 219 of file ObservationNumberList.cpp.

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

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

Return a observation index given a serial number index.

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

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.

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

Return possible filenames given an observation number.

Parameters
onThe 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
onThe 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 ( Isis::SerialNumberList snlist)

Removes all of the listed serial numbers from the observation.

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

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

Removes all of the listed serial numbers from the observation.

Parameters
listfileThe list of SerialNumbers to remove

Definition at line 118 of file ObservationNumberList.cpp.

References Remove().

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

Return a serial number given an index.

Parameters
indexThe 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.

int Isis::SerialNumberList::SerialNumberIndex ( const QString &  sn)
inherited

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