OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimGridRemapSource.h
Go to the documentation of this file.
1 //*****************************************************************************
2 // FILE: ossimGridRemapSource.h
3 //
4 // Copyright (C) 2001 ImageLinks, Inc.
5 //
6 // License: MIT
7 //
8 // See LICENSE.txt file in the top level directory for more details.
9 //
10 // AUTHOR: Oscar Kramer
11 //
12 // DESCRIPTION: Contains declaration of class ossimGridRemapSource. This is
13 // a spacially variant remapper that utilizes a grid for interpolating the
14 // remap value given an image x, y.
15 //
16 // LIMITATIONS: None.
17 //
18 //*****************************************************************************
19 // $Id: ossimGridRemapSource.h 15766 2009-10-20 12:37:09Z gpotts $
20 
21 #ifndef ossimGridRemapSource_HEADER
22 #define ossimGridRemapSource_HEADER
23 
25 #include <vector>
28 
29 class ossimDblGrid;
30 class ossimDrect;
31 class ossimDpt;
32 class ossimImageData;
33 
34 /*!****************************************************************************
35  *
36  * CLASS: ossimGridRemapSource
37  *
38  *****************************************************************************/
40 {
41 public:
47  ossimGridRemapEngine* engine);
48 
55 
60 
64  virtual void initialize(const ossimDrect& uv_rect,
65  const ossimDpt& grid_spacing);
66 
71  void setGridNode(const ossimDpt& view_pt,
72  const double* value);
73 
77  virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& origin,
78  ossim_uint32 resLevel=0);
79 
83  virtual bool loadState(const ossimKeywordlist& kwl,
84  const char* prefix=0);
85 
89  virtual bool saveState(ossimKeywordlist& kwl,
90  const char* prefix=0)const;
91 
99  void lock() { theRemapIsLockedFlag = true; }
100 
104  void unlock() { theRemapIsLockedFlag = false; }
105 
109  bool isLocked() const { return theRemapIsLockedFlag; }
110 
115  ossimDblGrid* getGrid(unsigned int index);
116 
120  const ossimFilename& getGridFilename() const { return theGridFilename; }
121 
125  void setGridFilename(const ossimFilename& grid_filename);
126 
127 protected:
128  virtual ~ossimGridRemapSource();
129 
133  void deallocateGrids();
134 
135  vector<ossimDblGrid*> theGrids;
140 
141 TYPE_DATA
142 };
143 
144 #endif
void setRemapEngine(ossimGridRemapEngine *engine)
virtual ossimRefPtr< ossimImageData > getTile(const ossimIrect &origin, ossim_uint32 resLevel=0)
ossimGridRemapEngine * getRemapEngine()
Represents serializable keyword/value map.
const ossimFilename & getGridFilename() const
void setGridFilename(const ossimFilename &grid_filename)
#define TYPE_DATA
Definition: ossimRtti.h:339
unsigned int ossim_uint32
void setGridNode(const ossimDpt &view_pt, const double *value)
vector< ossimDblGrid * > theGrids
ossimDblGrid * getGrid(unsigned int index)
ossimGridRemapEngine * theRemapEngine
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)