OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimAtCorrGridRemapper.h
Go to the documentation of this file.
1 //*******************************************************************
2 //
3 // License: See top level LICENSE.txt file.
4 //
5 // Author: Garrett Potts
6 //
7 //*******************************************************************
8 // $Id: ossimAtCorrGridRemapper.h 15766 2009-10-20 12:37:09Z gpotts $
9 #ifndef ossimAtCorrGridRemapper_HEADER
10 #define ossimAtCorrGridRemapper_HEADER
12 
58 {
59 public:
61  ossimImageSource* inputSource = NULL,
62  const ossimString& sensorType = "");
63 
64 
65 
66  void setGridRect(const ossimIrect& rect)
67  {
68  theGridBounds = rect;
69  theUlGridBound = rect.ul();
70  }
71  void setGridSize(ossim_uint32 numberOfBands, const ossimIpt& gridSize);
73  {
74  return theGridSize;
75  }
76 
78  ossim_uint32 row,
79  ossim_uint32 col,
80  double& a,
81  double& b,
82  double& c)
83  {
84  a = theAGrid[band][row][col];
85  b = theAGrid[band][row][col];
86  c = theAGrid[band][row][col];
87  }
88 
89  void getValues(const ossimDpt& pt,
90  ossim_uint32 band,
91  double& a,
92  double& b,
93  double& c)
94  {
95  interpolate(pt, band, a, b, c);
96  }
97 
99  ossim_uint32 row,
100  ossim_uint32 col,
101  const double& a,
102  const double& b,
103  const double& c)
104  {
105  theAGrid[band][row][col] = a;
106  theBGrid[band][row][col] = b;
107  theCGrid[band][row][col] = c;
108  }
109 
110  virtual void initialize();
111 
116  virtual bool loadState(const ossimKeywordlist& kwl,
117  const char* prefix=0);
118  virtual bool saveState(ossimKeywordlist& kwl,
119  const char* prefix=0)const;
120 
121 protected:
122  virtual ~ossimAtCorrGridRemapper();
126  std::vector< std::vector< std::vector<double> > >theAGrid;
127  std::vector< std::vector< std::vector<double> > >theBGrid;
128  std::vector< std::vector< std::vector<double> > >theCGrid;
129 
130  virtual void interpolate(const ossimDpt& pt,
131  int band,
132  double& a,
133  double& b,
134  double& c)const;
135  virtual void setBaseToAverage();
136 
137 TYPE_DATA
138 };
139 
140 #endif
std::vector< std::vector< std::vector< double > > > theCGrid
void setGridSize(ossim_uint32 numberOfBands, const ossimIpt &gridSize)
Represents serializable keyword/value map.
void setValues(ossim_uint32 band, ossim_uint32 row, ossim_uint32 col, const double &a, const double &b, const double &c)
const ossimIpt & ul() const
Definition: ossimIrect.h:274
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of an object to a keyword list.
void getValues(const ossimDpt &pt, ossim_uint32 band, double &a, double &b, double &c)
ossimAtCorrGridRemapper(ossimObject *owner=NULL, ossimImageSource *inputSource=NULL, const ossimString &sensorType="")
std::vector< std::vector< std::vector< double > > > theBGrid
#define TYPE_DATA
Definition: ossimRtti.h:339
unsigned int ossim_uint32
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
void setGridRect(const ossimIrect &rect)
std::vector< std::vector< std::vector< double > > > theAGrid
virtual void interpolate(const ossimDpt &pt, int band, double &a, double &b, double &c) const
void getValues(ossim_uint32 band, ossim_uint32 row, ossim_uint32 col, double &a, double &b, double &c)