OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimRegTool.cpp
Go to the documentation of this file.
1 //**************************************************************************************************
2 //
3 // OSSIM Open Source Geospatial Data Processing Library
4 // See top level LICENSE.txt file for license information
5 //
6 //**************************************************************************************************
7 
11 #include "ossimRegTool.h"
12 #include <sstream>
13 
14 using namespace std;
15 
16 const char* ossimRegTool::DESCRIPTION =
17  "Performs registration given list of images.";
18 
20 {
21 }
22 
24 {
25 }
26 
28 {
29  // Add global usage options. Don't include ossimChipProcUtil options as not appropriate.
31 
32  // Set the general usage:
34  ossimString usageString = ap.getApplicationName();
35  usageString += " registration [options] <input-raster-file> <input-raster-file> [...]";
36  au->setCommandLineUsage(usageString);
37 
38  // Set the command line options:
39  au->addCommandLineOption("--myoption <float>", "Blah blah");
40 }
41 
43 {
44  string ts1;
46 
47  if (!ossimTool::initialize(ap))
48  return false;
49 
50  if ( ap.read("--myoption", sp1))
51  m_kwl.addPair("myoption", ts1);
52 
53  processRemainingArgs(ap);
54  return true;
55 }
56 
58 {
59  ossimString value;
60  ostringstream xmsg;
61 
62  // Don't copy KWL if member KWL passed in:
63  if (&kwl != &m_kwl)
64  {
65  // Start with clean options keyword list.
66  m_kwl.clear();
67  m_kwl.addList( kwl, true );
68  }
69 
70  value = m_kwl.findKey("myoption");
71  if (!value.empty())
72  double myoption = value.toDouble();
73 
75 }
76 
78 {
79  ostringstream xmsg;
80 
81  // Establish intersections
82 
83  // Find tiepoints
84 
85  // Register images
86 
87  // Report results
88 
89  return true;
90 }
91 
92 
94 {
95  ostringstream value;
96  value<<"<float> (optional, defaults to <ADD DEFAULT>)";
97  kwl.addPair("myoption", value.str());
98 
99 }
100 
101 
virtual bool initialize(ossimArgumentParser &ap)
Initial method to be ran prior to execute.
std::string getApplicationName() const
return the application name, as specified by argv[0]
void addCommandLineOption(const ossimString &option, const ossimString &explanation)
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
Definition: ossimIosFwd.h:35
virtual void getKwlTemplate(ossimKeywordlist &kwl)
Assigns a template keywordlist to string for initializing derived classes.
Represents serializable keyword/value map.
bool read(const std::string &str)
search for an occurance of a string in the argument list, on sucess remove that occurance from the li...
void addPair(const std::string &key, const std::string &value, bool overwrite=true)
void setCommandLineUsage(const ossimString &explanation)
ossimApplicationUsage * getApplicationUsage()
virtual void setUsage(ossimArgumentParser &ap)
Initializes the aurgument parser with expected parameters and options.
Definition: ossimTool.cpp:41
virtual void setUsage(ossimArgumentParser &ap)
Initializes the aurgument parser with expected parameters and options.
virtual bool execute()
Performs the actual product write.
double toDouble() const
virtual bool initialize(ossimArgumentParser &ap)
Initializes from command line arguments.
Definition: ossimTool.cpp:58
static const char * DESCRIPTION
Definition: ossimRegTool.h:18
virtual ~ossimRegTool()
bool empty() const
Definition: ossimString.h:411
virtual bool initialize(ossimArgumentParser &ap)
Initial method to be ran prior to execute.