Loading [MathJax]/jax/output/NativeMML/config.js
Isis 3 Programmer Reference
LoadCSV.h
1 #ifndef LoadCSV_h
2 #define LoadCSV_h
3 
10 /* SPDX-License-Identifier: CC0-1.0 */
11 
12 #include <cmath>
13 #include <string>
14 #include <vector>
15 
16 #include "IString.h"
17 #include "HiCalTypes.h"
18 #include "HiCalUtil.h"
19 #include "HiCalConf.h"
20 #include "CSVReader.h"
21 
22 namespace Isis {
23 
24  class iException;
25 
52  class LoadCSV {
53 
54  public:
55  // Constructors and Destructor
56  LoadCSV();
57  LoadCSV(const QString &base, const HiCalConf &conf,
58  const DbProfile &profile);
59 
61  virtual ~LoadCSV() { }
62 
63  void load(const QString &base, const HiCalConf &conf,
64  const DbProfile &profile);
65 
66  QString filename() const;
67  int size() const;
68 
69  bool validateSize(const int &expected,
70  const bool &throw_on_error = false)
71  const;
72 
73  HiVector getVector() const;
74  HiMatrix getMatrix() const;
75 
76  void History(HiHistory &history) const;
77 
78  private:
79  QString _base;
80  DbProfile _csvSpecs;
81  HiMatrix _data;
82  std::vector<QString> _history;
83 
84  void init(const QString &base, const HiCalConf &conf,
85  const DbProfile &profile);
86  void addHistory(const QString &element, const QString &desc);
87  void getKeyList(const QString &base, std::vector<QString> &keys)
88  const;
89  DbProfile ResolveKeys(const QString &base, const HiCalConf &conf,
90  const DbProfile &prof) const;
91  QString ParsedKey(const QString &key, const HiCalConf &conf,
92  const DbProfile &prof) const;
93  QString makeKey(const QString &ksuffix = "") const;
94  QString getValue(const QString &ksuffix = "") const;
95  HiMatrix extract (const CSVReader &csv);
96  int getAxisIndex(const QString &name,
97  const CSVReader::CSVAxis &header) const;
98 
99  };
100 
101 } // namespace Isis
102 #endif
Isis::CSVReader::CSVAxis
Parser::TokenList CSVAxis
Row/Column token list.
Definition: CSVReader.h:247
Isis::CSVReader
Reads strings and parses them into tokens separated by a delimiter character.
Definition: CSVReader.h:239
Isis::HiMatrix
TNT::Array2D< double > HiMatrix
2-D buffer
Definition: HiCalTypes.h:28
Isis::LoadCSV::~LoadCSV
virtual ~LoadCSV()
Destructor.
Definition: LoadCSV.h:61
Isis::HiHistory
Definition: HiCalTypes.h:30
Isis::LoadCSV
Provides generalized access to HiRISE calibration CSV files.
Definition: LoadCSV.h:52
Isis::DbProfile
A DbProfile is a container for access parameters to a database.
Definition: DbProfile.h:51
Isis::HiVector
TNT::Array1D< double > HiVector
1-D Buffer
Definition: HiCalTypes.h:27
Isis::History
Definition: History.h:38
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the USGS Astrogeology Discussion Board
To report a bug, or suggest a feature go to: ISIS Github
File Modified: 07/13/2023 15:16:48