Isis Developer Reference
|
Provides generalized access to HiRISE calibration CSV files. More...
#include <LoadCSV.h>
Public Member Functions | |
LoadCSV () | |
LoadCSV (const QString &base, const HiCalConf &conf, const DbProfile &profile) | |
virtual | ~LoadCSV () |
Destructor. More... | |
void | load (const QString &base, const HiCalConf &conf, const DbProfile &profile) |
QString | filename () const |
int | size () const |
bool | validateSize (const int &expected, const bool &throw_on_error=false) const |
HiVector | getVector () const |
HiMatrix | getMatrix () const |
void | History (HiHistory &history) const |
Provides generalized access to HiRISE calibration CSV files.
This class will load a CSV file and extract rows and/or columns based upon a HiRISE calibration profile properly configured to define the format of the CSV file.
It will utilize the HiCalConf object to extract keywords/parameters from a base name of a keyword set. For eaxample, if the a profile contains a CSV file profile with a keyword called "AMatrix" that specifies the pattern used to determine the appropriate file, then additional keywords can be specfied that information about the format of the CSV file. Other keywords are: AMatrixColumnHeader, AMatrixRowHeader, AMatrixColumnName, AMatrixRowName, AMatrixColumnIndex and AMatrixRowIndex.
Note that all HiRISE CSV files must conform to this format. All blank lines of lines that start with a '#' (comment) are ignored when the CSV files is read in.
Note this object is reentrant. You can load successive CSV files one after the other using the same object.
Isis::LoadCSV::LoadCSV | ( | ) |
Isis::LoadCSV::LoadCSV | ( | const QString & | base, |
const HiCalConf & | conf, | ||
const DbProfile & | profile | ||
) |
References load().
|
inlinevirtual |
Destructor.
QString Isis::LoadCSV::filename | ( | ) | const |
Referenced by Isis::Module::loadCsv().
HiMatrix Isis::LoadCSV::getMatrix | ( | ) | const |
HiVector Isis::LoadCSV::getVector | ( | ) | const |
References size().
Referenced by Isis::Module::loadCsv().
void Isis::LoadCSV::History | ( | HiHistory & | history | ) | const |
References Isis::HiHistory::add().
Referenced by Isis::Module::loadCsv().
void Isis::LoadCSV::load | ( | const QString & | base, |
const HiCalConf & | conf, | ||
const DbProfile & | profile | ||
) |
References _FILEINFO_, Isis::CSVReader::columns(), Isis::ConfKey(), Isis::DbProfile::exists(), Isis::FileName::expanded(), Isis::CSVReader::getColumn(), Isis::CSVReader::getHeader(), Isis::CSVReader::getRow(), Isis::IsEqual(), Isis::Null, Isis::CSVReader::read(), Isis::CSVReader::rows(), Isis::CSVReader::setComment(), Isis::CSVReader::setDelimiter(), Isis::CSVReader::setHeader(), Isis::CSVReader::setSkip(), Isis::CSVReader::setSkipEmptyParts(), Isis::ToDouble(), Isis::toInt(), Isis::ToInteger(), Isis::ToString(), and Isis::IException::User.
Referenced by LoadCSV().
int Isis::LoadCSV::size | ( | ) | const |
Referenced by getVector(), and validateSize().
bool Isis::LoadCSV::validateSize | ( | const int & | expected, |
const bool & | throw_on_error = false |
||
) | const |
References _FILEINFO_, size(), and Isis::IException::User.
Referenced by Isis::Module::loadCsv().