|
Isis 3 Programmer Reference
|
18 #include "HiCalTypes.h"
19 #include "HiCalUtil.h"
20 #include "HiCalConf.h"
22 #include "PvlKeyword.h"
24 #include "IException.h"
41 friend std::ostream &operator<<(std::ostream &o,
const Module &c) {
102 const DbProfile &prof,
const int &elements = 0) {
103 LoadCSV csv(csvBase, conf, prof);
105 if (elements != 0) csv.validateSize(elements,
true);
107 return (csv.getVector());
120 const QString keyname =
"ModuleHistory")
131 void Dump(
const QString &fname)
const {
133 QString dumpcFile = dumpc.
expanded();
134 std::ofstream ofile(dumpcFile.toLatin1().data(), std::ios::out);
136 QString mess =
"Unable to open/create module dump file " +
147 enum { DefaultWidth = 10, DefaultPrecision = 6};
170 std::ostringstream ostr;
173 return (QString(ostr.str().c_str()));
178 return (QString(ostr.str().c_str()));
184 o <<
"# History = " <<
_history << std::endl;
185 o <<
"# Count = " <<
_data.dim() << std::endl;
186 for (
int i = 0 ; i <
_data.dim() ; i++) {
QString PixelToString(double d)
Takes a double pixel value and returns the name of the pixel type as a string.
int _fmtPrecision
Default field with of double.
HiHistory _history
Hierarchial component history.
virtual void record(PvlGroup &pvl, const QString keyname="ModuleHistory") const
Record history in Pvl group object.
virtual void Process(const Module &c)
Invokes the process method on the Module vector.
int _fmtWidth
Default field with of double.
Module manages HiRISE calibration vectors from various sources.
const HiVector & ref() const
Return data via a const reference.
File name manipulation and expansion.
int size() const
Returns the size (number of elements) of data array.
const HiHistory & History() const
Return recorded history of events.
QString name() const
Returns name of component.
QString _csvFile
Fully expanded name of CSV file if present.
virtual void Process(const HiVector &v)
Default processing behavior makes a reference copy of data array.
virtual ~Module()
Destructor.
Provides generalized access to HiRISE calibration CSV files.
bool IsSpecial(const double d)
Returns if the input pixel is special.
HiVector _data
Data vector.
QString formatDbl(const double &value) const
Properly format values that could be special pixels.
HiVector loadCsv(const QString &csvBase, const HiCalConf &conf, const DbProfile &prof, const int &elements=0)
Provide generic loading of CSV file for all modules.
QString expanded() const
Returns a QString of the full file name including the file path, excluding the attributes.
double operator()(int index) const
Return individual element of the data vector.
Contains multiple PvlContainers.
A DbProfile is a container for access parameters to a database.
TNT::Array1D< double > HiVector
1-D Buffer
void Dump(const QString &fname) const
Dumps the component to a specified file.
QString _name
Name of component.
QString getcsvFile() const
Returns expanded name of last CSV file loaded by loadCsv.
virtual void printOn(std::ostream &o) const
Default printing of data in module.
This is free and unencumbered software released into the public domain.
@ User
A type of error that could only have occurred due to a mistake on the user's part (e....