Commit 0ad87be1 authored by Makayla Shepherd's avatar Makayla Shepherd
Browse files

Updating the cube labels added and history comments added. References #4818.

parent 7589b399
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -267,6 +267,8 @@ namespace Isis {
   *                           occur. Removed bundleException(QString) signal. Fixes #4483.
   *   @history 2016-12-01 Ian Humphrey - Modified outputBundleStatus()'s printf() call so that
   *                           there is no longer a -Wformat-security warning.
   *   @history 2017-05-01 Makayla Shepherd - Added imageLists() to track and return the images
   *                           bundled. Fixes #4818.
   */
  class BundleAdjust : public QObject {
      Q_OBJECT
+4 −0
Original line number Diff line number Diff line
@@ -93,6 +93,10 @@ namespace Isis {
   *                           as the other angles when determining how many headers to create.
   *                           Fixes #4557.
   *   @history 2017-04-24 Ian Humphrey - Removed pvlObject(). Fixes #4797.
   *   @history 2017-05-01 Makayla Shepherd - Added imageList() to track and return the images used
   *                           in the bundle adjustment. These images will be displayed on the
   *                           project tree under results/bundle/<runtime> and will keep the same
   *                           structure as the input on the project tree. Fixes #4818.
   */
  class BundleSolutionInfo : public QObject {
    Q_OBJECT
+27 −0
Original line number Diff line number Diff line
@@ -293,6 +293,7 @@ namespace Isis {

    QList<ImageList *> imageLists = m_bundleSolutionInfo->imageList();
    foreach (ImageList *imageList, imageLists) {
      int i = 0;
      foreach (Image *image, *imageList) {
        FileName imageName(image->fileName());
        FileName imagesBundledFile(m_project->bundleSolutionInfoRoot() + "/" +
@@ -301,6 +302,32 @@ namespace Isis {

        Cube *originalCube = new Cube(image->fileName(), "r");
        Cube *ecub = originalCube->copy(imagesBundledFile, CubeAttributeOutput("+External"));

        Process p;
        p.SetInputCube(ecub);
        //check for existing polygon, if exists delete it
        if (ecub->label()->hasObject("Polygon")) {
          ecub->label()->deleteObject("Polygon");
        }

        // check for CameraStatistics Table, if exists, delete
        for (int iobj = 0; iobj < ecub->label()->objects(); iobj++) {
          PvlObject obj = ecub->label()->object(iobj);
         if (obj.name() != "Table") continue;
         if (obj["Name"][0] != QString("CameraStatistics")) continue;
         ecub->label()->deleteObject(iobj);
         break;
        }
        //  Get Kernel group and add or replace LastModifiedInstrumentPointing keyword.
        Table cmatrix = m_bundleAdjust->cMatrix(i);
        QString jigComment = "Jigged = " + Isis::iTime::CurrentLocalTime();
        cmatrix.Label().addComment(jigComment);
        Table spvector = m_bundleAdjust->spVector(i);
        spvector.Label().addComment(jigComment);
        ecub->write(cmatrix);
        ecub->write(spvector);
        p.WriteHistory(*ecub);
        i++;
      }
    }

+10 −8
Original line number Diff line number Diff line
@@ -112,6 +112,8 @@ namespace Isis {
   *     @history 2016-12-02 Tracie Sucharski - Added ability to change text color for and item.
   *     @history 2017-04-17 Tracie Sucharski - Turn off editing on all items except for the project
   *                               name.
   *     @history 2017-05-01 Makayla Shepherd - Added the images that were bundled to the
   *                               BundleSolutionInfo ProjectItem. Fixes #4818.
   */
  class ProjectItem : public QStandardItem {
    public: