Skip to content
Snippets Groups Projects
Select Git revision
  • 0dff52345373747d49490a55a6da9210c2f78f7b
  • dev default protected
  • new_pvl_core
  • 8.0-test
  • lts-testing
  • revert-5695-ideal_serial
  • 9.0
  • 9.0.0_RC2
  • 8.0
  • 8.0.5_LTS
  • code8.3.0
  • 9.0.0
  • 9.0.0_RC1
  • gdal_pvl
  • Kelvinrr-patch-3
  • Kelvinrr-patch-2
  • 8.3
  • pvl_core
  • 8.2
  • 8.1
  • Kelvinrr-patch-1
  • 8.0.4
  • 8.3.0
  • 8.2.0
  • 8.1.0
  • 8.0.3
  • 8.0.2
  • 8.0.1
  • 8.0.0
  • 8.1.0_RC2
  • 8.1.0_RC1
  • 8.0.0_RC2
  • 8.0.0_RC1
  • 7.2.0
  • 7.1.0
  • 7.0.0
  • 7.2.0_RC1
  • 7.1.0_RC1
  • 7.0.0_RC2
  • 7.0.0_RC1
  • 6.0.0
41 results

noseam.cpp

Blame
  • noseam.cpp 4.98 KiB
    /** This is free and unencumbered software released into the public domain.
    
    The authors of ISIS do not claim copyright on the contents of this file.
    For more details about the LICENSE terms and the AUTHORS, you will
    find files of those names at the top level of this repository. **/
    
    /* SPDX-License-Identifier: CC0-1.0 */
    
    #include "noseam.h"
    
    #include <iostream>
    #include <fstream>
    
    //#include "automos.h"
    #include "FileList.h"
    #include "FileName.h"
    #include "Cube.h"
    #include "Preference.h"
    #include "ProgramLauncher.h"
    
    using namespace std;
    
    namespace Isis {
    
      /**
       * Noseam creates a mosaic from a list of input cubes using an
       * algorithm that minimizes seams.
       *
       * @param ui UserInterface object containing parameters
       */
      void noseam(UserInterface &ui) {
    
        // Get Filename with list of cubes to mosaic
        FileName cubeListFileName(ui.GetFileName("FROMLIST"));
        std::cout << "***going to run 2nd noseam method\n";
        return noseam(cubeListFileName, ui);
      }
    
    
      /**
       * Noseam creates a mosaic from a list of input cubes using an
       * algorithm that minimizes seams.
       *
       * @param cubeListFileName Filename with list of cubes to mosaic
       * @param ui UserInterface object containing parameters
       */
      void noseam(FileName &cubeListFileName, UserInterface &ui) {
    
        // Boxcar samples and lines must be odd and 1 or greater
        int samples;
        if (ui.WasEntered("SAMPLES")) {
          samples = ui.GetInteger("SAMPLES");
          
          if (samples < 1 || samples % 2 == 0) {
            string msg = "Value for [SAMPLES] must be odd and greater or equal to 1.";
            throw IException(IException::User, msg, _FILEINFO_);
          }
        }
        else {
          string msg = "Parameter [SAMPLES] must be entered.";
          throw IException(IException::User, msg, _FILEINFO_);
        }
    
        int lines;
        if (ui.WasEntered("LINES")) {
          lines = ui.GetInteger("LINES");
    
          if (lines < 1 || lines % 2 == 0) {
            string msg = "Value for [LINES] must be odd and greater or equal to 1.";
            throw IException(IException::User, msg, _FILEINFO_);