OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
AtpTileSource.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 #ifndef AtpTileSource_HEADER
8 #define AtpTileSource_HEADER
9 
10 #include "AtpConfig.h"
11 #include "AutoTiePoint.h"
12 #include <ossim/base/ossimIrect.h>
16 #include <memory>
17 #include <vector>
18 
19 namespace ATP
20 {
21 class AtpGenerator;
27 {
28 public:
29  AtpTileSource(AtpGenerator* generator);
30 
31  virtual ~AtpTileSource() {}
32 
33  virtual void initialize();
34 
41  virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& origin, ossim_uint32 rLevel=0) = 0;
42 
45  AtpList& getTiePoints() { return m_tiePoints; }
46 
47  virtual ossimScalarType getOutputScalarType() const { return OSSIM_DOUBLE; }
48  virtual ossim_uint32 getNumberOfOutputBands() const { return 2; }
49 
50  void filterPoints();
51 
53  void setTiePoints(ossim::TiePointList& atpList);
54 
55 protected:
57  struct ParallaxInfo
58  {
59  ParallaxInfo():dx_dH(0),dy_dH(0),parallaxSlope(0),parallaxOffset(0),denom(1),maxDistance(0) {}
60  double dx_dH;
61  double dy_dH;
62  double parallaxSlope;
64  double denom;
65  double maxDistance;
66  std::map<std::string, double> distanceMap;
67  };
68 
69  AtpTileSource();
71 
72  virtual void allocate();
73 
74  void filterWithParallax();
75  void computeParallax();
76  void computeParallaxStatistics();
77 
78  void filterWithoutParallax();
79 
81  void pruneList();
82 
83  void initializeStaticMembers();
84 
85  std::shared_ptr<AtpGenerator> m_generator;
87  ossimRefPtr<ossimImageData> m_tile; // Used only for raster mode (rare)
90 
91  // Statics assigned once for speed
92  static double s_minVectorResDiff;
93  static double s_maxDiffRatio;
94  static double s_cosMaxAngleDiff;
95  static double s_maxPaxDev;
96  static double s_maxPaxPix;
97  static unsigned int s_minNumConsistent;
98  static unsigned int s_percentConsistent;
99  static unsigned int s_numTpsPerTile;
100  static bool s_useRasterMode;
101  static bool s_initialized;
102  static unsigned int s_numFilterIterations;
103 
104 };
105 }
106 #endif /* #ifndef AtpTileSource_HEADER */
#define OSSIMDLLEXPORT
Convenience struct for use between filterWithParallax( and computeParallaxStatistics() ...
Definition: AtpTileSource.h:57
This will be a base for all combiners.
std::shared_ptr< AtpGenerator > m_generator
Definition: AtpTileSource.h:85
std::map< std::string, double > distanceMap
Definition: AtpTileSource.h:66
AtpList & getTiePoints()
This list resets with every getTile() call , so make sure tiepoints from previous getTile() calls are...
Definition: AtpTileSource.h:45
virtual ossim_uint32 getNumberOfOutputBands() const
Returns the number of bands in a tile returned from this TileSource.
Definition: AtpTileSource.h:48
Base class for tile sources performing auto tie point extraction.
Definition: AtpTileSource.h:26
std::vector< std::shared_ptr< AutoTiePoint > > AtpList
Definition: AutoTiePoint.h:137
static bool s_useRasterMode
static unsigned int s_minNumConsistent
Definition: AtpTileSource.h:97
std::vector< ossimRefPtr< ossimConnectableObject > > ConnectableObjectList
static double s_maxDiffRatio
Definition: AtpTileSource.h:93
std::vector< std::shared_ptr< TiePoint > > TiePointList
Definition: TiePoint.h:21
ParallaxInfo m_paxInfo
Definition: AtpTileSource.h:88
Base class for OSSIM-based ATP generators.
Definition: AtpGenerator.h:33
static unsigned int s_percentConsistent
Definition: AtpTileSource.h:98
unsigned int ossim_uint32
static double s_minVectorResDiff
Definition: AtpTileSource.h:92
THESE FUNCTIONS REQUIRE OPENCV.
ossimRefPtr< ossimImageData > m_tile
Definition: AtpTileSource.h:87
ossimScalarType
static unsigned int s_numFilterIterations
static unsigned int s_numTpsPerTile
Definition: AtpTileSource.h:99
static double s_cosMaxAngleDiff
Definition: AtpTileSource.h:94
virtual ossimScalarType getOutputScalarType() const
This will be used to query the output pixel type of the tile source.
Definition: AtpTileSource.h:47
static double s_maxPaxPix
Definition: AtpTileSource.h:96
static bool s_initialized
virtual ~AtpTileSource()
Definition: AtpTileSource.h:31
static double s_maxPaxDev
Definition: AtpTileSource.h:95
64 bit floating point