Isis 3 Programmer Reference
Isis::LoadCSV Class Reference

Provides generalized access to HiRISE calibration CSV files. More...

#include <LoadCSV.h>

Collaboration diagram for Isis::LoadCSV:
Collaboration graph

Public Member Functions

 LoadCSV (const QString &base, const HiCalConf &conf, const DbProfile &profile)
 
virtual ~LoadCSV ()
 Destructor.
 
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
 

Private Member Functions

void init (const QString &base, const HiCalConf &conf, const DbProfile &profile)
 
void addHistory (const QString &element, const QString &desc)
 
void getKeyList (const QString &base, std::vector< QString > &keys) const
 
DbProfile ResolveKeys (const QString &base, const HiCalConf &conf, const DbProfile &prof) const
 
QString ParsedKey (const QString &key, const HiCalConf &conf, const DbProfile &prof) const
 
QString makeKey (const QString &ksuffix="") const
 
QString getValue (const QString &ksuffix="") const
 
HiMatrix extract (const CSVReader &csv)
 
int getAxisIndex (const QString &name, const CSVReader::CSVAxis &header) const
 

Private Attributes

QString _base
 
DbProfile _csvSpecs
 
HiMatrix _data
 
std::vector< QString > _history
 

Detailed Description

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.

Author
2010-04-06 Kris Becker

Definition at line 52 of file LoadCSV.h.

Constructor & Destructor Documentation

◆ LoadCSV() [1/2]

Isis::LoadCSV::LoadCSV ( )

Definition at line 24 of file LoadCSV.cpp.

◆ LoadCSV() [2/2]

Isis::LoadCSV::LoadCSV ( const QString & base,
const HiCalConf & conf,
const DbProfile & profile )

Definition at line 26 of file LoadCSV.cpp.

◆ ~LoadCSV()

virtual Isis::LoadCSV::~LoadCSV ( )
inlinevirtual

Destructor.

Definition at line 61 of file LoadCSV.h.

Member Function Documentation

◆ addHistory()

void Isis::LoadCSV::addHistory ( const QString & element,
const QString & desc )
private

Definition at line 227 of file LoadCSV.cpp.

◆ filename()

QString Isis::LoadCSV::filename ( ) const

Definition at line 176 of file LoadCSV.cpp.

◆ getAxisIndex()

int Isis::LoadCSV::getAxisIndex ( const QString & name,
const CSVReader::CSVAxis & header ) const
private

Definition at line 284 of file LoadCSV.cpp.

◆ getKeyList()

void Isis::LoadCSV::getKeyList ( const QString & base,
std::vector< QString > & keys ) const
private

Definition at line 234 of file LoadCSV.cpp.

◆ getMatrix()

HiMatrix Isis::LoadCSV::getMatrix ( ) const

Definition at line 201 of file LoadCSV.cpp.

◆ getValue()

QString Isis::LoadCSV::getValue ( const QString & ksuffix = "") const
private

Definition at line 277 of file LoadCSV.cpp.

◆ getVector()

HiVector Isis::LoadCSV::getVector ( ) const

Definition at line 196 of file LoadCSV.cpp.

◆ History()

void Isis::LoadCSV::History ( HiHistory & history) const

Definition at line 206 of file LoadCSV.cpp.

◆ init()

void Isis::LoadCSV::init ( const QString & base,
const HiCalConf & conf,
const DbProfile & profile )
private

Definition at line 219 of file LoadCSV.cpp.

◆ load()

void Isis::LoadCSV::load ( const QString & base,
const HiCalConf & conf,
const DbProfile & profile )

Definition at line 32 of file LoadCSV.cpp.

◆ makeKey()

QString Isis::LoadCSV::makeKey ( const QString & ksuffix = "") const
private

Definition at line 272 of file LoadCSV.cpp.

◆ ParsedKey()

QString Isis::LoadCSV::ParsedKey ( const QString & key,
const HiCalConf & conf,
const DbProfile & prof ) const
private

Definition at line 263 of file LoadCSV.cpp.

◆ ResolveKeys()

DbProfile Isis::LoadCSV::ResolveKeys ( const QString & base,
const HiCalConf & conf,
const DbProfile & prof ) const
private

Definition at line 251 of file LoadCSV.cpp.

◆ size()

int Isis::LoadCSV::size ( ) const

Definition at line 180 of file LoadCSV.cpp.

◆ validateSize()

bool Isis::LoadCSV::validateSize ( const int & expected,
const bool & throw_on_error = false ) const

Definition at line 184 of file LoadCSV.cpp.

Member Data Documentation

◆ _base

QString Isis::LoadCSV::_base
private

Definition at line 79 of file LoadCSV.h.

◆ _csvSpecs

DbProfile Isis::LoadCSV::_csvSpecs
private

Definition at line 80 of file LoadCSV.h.

◆ _data

HiMatrix Isis::LoadCSV::_data
private

Definition at line 81 of file LoadCSV.h.

◆ _history

std::vector<QString> Isis::LoadCSV::_history
private

Definition at line 82 of file LoadCSV.h.


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