OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimShorelineTool.h
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 
8 #ifndef ossimShorelineUtil_HEADER
9 #define ossimShorelineUtil_HEADER
10 
11 #include <ossim/ossimConfig.h>
12 #include <ossim/base/ossimRefPtr.h>
15 #include <ossim/base/ossimIpt.h>
16 #include <ossim/base/ossimIrect.h>
17 #include <ossim/base/ossimGrect.h>
29 #include <vector>
30 #include <mutex>
31 
37 {
38 public:
39  enum AlgorithmId { UNKNOWN, NDWI, AWEI, PAN_THRESHOLD };
40  enum ThresholdMode { NONE=0, MEAN=1, SIGMA=2, VARIANCE=3, VALUE=4 };
41 
44 
45  virtual void setUsage(ossimArgumentParser& ap);
46  virtual bool initialize(ossimArgumentParser& ap);
47  virtual void initialize(const ossimKeywordlist& kwl);
48  virtual ossimRefPtr<ossimImageData> getChip(const ossimIrect& img_rect);
49  virtual bool execute();
50 
51  virtual ossimString getClassName() const { return "ossimShorelineUtil"; }
52 
54  static const char* DESCRIPTION;
55 
56 
57 protected:
58  virtual void initProcessingChain();
59  void initLandsat8();
60 
63 
65  const ossimShorelineTool& operator=( const ossimShorelineTool& rhs );
66 
68  void usage(ossimArgumentParser& ap);
69  void addArguments(ossimArgumentParser& ap);
70  void doThreshold();
71  void autoComputeThreshold();
72 
73 #if OSSIM_HAS_JSONCPP
74  bool addPropsToJSON();
75 #endif
76 
81  double m_threshold;
82  double m_tolerance;
85  double m_smoothing;
90  std::map<ossimString, ossimString> m_geoJsonProps;
91  bool m_noVector;
92 };
93 
94 #endif
virtual bool initialize(ossimArgumentParser &ap)
Initial method to be ran prior to execute.
ossimRefPtr< ossimImageData > getChip()
Get chip method that assumes pre-initialized state.
virtual void initProcessingChain()=0
Derived classes initialize their custom chains here.
void usage()
#define OSSIMDLLEXPORT
Represents serializable keyword/value map.
virtual ossimString getClassName() const
ossimFilename m_vectorFilename
ossim_uint8 m_marginalValue
ossimFilename m_threshFilename
virtual void setUsage(ossimArgumentParser &ap)
Initializes the aurgument parser with expected parameters and options.
std::map< ossimString, ossimString > m_geoJsonProps
ossimFilename m_indexFilename
static const char * DESCRIPTION
Used by ossimUtilityFactory.
ossimFilename m_maskFilename
const ossimChipProcTool & operator=(const ossimChipProcTool &)
Hidden from use assignment operator.
ThresholdMode m_thresholdMode
virtual bool execute()
Performs the actual product write.
unsigned char ossim_uint8