File failed to load: https://isis.astrogeology.usgs.gov/6.0.0/Object/assets/jax/output/NativeMML/config.js
Isis 3 Programmer Reference
BundleSolutionInfo.h
1 #ifndef BundleSolutionInfo_h
2 #define BundleSolutionInfo_h
3 
10 /* SPDX-License-Identifier: CC0-1.0 */
11 
12 #include <QList>
13 #include <QObject>
14 #include <QString>
15 
16 #include "BundleObservation.h"
17 #include "BundleSettings.h"
18 #include "SurfacePoint.h"
19 
20 #include "XmlStackedHandler.h"
21 
22 class QDataStream;
23 class QUuid;
24 class QXmlStreamWriter;
25 
26 namespace Isis {
27  class BundleResults;
28  class Control;
29  class FileName;
30  class ImageList;
31  class Project; //TODO does xml stuff need project???
32  class PvlObject;
34 
159  class BundleSolutionInfo : public QObject {
160  Q_OBJECT
161  public:
163  FileName controlNetworkFileName,
164  BundleResults outputStatistics,
165  QList<ImageList *> imgList,
166  QObject *parent = 0);
167  BundleSolutionInfo(Project *project,
168  XmlStackedHandlerReader *xmlReader,
169  QObject *parent = 0); //TODO does xml stuff need project???
170  BundleSolutionInfo() = default;
171 
173 
174  QString savedBundleOutputFilename();
175  QString savedImagesFilename();
176  QString savedPointsFilename();
177  QString savedResidualsFilename();
178 
179  void addAdjustedImages(ImageList *images);
180  void setOutputStatistics(BundleResults statisticsResults);
181  void setOutputControl(Control *outputControl);
182  void setOutputControlName(QString name);
183  void setRunTime(QString runTime);
184  void setName(QString name);
185 
187  QString id() const;
188  QString inputControlNetFileName() const;
189  QString outputControlNetFileName() const;
190  Control *control() const;
191  QString outputControlName() const;
195  QString runTime() const;
196  QString name() const;
197 
198 
199  bool outputImagesCSVHeader(std::ofstream &fpOut, BundleObservationQsp observations);
200  bool outputHeader(std::ofstream &fpOut);
201  bool outputText();
202  bool outputImagesCSV();
203  bool outputPointsCSV();
204  bool outputResiduals();
205 
206  void save(QXmlStreamWriter &stream, const Project *project, FileName newProjectRoot) const;
207 
209  SurfacePoint::CoordIndex coordInx) const;
210 
211  public slots:
212  void updateFileName(Project *);
213 
214  private:
225  class XmlHandler : public XmlStackedHandler {
226  public:
227  //TODO does xml stuff need project???
228  XmlHandler(BundleSolutionInfo *bundleSolutionInfo, Project *project);
229  ~XmlHandler();
230 
231  virtual bool startElement(const QString &namespaceURI, const QString &localName,
232  const QString &qName, const QXmlAttributes &atts);
233  virtual bool characters(const QString &ch);
234  virtual bool endElement(const QString &namespaceURI, const QString &localName,
235  const QString &qName);
236  QString surfacePointCoordName(SurfacePoint::CoordinateType type,
237  SurfacePoint::CoordIndex coordIdx) const;
238 
239  private:
240  Q_DISABLE_COPY(XmlHandler);
241 
243  Project *m_xmlHandlerProject; //TODO does xml stuff need project???
245  };
246 
247  private:
248 
251  QUuid *m_id;
252  QString m_name;
253  QString m_runTime;
256  QString m_outputControlName;
261 
262  // In theory the path in the BundleSettings can change while running. So we save the
263  // filenames actually used when the most recent save of the file was done.
264  QString m_txtBundleOutputFilename;
265  QString m_csvSavedImagesFilename;
266  QString m_csvSavedPointsFilename;
267  QString m_csvSavedResidualsFilename;
268 
269  }; // end BundleSolutionInfo class
270 
271  void setStringAttribute(int locationId, QString locationName,
272  QString attributeName, QString attributeValue);
273  QString getStringAttribute(int locationId, QString locationName, QString attributeName);
274 }; // end namespace Isis
275 
277 
278 #endif // BundleSolutionInfo_h
Isis::BundleSolutionInfo::savedPointsFilename
QString savedPointsFilename()
Returns filename of output bundle points csv file.
Definition: BundleSolutionInfo.cpp:146
Isis::BundleSolutionInfo::XmlHandler
This class is used to read an images.xml file into an image list.
Definition: BundleSolutionInfo.h:225
Isis::BundleSolutionInfo::outputImagesCSVHeader
bool outputImagesCSVHeader(std::ofstream &fpOut, BundleObservationQsp observations)
Outputs the header for the bundleout_images.csv file.
Definition: BundleSolutionInfo.cpp:403
Isis::BundleSolutionInfo::outputPointsCSV
bool outputPointsCSV()
Outputs point data to a csv file.
Definition: BundleSolutionInfo.cpp:1404
Isis::BundleSolutionInfo::savedResidualsFilename
QString savedResidualsFilename()
Returns filename of output bundle residuals csv file.
Definition: BundleSolutionInfo.cpp:156
Isis::PvlObject
Contains Pvl Groups and Pvl Objects.
Definition: PvlObject.h:61
Isis::BundleSolutionInfo::XmlHandler::characters
virtual bool characters(const QString &ch)
Adds characters to m_xmlHandlerCharacters.
Definition: BundleSolutionInfo.cpp:1771
Isis::BundleSolutionInfo::addAdjustedImages
void addAdjustedImages(ImageList *images)
Adds a list of images that were adjusted (their labels were updated).
Definition: BundleSolutionInfo.cpp:166
Isis::BundleSolutionInfo::m_inputControlNetFileName
FileName * m_inputControlNetFileName
Input control network file name.
Definition: BundleSolutionInfo.h:254
QList
This is free and unencumbered software released into the public domain.
Definition: BoxcarCachingAlgorithm.h:13
Isis::BundleSolutionInfo::m_id
QUuid * m_id
A unique ID for this BundleSolutionInfo object (useful for others to reference this object when savin...
Definition: BundleSolutionInfo.h:251
Isis::BundleSolutionInfo::updateFileName
void updateFileName(Project *)
TODO: change description below to something more like english.
Definition: BundleSolutionInfo.cpp:195
Isis::BundleSolutionInfo::outputControlNetFileName
QString outputControlNetFileName() const
Returns the name of the output control network.
Definition: BundleSolutionInfo.cpp:284
Isis::FileName
File name manipulation and expansion.
Definition: FileName.h:100
Isis::BundleSolutionInfo::name
QString name() const
Returns the name of the bundle.
Definition: BundleSolutionInfo.cpp:387
Isis::BundleSolutionInfo::outputImagesCSV
bool outputImagesCSV()
Outputs the bundleout_images.csv file which contains Jigsaw data about the images within each observa...
Definition: BundleSolutionInfo.cpp:1085
Isis::BundleSolutionInfo::XmlHandler::m_xmlHandlerCharacters
QString m_xmlHandlerCharacters
List of characters that have been handled.
Definition: BundleSolutionInfo.h:244
Isis::BundleSolutionInfo::surfacePointCoordName
QString surfacePointCoordName(SurfacePoint::CoordinateType type, SurfacePoint::CoordIndex coordInx) const
Determine the control point coordinate name.
Definition: BundleSolutionInfo.cpp:1883
Isis::BundleSolutionInfo::setName
void setName(QString name)
Sets the name of the bundle.
Definition: BundleSolutionInfo.cpp:376
Isis::BundleSolutionInfo::savedBundleOutputFilename
QString savedBundleOutputFilename()
Returns bundleout text filename.
Definition: BundleSolutionInfo.cpp:126
Isis::Control
This represents an ISIS control net in a project-based GUI interface.
Definition: Control.h:66
Isis::BundleSolutionInfo::savedImagesFilename
QString savedImagesFilename()
Returns filename of output bundle images csv file.
Definition: BundleSolutionInfo.cpp:136
QSharedPointer< BundleSettings >
Isis::BundleSolutionInfo::XmlHandler::~XmlHandler
~XmlHandler()
Destructor.
Definition: BundleSolutionInfo.cpp:1760
Isis::BundleSolutionInfo::m_outputControl
Control * m_outputControl
Output control.
Definition: BundleSolutionInfo.h:255
Isis::XmlStackedHandlerReader
Manage a stack of content handlers for reading XML files.
Definition: XmlStackedHandlerReader.h:30
Isis::BundleSolutionInfo::outputHeader
bool outputHeader(std::ofstream &fpOut)
Output header for bundle results file.
Definition: BundleSolutionInfo.cpp:479
Isis::BundleSolutionInfo::setOutputControl
void setOutputControl(Control *outputControl)
Returns the name of the output control network.
Definition: BundleSolutionInfo.cpp:298
Isis::Project
The main project for ipce.
Definition: Project.h:289
Isis::BundleSolutionInfo::XmlHandler::endElement
virtual bool endElement(const QString &namespaceURI, const QString &localName, const QString &qName)
Handle an XML end element.
Definition: BundleSolutionInfo.cpp:1827
Isis::ImageList
Internalizes a list of images and allows for operations on the entire list.
Definition: ImageList.h:55
Isis::BundleSolutionInfo::inputControlNetFileName
QString inputControlNetFileName() const
Returns the name of the input control network.
Definition: BundleSolutionInfo.cpp:274
Isis::BundleSolutionInfo::~BundleSolutionInfo
~BundleSolutionInfo()
Destructor.
Definition: BundleSolutionInfo.cpp:95
Isis::SurfacePoint::CoordinateType
CoordinateType
Defines the coordinate typ, units, and coordinate index for some of the output methods.
Definition: SurfacePoint.h:139
Isis::BundleSolutionInfo::bundleResults
BundleResults bundleResults()
Returns the bundle results.
Definition: BundleSolutionInfo.cpp:349
Isis::BundleSolutionInfo::m_settings
BundleSettingsQsp m_settings
Bundle settings.
Definition: BundleSolutionInfo.h:257
Isis::BundleSolutionInfo::setOutputStatistics
void setOutputStatistics(BundleResults statisticsResults)
Sets the stat results.
Definition: BundleSolutionInfo.cpp:176
Isis::BundleSolutionInfo::XmlHandler::startElement
virtual bool startElement(const QString &namespaceURI, const QString &localName, const QString &qName, const QXmlAttributes &atts)
Handle an XML start element.
Definition: BundleSolutionInfo.cpp:1787
Isis::BundleSolutionInfo
Container class for BundleAdjustment results.
Definition: BundleSolutionInfo.h:159
Isis::BundleSolutionInfo::runTime
QString runTime() const
Returns the run time.
Definition: BundleSolutionInfo.cpp:264
Isis::BundleSolutionInfo::m_adjustedImages
QList< ImageList * > * m_adjustedImages
Adjusted image list.
Definition: BundleSolutionInfo.h:260
Isis::BundleSolutionInfo::adjustedImages
QList< ImageList * > adjustedImages() const
Returns the list of images that were adjusted after a bundle.
Definition: BundleSolutionInfo.cpp:222
Isis::BundleSolutionInfo::m_images
QList< ImageList * > * m_images
Input image list.
Definition: BundleSolutionInfo.h:259
Isis::BundleSolutionInfo::setRunTime
void setRunTime(QString runTime)
Sets the run time, and the name if a name is not already set.
Definition: BundleSolutionInfo.cpp:242
Isis::BundleSolutionInfo::id
QString id() const
Get a unique, identifying string associated with this BundleSolutionInfo object.
Definition: BundleSolutionInfo.cpp:232
Isis::BundleSolutionInfo::imageList
QList< ImageList * > imageList()
Returns the images used in the bundle.
Definition: BundleSolutionInfo.cpp:366
Isis::BundleSolutionInfo::m_runTime
QString m_runTime
Run time of the bundle adjustment.
Definition: BundleSolutionInfo.h:253
Isis::BundleSolutionInfo::outputText
bool outputText()
Outputs a text file with the results of the BundleAdjust.
Definition: BundleSolutionInfo.cpp:1201
Isis::BundleSolutionInfo::setOutputControlName
void setOutputControlName(QString name)
Sets m_outputControlName.
Definition: BundleSolutionInfo.cpp:308
Isis::BundleSolutionInfo::XmlHandler::XmlHandler
XmlHandler(BundleSolutionInfo *bundleSolutionInfo, Project *project)
Create an XML Handler (reader) that can populate the BundleSolutionInfo class data.
Definition: BundleSolutionInfo.cpp:1749
Isis::BundleSolutionInfo::m_statisticsResults
BundleResults * m_statisticsResults
Bundle statistical results.
Definition: BundleSolutionInfo.h:258
Isis::BundleSolutionInfo::save
void save(QXmlStreamWriter &stream, const Project *project, FileName newProjectRoot) const
Saves the BundleSolutionInfo to the project.
Definition: BundleSolutionInfo.cpp:1616
Isis::XmlStackedHandler
XML Handler that parses XMLs in a stack-oriented way.
Definition: XmlStackedHandler.h:118
Isis::BundleResults
A container class for statistical results from a BundleAdjust solution.
Definition: BundleResults.h:82
Isis::BundleSolutionInfo::control
Control * control() const
Returns bundle output Control object.
Definition: BundleSolutionInfo.cpp:327
QObject
Isis::BundleSolutionInfo::m_name
QString m_name
Name of the bundle. Defaults to the id.
Definition: BundleSolutionInfo.h:252
Isis::BundleSolutionInfo::outputControlName
QString outputControlName() const
Returns m_outputControlName.
Definition: BundleSolutionInfo.cpp:318
Isis::BundleSolutionInfo::bundleSettings
BundleSettingsQsp bundleSettings()
Returns bundle settings.
Definition: BundleSolutionInfo.cpp:337
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(Isis::PlotWindow *)
We have plot windows as QVariant data types, so here it's enabled.
Isis::BundleSolutionInfo::XmlHandler::m_xmlHandlerBundleSolutionInfo
BundleSolutionInfo * m_xmlHandlerBundleSolutionInfo
The bundleSolutionInfo object.
Definition: BundleSolutionInfo.h:242
Isis::BundleSolutionInfo::outputResiduals
bool outputResiduals()
Outputs image coordinate residuals to a csv file.
Definition: BundleSolutionInfo.cpp:1517

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:12