Isis 3.0 Programmer Reference
Back | Home
BundleSolutionInfo.h
Go to the documentation of this file.
1 #ifndef BundleSolutionInfo_h
2 #define BundleSolutionInfo_h
3 
27 #include <QList>
28 #include <QObject>
29 #include <QString>
30 
31 #include "BundleSettings.h"
32 
33 #include "XmlStackedHandler.h"
34 
35 class QDataStream;
36 class QUuid;
37 class QXmlStreamWriter;
38 
39 namespace Isis {
40  class BundleResults;
41  class FileName;
42  class ImageList;
43  class Project; //TODO does xml stuff need project???
44  class PvlObject;
46 
98  class BundleSolutionInfo : public QObject {
99  Q_OBJECT
100  public:
103  BundleResults outputStatistics,
104  QObject *parent = 0);
105  BundleSolutionInfo(Project *project,
106  XmlStackedHandlerReader *xmlReader,
107  QObject *parent = 0); //TODO does xml stuff need project???
108  BundleSolutionInfo(FileName bundleSolutionInfoFile);
112 
113  void setOutputStatistics(BundleResults statisticsResults);
114  void setRunTime(QString runTime);
115 
116  QString id() const;
117  QString controlNetworkFileName() const;
120  QString runTime() const;
121 
122 
123  bool outputImagesCSVHeader(std::ofstream &fpOut);
124  bool outputHeader(std::ofstream &fpOut);
125  bool outputText();
126  bool outputImagesCSV();
127  bool outputPointsCSV();
128  bool outputResiduals();
129 
130  PvlObject pvlObject(QString resultsName = "BundleSolutionInfo",
131  QString settingsName = "InputSettings",
132  QString statisticsName = "StatisticsResults");
133 
134  //TODO does xml stuff need project and newRoot???
135  void save(QXmlStreamWriter &stream, const Project *project, FileName newProjectRoot) const;
136 
137  //TODO does xml stuff need project???
138  void save(QXmlStreamWriter &stream, const Project *project) const;
139 
140  QDataStream &write(QDataStream &stream) const;
141  QDataStream &read(QDataStream &stream);
142 
143  void writeH5File(FileName outputFileName) const;
144  void readH5File(FileName outputFileName) const;
145 
146  void createH5File(FileName outputFileName) const;
147  void openH5File(FileName outputFileName);
148 // BundleSolutionInfo(FileName bundleSolutionInfoFile);
149 
150  public slots:
151  void updateFileName(Project *);
152 
153  private:
164  class XmlHandler : public XmlStackedHandler {
165  public:
166  //TODO does xml stuff need project???
167  XmlHandler(BundleSolutionInfo *bundleSolutionInfo, Project *project);
168  ~XmlHandler();
169 
170  virtual bool startElement(const QString &namespaceURI, const QString &localName,
171  const QString &qName, const QXmlAttributes &atts);
172  virtual bool characters(const QString &ch);
173  virtual bool endElement(const QString &namespaceURI, const QString &localName,
174  const QString &qName);
175 
176  private:
177  Q_DISABLE_COPY(XmlHandler);
178 
180  Project *m_xmlHandlerProject; //TODO does xml stuff need project???
185  };
186 
187  private:
189 
192  QUuid *m_id;
193  QString m_runTime;
198  }; // end BundleSolutionInfo class
199 
200  // operators to read/write BundleSolutionInfo to/from binary data
201  QDataStream &operator<<(QDataStream &stream, const BundleSolutionInfo &bundleSolutionInfo);
202  QDataStream &operator>>(QDataStream &stream, BundleSolutionInfo &bundleSolutionInfo);
203 
204  void setStringAttribute(int locationId, QString locationName,
205  QString attributeName, QString attributeValue);
206  QString getStringAttribute(int locationId, QString locationName, QString attributeName);
207 }; // end namespace Isis
208 
210 
211 #endif // BundleSolutionInfo_h
void setRunTime(QString runTime)
Sets the run time.
virtual bool startElement(const QString &namespaceURI, const QString &localName, const QString &qName, const QXmlAttributes &atts)
Handle an XML start element.
void updateFileName(Project *)
Change the on-disk file name for the control network used to be where the control network ought to be...
Internalizes a list of images and allows for operations on the entire list.
Definition: ImageList.h:44
bool outputText()
Outputs a text file with the results of the BundleAdjust.
QSharedPointer< BundleSettings > BundleSettingsQsp
Definition for a BundleSettingsQsp, a shared pointer to a BundleSettings object.
The main project for cnetsuite.
Definition: Project.h:105
File name manipulation and expansion.
Definition: FileName.h:111
XmlHandler(BundleSolutionInfo *bundleSolutionInfo, Project *project)
Create an XML Handler (reader) that can populate the BundleSolutionInfo class data.
Container class for BundleAdjustment results.
BundleSettingsQsp m_settings
The settings from the bundle adjust.
BundleSettingsQsp bundleSettings()
Returns the bundle settings.
bool outputHeader(std::ofstream &fpOut)
Output header for bundle results file.
QString id() const
Get a unique, identifying string associated with this BundleSolutionInfo object.
QString runTime() const
Returns the run time.
QList< ImageList * > * m_images
The list of images that were adjusted.
Q_DECLARE_METATYPE(Isis::Cube *)
This allows Cube *&#39;s to be stored in a QVariant.
BundleSolutionInfo & operator=(const BundleSolutionInfo &src)
Creates an equal operator for BundleSolutionInfos.
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
BundleSettingsQsp m_xmlHandlerBundleSettings
Settings used to run the bundle adjust.
QList< ImageList * > * m_xmlHandlerImages
List of pointers to images.
bool outputImagesCSV()
Outputs the bundleout_images.csv file which contains Jigsaw data about the images within each observa...
void setOutputStatistics(BundleResults statisticsResults)
Sets the stat results.
bool outputImagesCSVHeader(std::ofstream &fpOut)
Outputs the header for the bundleout_images.csv file.
BundleResults * m_statisticsResults
The results of the bundle adjust.
BundleSolutionInfo * m_xmlHandlerBundleSolutionInfo
The bundleSolutionInfo object.
void save(QXmlStreamWriter &stream, const Project *project, FileName newProjectRoot) const
Saves the BundleSolutionInfo to the project.
void createH5File(FileName outputFileName) const
Creates a new file using H5F_ACC_EXCL.
PvlObject pvlObject(QString resultsName="BundleSolutionInfo", QString settingsName="InputSettings", QString statisticsName="StatisticsResults")
Writes the results from BundleAdjust to a Pvl.
BundleResults * m_xmlHandlerBundleResults
Results from the bundle adjust.
std::istream & operator>>(std::istream &is, CSVReader &csv)
Input read operator for input stream sources.
Definition: CSVReader.cpp:463
QUuid * m_id
A unique ID for this BundleSolutionInfo object (useful for others to reference this object when savin...
This class is used to read an images.xml file into an image list.
XML Handler that parses XMLs in a stack-oriented way.
QString m_xmlHandlerCharacters
List of characters that have been handled.
QDataStream & read(QDataStream &stream)
Reads the data from the stream.
virtual bool endElement(const QString &namespaceURI, const QString &localName, const QString &qName)
Handle an XML end element.
QString controlNetworkFileName() const
Returns the name of the control network.
bool outputResiduals()
Outputs image coordinate residuals to a csv file.
QString m_runTime
The run time of the bundle adjust.
BundleResults bundleResults()
Returns the bundle results.
virtual bool characters(const QString &ch)
Adds characters to m_xmlHandlerCharacters.
FileName * m_controlNetworkFileName
The name of the control network.
A container class for statistical results from a BundleAdjust solution.
Definition: BundleResults.h:90
void openH5File(FileName outputFileName)
Reads the settings and results from another BundleSolutionInfo.
QDebug operator<<(QDebug debug, const Hillshade &hillshade)
Print this class out to a QDebug object.
Definition: Hillshade.cpp:308
QDataStream & write(QDataStream &stream) const
Writes the data to the stream.
Contains Pvl Groups and Pvl Objects.
Definition: PvlObject.h:74
his enables stack-based XML parsing of XML files.
bool outputPointsCSV()
Outputs point data to a csv file.

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 ISIS Support Center
File Modified: 07/12/2023 23:15:16