Loading [MathJax]/jax/output/NativeMML/config.js
Isis 3 Developer Reference
BundleSolutionInfo.h
Go to the documentation of this file.
1 #ifndef BundleSolutionInfo_h
2 #define BundleSolutionInfo_h
3 
25 #include <QList>
26 #include <QObject>
27 #include <QString>
28 
29 #include "BundleSettings.h"
30 #include "SurfacePoint.h"
31 
32 #include "XmlStackedHandler.h"
33 
34 class QDataStream;
35 class QUuid;
36 class QXmlStreamWriter;
37 
38 namespace Isis {
39  class BundleResults;
40  class Control;
41  class FileName;
42  class ImageList;
43  class Project; //TODO does xml stuff need project???
44  class PvlObject;
46 
171  class BundleSolutionInfo : public QObject {
172  Q_OBJECT
173  public:
175  FileName controlNetworkFileName,
176  BundleResults outputStatistics,
177  QList<ImageList *> imgList,
178  QObject *parent = 0);
179  BundleSolutionInfo(Project *project,
180  XmlStackedHandlerReader *xmlReader,
181  QObject *parent = 0); //TODO does xml stuff need project???
182  BundleSolutionInfo() = default;
183 
185 
186  QString savedBundleOutputFilename();
187  QString savedImagesFilename();
188  QString savedPointsFilename();
189  QString savedResidualsFilename();
190 
191  void addAdjustedImages(ImageList *images);
192  void setOutputStatistics(BundleResults statisticsResults);
193  void setOutputControl(Control *outputControl);
194  void setOutputControlName(QString name);
195  void setRunTime(QString runTime);
196  void setName(QString name);
197 
199  QString id() const;
200  QString inputControlNetFileName() const;
201  QString outputControlNetFileName() const;
202  Control *control() const;
203  QString outputControlName() const;
207  QString runTime() const;
208  QString name() const;
209 
210 
211  bool outputImagesCSVHeader(std::ofstream &fpOut);
212  bool outputHeader(std::ofstream &fpOut);
213  bool outputText();
214  bool outputImagesCSV();
215  bool outputPointsCSV();
216  bool outputResiduals();
217 
218  void save(QXmlStreamWriter &stream, const Project *project, FileName newProjectRoot) const;
219 
221  SurfacePoint::CoordIndex coordInx) const;
222 
223  public slots:
224  void updateFileName(Project *);
225 
226  private:
237  class XmlHandler : public XmlStackedHandler {
238  public:
239  //TODO does xml stuff need project???
240  XmlHandler(BundleSolutionInfo *bundleSolutionInfo, Project *project);
241  ~XmlHandler();
242 
243  virtual bool startElement(const QString &namespaceURI, const QString &localName,
244  const QString &qName, const QXmlAttributes &atts);
245  virtual bool characters(const QString &ch);
246  virtual bool endElement(const QString &namespaceURI, const QString &localName,
247  const QString &qName);
249  SurfacePoint::CoordIndex coordIdx) const;
250 
251  private:
252  Q_DISABLE_COPY(XmlHandler);
253 
254  BundleSolutionInfo *m_xmlHandlerBundleSolutionInfo;
255  Project *m_xmlHandlerProject; //TODO does xml stuff need project???
256  QString m_xmlHandlerCharacters;
257  };
258 
259  private:
260 
263  QUuid *m_id;
264  QString m_name;
265  QString m_runTime;
266  FileName *m_inputControlNetFileName;
267  Control *m_outputControl;
268  QString m_outputControlName;
269  BundleSettingsQsp m_settings;
270  BundleResults *m_statisticsResults;
271  QList<ImageList *> *m_images;
272  QList<ImageList *> *m_adjustedImages;
273 
274  // In theory the path in the BundleSettings can change while running. So we save the
275  // filenames actually used when the most recent save of the file was done.
276  QString m_txtBundleOutputFilename;
277  QString m_csvSavedImagesFilename;
278  QString m_csvSavedPointsFilename;
279  QString m_csvSavedResidualsFilename;
280 
281  }; // end BundleSolutionInfo class
282 
283  void setStringAttribute(int locationId, QString locationName,
284  QString attributeName, QString attributeValue);
285  QString getStringAttribute(int locationId, QString locationName, QString attributeName);
286 }; // end namespace Isis
287 
289 
290 #endif // BundleSolutionInfo_h
This represents an ISIS control net in a project-based GUI interface.
Definition: Control.h:79
Control * control() const
Returns bundle output Control object.
Definition: BundleSolutionInfo.cpp:319
void setRunTime(QString runTime)
Sets the run time, and the name if a name is not already set.
Definition: BundleSolutionInfo.cpp:234
CoordIndex
Definition: SurfacePoint.h:165
void updateFileName(Project *)
TODO: change description below to something more like english.
Definition: BundleSolutionInfo.cpp:187
Internalizes a list of images and allows for operations on the entire list.
Definition: ImageList.h:55
bool outputText()
Outputs a text file with the results of the BundleAdjust.
Definition: BundleSolutionInfo.cpp:1214
The main project for ipce.
Definition: Project.h:289
QString outputControlName() const
Returns m_outputControlName.
Definition: BundleSolutionInfo.cpp:310
QList< ImageList * > imageList()
Returns the images used in the bundle.
Definition: BundleSolutionInfo.cpp:358
File name manipulation and expansion.
Definition: FileName.h:116
Container class for BundleAdjustment results.
Definition: BundleSolutionInfo.h:171
BundleSettingsQsp bundleSettings()
Returns bundle settings.
Definition: BundleSolutionInfo.cpp:329
QString savedResidualsFilename()
Returns filename of output bundle residuals csv file.
Definition: BundleSolutionInfo.cpp:148
bool outputHeader(std::ofstream &fpOut)
Output header for bundle results file.
Definition: BundleSolutionInfo.cpp:547
QString getStringAttribute(int locationId, QString locationName, QString attributeName)
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
QString name() const
Returns the name of the bundle.
Definition: BundleSolutionInfo.cpp:379
QString surfacePointCoordName(SurfacePoint::CoordinateType type, SurfacePoint::CoordIndex coordInx) const
Determine the control point coordinate name.
Definition: BundleSolutionInfo.cpp:1896
QString savedPointsFilename()
Returns filename of output bundle points csv file.
Definition: BundleSolutionInfo.cpp:138
Q_DECLARE_METATYPE(Isis::BundleSolutionInfo *)
bool outputImagesCSV()
Outputs the bundleout_images.csv file which contains Jigsaw data about the images within each observa...
Definition: BundleSolutionInfo.cpp:1126
QString id() const
Get a unique, identifying string associated with this BundleSolutionInfo object.
Definition: BundleSolutionInfo.cpp:224
void setStringAttribute(int locationId, QString locationName, QString attributeName, QString attributeValue)
QList< ImageList * > adjustedImages() const
Returns the list of images that were adjusted after a bundle.
Definition: BundleSolutionInfo.cpp:214
void setOutputStatistics(BundleResults statisticsResults)
Sets the stat results.
Definition: BundleSolutionInfo.cpp:168
bool outputImagesCSVHeader(std::ofstream &fpOut)
Outputs the header for the bundleout_images.csv file.
Definition: BundleSolutionInfo.cpp:394
QString runTime() const
Returns the run time.
Definition: BundleSolutionInfo.cpp:256
QString outputControlNetFileName() const
Returns the name of the output control network.
Definition: BundleSolutionInfo.cpp:276
void setName(QString name)
Sets the name of the bundle.
Definition: BundleSolutionInfo.cpp:368
void setOutputControlName(QString name)
Sets m_outputControlName.
Definition: BundleSolutionInfo.cpp:300
void addAdjustedImages(ImageList *images)
Adds a list of images that were adjusted (their labels were updated).
Definition: BundleSolutionInfo.cpp:158
XML Handler that parses XMLs in a stack-oriented way.
Definition: XmlStackedHandler.h:112
void setOutputControl(Control *outputControl)
Returns the name of the output control network.
Definition: BundleSolutionInfo.cpp:290
CoordinateType
Defines the coordinate typ, units, and coordinate index for some of the output methods.
Definition: SurfacePoint.h:155
bool outputResiduals()
Outputs image coordinate residuals to a csv file.
Definition: BundleSolutionInfo.cpp:1530
~BundleSolutionInfo()
Destructor.
Definition: BundleSolutionInfo.cpp:87
void save(QXmlStreamWriter &stream, const Project *project, FileName newProjectRoot) const
Saves the BundleSolutionInfo to the project.
Definition: BundleSolutionInfo.cpp:1629
BundleResults bundleResults()
Returns the bundle results.
Definition: BundleSolutionInfo.cpp:341
Definition: BoxcarCachingAlgorithm.h:29
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
A container class for statistical results from a BundleAdjust solution.
Definition: BundleResults.h:96
QString savedBundleOutputFilename()
Returns bundleout text filename.
Definition: BundleSolutionInfo.cpp:118
QString inputControlNetFileName() const
Returns the name of the input control network.
Definition: BundleSolutionInfo.cpp:266
Contains Pvl Groups and Pvl Objects.
Definition: PvlObject.h:74
QString savedImagesFilename()
Returns filename of output bundle images csv file.
Definition: BundleSolutionInfo.cpp:128
Manage a stack of content handlers for reading XML files.
Definition: XmlStackedHandlerReader.h:25
bool outputPointsCSV()
Outputs point data to a csv file.
Definition: BundleSolutionInfo.cpp:1417

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/12/2023 23:15:36