Isis Developer Reference
|
Create a list of observation numbers from a file or serial number list. More...
#include <ObservationNumberList.h>
Public Member Functions | |
ObservationNumberList (const QString &list, bool checkTarget=true) | |
Creates an ObservationNumberList from a filename. | |
ObservationNumberList (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 (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) |
Overloaded add method that takes char * parameters. | |
bool | hasSerialNumber (QString sn) |
Determines whether or not the requested serial number exists in the list. | |
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. | |
QString | spacecraftInstrumentId (int index) |
Return the spacecraftname/instrumentid at the given index. | |
QString | spacecraftInstrumentId (const QString &sn) |
Return the spacecraftname/instrumentid given a serial number. | |
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< Pair > | m_pairs |
List of serial number Pair entities. | |
std::map< QString, int > | m_serialMap |
Maps serial numbers to their positions in the list. | |
std::map< QString, int > | m_fileMap |
Maps filenames to their positions in the list. | |
bool | m_checkTarget |
Specifies whether or not to check to make sure the target names match between files added to the serialnumber list. | |
QString | m_target |
Target name that the files must have if m_checkTarget is true | |
Create a list of observation numbers from a file or serial number list.
This class allows for creating observation numbers from a provided file or and existing non-empty SerialNumberList. Internally, it will map the observation numbers that are created to the corresponding serial number for a given observation.
Isis::ObservationNumberList::ObservationNumberList | ( | const QString & | listfile, |
bool | checkTarget = true ) |
Creates an ObservationNumberList from a filename.
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 |
Isis::ObservationNumberList::ObservationNumberList | ( | SerialNumberList * | snlist | ) |
Creates an ObservationNumberList from a SerialNumberList.
snlist | The serial number list from which to generate an observation number list |
Isis::ObservationNumberList::~ObservationNumberList | ( | ) |
Destructor.
|
inherited |
Overloaded add method that takes char * parameters.
Adds a new filename / serial number pair to the SerialNumberList
serialNumber | The serial number to be added |
filename | The filename to be added |
References Isis::SerialNumberList::add(), and Isis::SerialNumberList::serialNumber().
|
inherited |
Adds a new filename / serial number pair to the SerialNumberList.
filename | The filename to be added |
def2filename | If a serial number could not be found, try to return the filename |
IException::User | "Unable to find Instrument or Mapping group for comparing target." |
IException::User | "Unable to find Instrument group for comparing target." |
IException::User | "Target name from file does not match." |
IException::User | "Invalid serial number [Unknown] from file." |
IException::User | "Duplicate serial number from files [file1] and [file2]." |
IException::User | "FileName cannot be added to serial number list." |
References _FILEINFO_, Isis::ObservationNumber::Compose(), Isis::SerialNumber::Compose(), Isis::FileName::expanded(), Isis::SerialNumberList::fileName(), Isis::SerialNumberList::Pair::filename, Isis::PvlObject::findObject(), Isis::SerialNumberList::hasSerialNumber(), Isis::SerialNumberList::m_checkTarget, Isis::SerialNumberList::m_fileMap, Isis::SerialNumberList::m_pairs, Isis::SerialNumberList::m_serialMap, Isis::SerialNumberList::m_target, Isis::SerialNumberList::serialNumberIndex(), and Isis::IException::User.
Referenced by Isis::SerialNumberList::add(), Isis::ControlNetGraphicsItem::buildChildren(), Isis::BundleAdjust::BundleAdjust(), Isis::ImageList::serialNumberList(), Isis::ShapeList::serialNumberList(), and Isis::SerialNumberList::SerialNumberList().
|
inherited |
Adds a new filename / and pre-composed serial number pair to the SerialNumberList.
serialNumber | the serial number to be added |
filename | the filename to be added |
IException::User | "Unable to find Instrument or Mapping group for comparing target." |
IException::User | "Target name from file does not match." |
IException::User | "Invalid serial number [Unknown] from file." |
IException::User | "Duplicate serial number from files [file1] and [file2]." |
IException::User | "Unable to find Instrument group need for performing bundle adjustment." |
IException::User | "Unable to find Spacecraftname or InstrumentId keywords needed for performing bundle adjustment." |
IException::User | "[SerialNumber, FileName] can not be added to serial number list." |
References _FILEINFO_, Isis::FileName::expanded(), Isis::SerialNumberList::fileName(), Isis::SerialNumberList::Pair::filename, Isis::PvlObject::findObject(), Isis::SerialNumberList::hasSerialNumber(), Isis::SerialNumberList::m_checkTarget, Isis::SerialNumberList::m_fileMap, Isis::SerialNumberList::m_pairs, Isis::SerialNumberList::m_serialMap, Isis::SerialNumberList::m_target, Isis::SerialNumberList::observationNumber(), Isis::SerialNumberList::serialNumber(), Isis::SerialNumberList::serialNumberIndex(), and Isis::IException::User.
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.
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 |
References observationNumber().
Referenced by remove().
|
inherited |
Return a filename given a serial number.
sn | The serial number of the desired filename |
IException::Programmer | "Unable to get the FileName. The given serial number does not exist in the list." |
References _FILEINFO_, Isis::SerialNumberList::hasSerialNumber(), Isis::SerialNumberList::m_pairs, Isis::SerialNumberList::m_serialMap, and Isis::IException::Programmer.
Referenced by Isis::SerialNumberList::add(), Isis::SerialNumberList::add(), Isis::SerialNumber::ComposeObservation(), Isis::ControlPointEditWidget::createControlPoint(), Isis::QnetTool::createFixedPoint(), Isis::QnetTool::createPoint(), Isis::ControlNetFilter::CubeConvexHullFilter(), Isis::ControlNetFilter::CubeDistanceFilter(), Isis::ControlNetFilter::CubeNameExpressionFilter(), Isis::ControlNetFilter::CubeNumPointsFilter(), Isis::ControlPointEditWidget::deletePoint(), Isis::MatchTool::deletePoint(), Isis::QnetTool::deletePoint(), Isis::BundleAdjust::fileName(), Isis::QnetCubeNameFilter::filter(), Isis::InterestOperator::FindCnetRef(), Isis::InterestOperator::FindOverlapByImageFootPrint(), Isis::ControlNetStatistics::GenerateImageStats(), Isis::BundleAdjust::imageLists(), Isis::InterestOperator::InterestByMeasure(), Isis::InterestOperator::InterestByPoint(), Isis::QnetFileTool::loadImage(), Isis::ControlNetFilter::PointCubeNamesFilter(), Isis::ControlNetFilter::PointDistanceFilter(), Isis::ControlNetFilter::PointLatLonFilter(), Isis::ControlNetFilter::PointMeasurePropertiesFilter(), Isis::ControlNetFilter::PrintCubeFileSerialNum(), Isis::ControlNetStatistics::PrintImageStats(), Isis::InterestOperator::ProcessLocked_Point_Reference(), Isis::SerialNumberList::remove(), Isis::NewControlPointDialog::setFiles(), Isis::QnetFixedPointDialog::setFiles(), Isis::LidarData::SetImages(), Isis::ControlNet::SetImages(), Isis::ChipViewportsWidget::setPoint(), and Isis::ControlNetGraphicsItem::snToFileName().
|
inherited |
Return the filename at the given index.
index | The index of the desired filename |
IException::Programmer | "Unable to get the FileName. The given index is invalid." |
References _FILEINFO_, Isis::SerialNumberList::m_pairs, Isis::IException::Programmer, and Isis::toString().
|
inherited |
Return a list index given a filename.
filename | The filename to be searched for |
IException::Programmer | "Unable to get the FileName index. The given file name does not exist in the list." |
References _FILEINFO_, Isis::FileName::expanded(), Isis::SerialNumberList::m_fileMap, and Isis::IException::Programmer.
Referenced by Isis::ControlPointEditWidget::createControlPoint(), 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.
on | The observation number to be checked for |
References Isis::SerialNumberList::m_pairs, and observationNumber().
|
inherited |
Determines whether or not the requested serial number exists in the list.
sn | The serial number to be checked for |
References Isis::SerialNumberList::m_serialMap.
Referenced by Isis::SerialNumberList::add(), Isis::SerialNumberList::add(), Isis::SerialNumberList::fileName(), Isis::SerialNumberList::serialNumberIndex(), Isis::LidarData::SetImages(), Isis::ControlNet::SetImages(), and Isis::SerialNumberList::spacecraftInstrumentId().
QString Isis::ObservationNumberList::observationNumber | ( | const QString & | filename | ) |
Return an observation number given a filename.
filename | The filename to be matched |
IException::Programmer | "Requested filename does not exist in the list" |
References _FILEINFO_, Isis::FileName::expanded(), Isis::SerialNumberList::fileNameIndex(), Isis::SerialNumberList::m_fileMap, Isis::SerialNumberList::m_pairs, and Isis::IException::Programmer.
Referenced by add(), hasObservationNumber(), possibleFileNames(), and remove().
QString Isis::ObservationNumberList::observationNumber | ( | int | index | ) |
Return a observation number given an index.
index | The index of the desired observation number |
IException::Programmer | "Index is invalid" |
References _FILEINFO_, Isis::SerialNumberList::m_pairs, Isis::IException::Programmer, and Isis::toString().
int Isis::ObservationNumberList::observationNumberMapIndex | ( | const int | serialNumberIndex | ) |
Return a observation index given a serial number index.
serialNumberIndex | The index of the serial number to map |
IException::Programmer | "Serial Number Index is invalid" |
References _FILEINFO_, Isis::IException::Programmer, Isis::SerialNumberList::serialNumberIndex(), and Isis::toString().
int Isis::ObservationNumberList::observationSize | ( | ) | const |
How many unique observations are in the list?
vector< QString > Isis::ObservationNumberList::possibleFileNames | ( | const QString & | on | ) |
Return possible filenames given an observation number.
on | The observation number of the desired filename |
IException::Programmer | "Requested observation number does not exist in the list" |
References _FILEINFO_, Isis::SerialNumberList::m_pairs, observationNumber(), and Isis::IException::Programmer.
|
inherited |
Return possible serial numbers given an observation number.
on | The observation number of the possible serial number |
IException::Programmer | "Unable to get the possible serial numbers. The given observation number does not exist in the list." |
References _FILEINFO_, Isis::SerialNumberList::m_pairs, Isis::SerialNumberList::observationNumber(), Isis::IException::Programmer, and Isis::SerialNumberList::serialNumber().
void Isis::ObservationNumberList::remove | ( | const QString & | listfile | ) |
Removes all of the listed serial numbers from the observation.
listfile | The list of SerialNumbers to remove |
References remove().
void Isis::ObservationNumberList::remove | ( | SerialNumberList * | snlist | ) |
Removes all of the listed serial numbers from the observation.
snlist | The list of SerialNumbers to remove |
IException::User | "Cannot remove, serial number list is empty" |
References _FILEINFO_, add(), observationNumber(), Isis::SerialNumberList::size(), and Isis::IException::User.
Referenced by remove().
|
inherited |
Return a serial number given a filename.
filename | The filename to be matched |
IException::Programmer | "Unable to get the SerialNumber. The given file name does not exist in the list." |
References _FILEINFO_, Isis::FileName::expanded(), Isis::SerialNumberList::fileNameIndex(), Isis::SerialNumberList::m_fileMap, Isis::SerialNumberList::m_pairs, and Isis::IException::Programmer.
Referenced by Isis::SerialNumberList::add(), Isis::SerialNumberList::add(), Isis::ControlPointEditWidget::createControlPoint(), Isis::QnetTool::createFixedPoint(), Isis::QnetTool::createPoint(), Isis::ControlNetFilter::CubeConvexHullFilter(), Isis::ControlNetFilter::CubeDistanceFilter(), Isis::ControlNetFilter::CubeNameExpressionFilter(), Isis::ControlNetFilter::CubeNumPointsFilter(), Isis::QnetCubeDistanceFilter::filter(), Isis::QnetPointCubeNameFilter::filter(), Isis::MatchTool::mouseButtonRelease(), Isis::QnetTool::mouseButtonRelease(), Isis::ObservationNumber::PossibleSerial(), Isis::SerialNumberList::possibleSerialNumbers(), Isis::StereoTool::rubberBandComplete(), Isis::QnetNewMeasureDialog::setFiles(), Isis::LidarData::SetImages(), and Isis::ControlNet::SetImages().
|
inherited |
Return a serial number given an index.
index | The index of the desired serial number |
IException::Programmer | "Unable to get the SerialNumber. The given index is invalid." |
References _FILEINFO_, Isis::SerialNumberList::m_pairs, Isis::IException::Programmer, and Isis::toString().
|
inherited |
Return a list index given a serial number.
sn | The serial number searched for |
IException::Programmer | "Unable to get the SerialNumber index. The given serial number does not exist in the list." |
References _FILEINFO_, Isis::SerialNumberList::hasSerialNumber(), Isis::SerialNumberList::m_serialMap, and Isis::IException::Programmer.
Referenced by Isis::SerialNumberList::add(), Isis::SerialNumberList::add(), Isis::QnetPointDistanceFilter::filter(), observationNumberMapIndex(), and Isis::SerialNumberList::remove().
|
inherited |
How many serial number / filename combos are in the list.
References Isis::SerialNumberList::m_pairs.
Referenced by Isis::ControlPointEditWidget::createControlPoint(), Isis::QnetTool::createFixedPoint(), Isis::QnetTool::createPoint(), Isis::ControlNetFilter::CubeConvexHullFilter(), Isis::ControlNetFilter::CubeDistanceFilter(), Isis::ControlNetFilter::CubeNameExpressionFilter(), Isis::ControlNetFilter::CubeNumPointsFilter(), Isis::ControlNetStatistics::GenerateControlNetStats(), Isis::BundleAdjust::imageLists(), Isis::BundleAdjust::numberOfImages(), Isis::ObservationNumber::PossibleSerial(), Isis::ControlNetStatistics::PrintImageStats(), remove(), Isis::QnetNavTool::resetList(), Isis::NewControlPointDialog::setFiles(), Isis::LidarData::SetImages(), Isis::ControlNet::SetImages(), and Isis::ControlNetGraphicsItem::snToFileName().
|
inherited |
Return the spacecraftname/instrumentid given a serial number.
sn | The serial number of the desired spacecraftname/instrumentid |
IException::Programmer | "Unable to get the Spacecraft InstrumentId. The given serial number does not exist in the list." |
References _FILEINFO_, Isis::SerialNumberList::hasSerialNumber(), Isis::SerialNumberList::m_pairs, Isis::SerialNumberList::m_serialMap, and Isis::IException::Programmer.
|
inherited |
Return the spacecraftname/instrumentid at the given index.
index | The index of the desired spacecraftname/instrumentid |
IException::Programmer | "Unable to get the Spacecraft InstrumentId. The given index is invalid." |
References _FILEINFO_, Isis::SerialNumberList::m_pairs, Isis::IException::Programmer, and Isis::toString().
|
protectedinherited |
Specifies whether or not to check to make sure the target names match between files added to the serialnumber list.
Referenced by Isis::SerialNumberList::add(), Isis::SerialNumberList::add(), Isis::SerialNumberList::SerialNumberList(), and Isis::SerialNumberList::SerialNumberList().
|
protectedinherited |
Maps filenames to their positions in the list.
Referenced by Isis::SerialNumberList::add(), Isis::SerialNumberList::add(), Isis::SerialNumberList::fileNameIndex(), observationNumber(), Isis::SerialNumberList::remove(), and Isis::SerialNumberList::serialNumber().
|
protectedinherited |
List of serial number Pair entities.
Referenced by Isis::SerialNumberList::add(), Isis::SerialNumberList::add(), Isis::SerialNumberList::fileName(), Isis::SerialNumberList::fileName(), hasObservationNumber(), observationNumber(), observationNumber(), Isis::SerialNumberList::observationNumber(), possibleFileNames(), Isis::SerialNumberList::possibleSerialNumbers(), Isis::SerialNumberList::remove(), Isis::SerialNumberList::serialNumber(), Isis::SerialNumberList::serialNumber(), Isis::SerialNumberList::size(), Isis::SerialNumberList::spacecraftInstrumentId(), and Isis::SerialNumberList::spacecraftInstrumentId().
|
protectedinherited |
Maps serial numbers to their positions in the list.
Referenced by Isis::SerialNumberList::add(), Isis::SerialNumberList::add(), Isis::SerialNumberList::fileName(), Isis::SerialNumberList::hasSerialNumber(), Isis::SerialNumberList::remove(), Isis::SerialNumberList::serialNumberIndex(), and Isis::SerialNumberList::spacecraftInstrumentId().
|
protectedinherited |
Target name that the files must have if m_checkTarget is true
Referenced by Isis::SerialNumberList::add(), Isis::SerialNumberList::add(), Isis::SerialNumberList::SerialNumberList(), and Isis::SerialNumberList::SerialNumberList().