OSSIM - Open Source Software Image Map
Version 1.9.0 (20180803)
|
#include <ossimDemTool.h>
Public Types | |
enum | Algorithm { ALGO_UNASSIGNED =0, ASP, OMG } |
enum | Method { METHOD_UNASSIGNED =0, GET_ALGO_LIST, GET_PARAMS, GENERATE } |
enum | Units { UNITS_UNASSIGNED =0, METERS, DEGREES } |
Public Member Functions | |
ossimDemTool () | |
~ossimDemTool () override | |
void | setUsage (ossimArgumentParser &ap) override |
Initializes the aurgument parser with expected parameters and options. More... | |
bool | initialize (ossimArgumentParser &ap) override |
Initializes from command line arguments. More... | |
bool | execute () override |
Writes product to output file if applicable. More... | |
ossimString | getClassName () const override |
void | getKwlTemplate (ossimKeywordlist &kwl) override |
Assigns a template keywordlist to string for initializing derived classes. More... | |
void | loadJSON (const Json::Value &json) override |
Reads processing params from JSON object provided. More... | |
void | saveJSON (Json::Value &json) const override |
Fetch product as JSON object when applicable Always returns true since using exception on error. More... | |
![]() | |
ossimTool () | |
virtual | ~ossimTool () |
virtual void | initialize (const ossimKeywordlist &kwl) |
Reads processing params from KWL and prepares for execute. More... | |
virtual const std::string & | getResponse () const |
Fetch product as string (typically JSON) when applicable, otherwise passes back empty string. More... | |
virtual void | clear () |
Disconnects and clears the DEM and image layers. More... | |
virtual void | abort () |
Kills current (asynchronous) process. More... | |
void | getAPI (std::string &out) const |
Outputs a JSON representation of the Utility's API. More... | |
std::string | getAPI () const |
void | getBuildDate (std::string &s) const |
Gets build date. More... | |
void | getRevision (std::string &s) const |
Gets revision. More... | |
void | getVersion (std::string &s) const |
Gets version. More... | |
virtual bool | isChipProcessor () const |
Overrides base class implementation to indicate this class supports getChip() calls. More... | |
void | setOutputStream (std::ostream *os) |
Redirects any console output to the supplied stream for logging or JNI application. More... | |
bool | helpRequested () const |
Returns true when the initialization detects a "--help" option, so caller can avoid subsequent execute() call. More... | |
![]() | |
ossimObject () | |
virtual | ~ossimObject () |
virtual ossimObject * | dup () const |
virtual ossimString | getShortName () const |
virtual ossimString | getLongName () const |
virtual ossimString | getDescription () const |
virtual RTTItypeid | getType () const |
virtual bool | canCastTo (ossimObject *obj) const |
virtual bool | canCastTo (const RTTItypeid &id) const |
virtual bool | canCastTo (const ossimString &parentClassName) const |
virtual bool | saveState (ossimKeywordlist &kwl, const char *prefix=0) const |
virtual bool | loadState (const ossimKeywordlist &kwl, const char *prefix=0) |
virtual std::ostream & | print (std::ostream &out) const |
Generic print method. More... | |
virtual bool | isEqualTo (const ossimObject &obj, ossimCompareType compareType=OSSIM_COMPARE_FULL) const |
virtual void | accept (ossimVisitor &visitor) |
![]() | |
ossimReferenced () | |
ossimReferenced (const ossimReferenced &) | |
ossimReferenced & | operator= (const ossimReferenced &) |
void | ref () const |
increment the reference count by one, indicating that this object has another pointer which is referencing it. More... | |
void | unref () const |
decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
void | unref_nodelete () const |
decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
int | referenceCount () const |
![]() | |
JsonInterface () | |
virtual | ~JsonInterface () |
Static Public Attributes | |
static const char * | DESCRIPTION |
Private Member Functions | |
void | getAlgorithms () |
void | getParameters () |
void | doASP () |
void | doOMG () |
Private Attributes | |
std::ostream * | m_outputStream |
bool | m_verbose |
Algorithm | m_algorithm |
Method | m_method |
Json::Value | m_responseJSON |
std::shared_ptr< ossim::PhotoBlock > | m_photoBlock |
ossimFilename | m_outputDemFile |
double | m_postSpacing |
Units | m_postSpacingUnits |
Json::Value | m_parameters |
Json::Value | m_atpParameters |
Additional Inherited Members | |
![]() | |
virtual | ~ossimReferenced () |
![]() | |
ossimKeywordlist | m_kwl |
std::ostream * | m_consoleStream |
bool | m_helpRequested |
std::string | m_response |
Definition at line 18 of file ossimDemTool.h.
Enumerator | |
---|---|
ALGO_UNASSIGNED | |
ASP | |
OMG |
Definition at line 21 of file ossimDemTool.h.
enum ossimDemTool::Method |
Enumerator | |
---|---|
METHOD_UNASSIGNED | |
GET_ALGO_LIST | |
GET_PARAMS | |
GENERATE |
Definition at line 22 of file ossimDemTool.h.
enum ossimDemTool::Units |
Enumerator | |
---|---|
UNITS_UNASSIGNED | |
METERS | |
DEGREES |
Definition at line 23 of file ossimDemTool.h.
ossimDemTool::ossimDemTool | ( | ) |
Definition at line 30 of file ossimDemTool.cpp.
References ossimPreferences::instance(), ossimFilename::isDir(), loadJSON(), ossimNotify(), ossimNotifyLevel_WARN, ossimFilename::setPath(), and ossimString::string().
|
override |
Definition at line 61 of file ossimDemTool.cpp.
|
private |
Definition at line 288 of file ossimDemTool.cpp.
References ossimRpcSolver::getRpcModel(), m_outputDemFile, m_photoBlock, ossimRpcSolver::solve(), and ossimRpcModel::toRPB().
Referenced by execute().
|
private |
Definition at line 352 of file ossimDemTool.cpp.
References CINFO, ossimConnectableObject::connectMyInputTo(), ossimToolRegistry::createTool(), ossimImageWriterFactoryRegistry::createWriter(), ossimTool::execute(), ossimImageFileWriter::execute(), ossimRefPtr< T >::get(), ossimImageWriterFactoryRegistry::instance(), ossimToolRegistry::instance(), ossimTool::loadJSON(), m_atpParameters, m_outputDemFile, m_photoBlock, m_responseJSON, ossimTool::saveJSON(), ossimPointCloudImageHandler::setPointCloudHandler(), and ossimString::string().
Referenced by execute().
|
overridevirtual |
Writes product to output file if applicable.
The product may also beAlways returns true since using exception on error.
Implements ossimTool.
Definition at line 210 of file ossimDemTool.cpp.
References ASP, CFATAL, doASP(), doOMG(), GENERATE, GET_ALGO_LIST, GET_PARAMS, getAlgorithms(), getParameters(), m_algorithm, m_method, m_outputStream, m_responseJSON, OMG, and ossimException::what().
Referenced by main().
|
private |
Definition at line 267 of file ossimDemTool.cpp.
References m_responseJSON.
Referenced by execute().
|
inlineoverridevirtual |
Reimplemented from ossimTool.
Definition at line 37 of file ossimDemTool.h.
|
overridevirtual |
Assigns a template keywordlist to string for initializing derived classes.
Reimplemented from ossimTool.
Definition at line 263 of file ossimDemTool.cpp.
|
private |
Definition at line 280 of file ossimDemTool.cpp.
References ossimDemToolConfig::instance(), m_responseJSON, and ossim::JsonConfig::saveJSON().
Referenced by execute().
|
overridevirtual |
Initializes from command line arguments.
This base class has some common arguments to read. The derived class should call this implementation in addition to setting its own arguments.
ap | Represents command line. |
Reimplemented from ossimTool.
Definition at line 92 of file ossimDemTool.cpp.
References CFATAL, GENERATE, GET_ALGO_LIST, GET_PARAMS, ossimTool::initialize(), loadJSON(), ossimTool::m_helpRequested, m_method, m_outputStream, m_verbose, ossimNotify(), ossimNotifyLevel_FATAL, and ossimArgumentParser::read().
|
overridevirtual |
Reads processing params from JSON object provided.
If all good, the object is ready for subsequent call to execute().
Reimplemented from ossimTool.
Definition at line 150 of file ossimDemTool.cpp.
References ALGO_UNASSIGNED, ossimFilename::appendTimestamp(), ASP, ossimString::empty(), GENERATE, GET_ALGO_LIST, GET_PARAMS, ossimDemToolConfig::instance(), m_algorithm, m_atpParameters, m_method, m_outputDemFile, m_parameters, m_photoBlock, m_postSpacing, OMG, and ossimFilename::setExtension().
Referenced by initialize(), main(), and ossimDemTool().
|
inlineoverridevirtual |
Fetch product as JSON object when applicable Always returns true since using exception on error.
json | Returns non-empty object if valid response available. |
Reimplemented from ossimTool.
Definition at line 43 of file ossimDemTool.h.
|
overridevirtual |
Initializes the aurgument parser with expected parameters and options.
It does not output anything. To see the usage, the caller will need to do something like:
ap.getApplicationUsage()->write(<ostream>);
This base class has some common arguments to add. The derived class should call this implementation in addition to setting its own arguments.
Reimplemented from ossimTool.
Definition at line 65 of file ossimDemTool.cpp.
References ossimApplicationUsage::addCommandLineOption(), ossimArgumentParser::getApplicationName(), ossimArgumentParser::getApplicationUsage(), ossimApplicationUsage::setCommandLineUsage(), and ossimTool::setUsage().
|
static |
Definition at line 25 of file ossimDemTool.h.
Referenced by ossimDemToolFactory::getCapabilities().
|
private |
Definition at line 54 of file ossimDemTool.h.
Referenced by execute(), and loadJSON().
|
private |
Definition at line 62 of file ossimDemTool.h.
Referenced by doOMG(), and loadJSON().
|
private |
Definition at line 55 of file ossimDemTool.h.
Referenced by execute(), initialize(), and loadJSON().
|
private |
Definition at line 58 of file ossimDemTool.h.
Referenced by doASP(), doOMG(), and loadJSON().
|
private |
Definition at line 52 of file ossimDemTool.h.
Referenced by execute(), and initialize().
|
private |
Definition at line 61 of file ossimDemTool.h.
Referenced by loadJSON().
|
private |
Definition at line 57 of file ossimDemTool.h.
Referenced by doASP(), doOMG(), and loadJSON().
|
private |
Definition at line 59 of file ossimDemTool.h.
Referenced by loadJSON().
|
private |
Definition at line 60 of file ossimDemTool.h.
|
private |
Definition at line 56 of file ossimDemTool.h.
Referenced by doOMG(), execute(), getAlgorithms(), and getParameters().
|
private |
Definition at line 53 of file ossimDemTool.h.
Referenced by initialize().