OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimAdrgTileSource.h
Go to the documentation of this file.
1 //*******************************************************************
2 //
3 // License: MIT
4 //
5 // See LICENSE.txt file in the top level directory for more details.
6 //
7 // Author: Ken Melero
8 //
9 // Description: This class give the capability to access tiles from an
10 // ADRG file.
11 //
12 //********************************************************************
13 // $Id: ossimAdrgTileSource.h 17932 2010-08-19 20:34:35Z dburken $
14 
15 #ifndef ossimAdrgTileSource_HEADER
16 #define ossimAdrgTileSource_HEADER
17 
18 #include <fstream>
19 
21 
22 class ossimImageData;
23 class ossimAdrgHeader;
24 
26 {
27 public:
28 
29  enum
30  {
31  ADRG_TILE_WIDTH = 128,
32  ADRG_TILE_HEIGHT = 128,
33  ADRG_TILE_SIZE = 16384, // 128 * 128,
34  BAND_OFFSET = 16384, // 8 * 2048,
35  NUMBER_OF_BANDS = 3
36  };
37 
39  {
40  RED_BAND = 0, // the ADRG rgb value
41  GREEN_BAND = 1,
42  BLUE_BAND = 2
43  };
44 
46 
47  virtual ossimString getShortName()const;
48  virtual ossimString getLongName()const;
49 
58  virtual bool open();
59 
66  ossim_uint32 resLevel=0);
79  virtual bool getTile(ossimImageData* result, ossim_uint32 resLevel=0);
80 
85  virtual ossim_uint32 getNumberOfInputBands() const;
86 
87  virtual ossim_uint32 getNumberOfOutputBands()const;
88 
93  virtual ossim_uint32 getNumberOfLines(ossim_uint32 reduced_res_level = 0) const;
94 
99  virtual ossim_uint32 getNumberOfSamples(ossim_uint32 reduced_res_level = 0) const;
100 
105  virtual ossimIrect getImageRectangle(ossim_uint32 reduced_res_level = 0) const;
106 
111  virtual bool saveState(ossimKeywordlist& kwl,
112  const char* prefix=0)const;
113 
118  virtual bool loadState(const ossimKeywordlist& kwl,
119  const char* prefix=0);
120 
125 
129  virtual ossimScalarType getOutputScalarType() const;
130 
134  virtual ossim_uint32 getTileWidth() const;
135 
136  virtual void close();
140  virtual ossim_uint32 getTileHeight() const;
141 
142  virtual bool isOpen()const;
143 
150  virtual ossim_uint32 getImageTileWidth() const;
151 
158  virtual ossim_uint32 getImageTileHeight() const;
159 
165  virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
166 
171  virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
172 
173 protected:
174  virtual ~ossimAdrgTileSource();
175 
179  void adjustToStartOfTile(ossimIpt& pt) const;
180 
184  bool fillBuffer(const ossimIrect& tile_rect,
185  const ossimIrect& clip_rect,
186  ossimImageData* tile);
187 
192 
193 TYPE_DATA
194 };
195 
196 #endif
virtual bool open()=0
Pure virtual open.
ossimRefPtr< ossimImageData > m_Tile
Represents serializable keyword/value map.
virtual ossim_uint32 getNumberOfOutputBands() const
Returns the number of bands in a tile returned from this TileSource.
std::basic_ifstream< char > ifstream
Class for char input file streams.
Definition: ossimIosFwd.h:44
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Method to the load (recreate) the state of an object from a keyword list.
virtual ossim_uint32 getNumberOfLines(ossim_uint32 resLevel=0) const =0
Pure virtual, derived classes must implement.
virtual ossim_uint32 getTileHeight() const
Returns the default processing tile height.
virtual ossimString getShortName() const
Definition: ossimObject.cpp:48
virtual ossim_uint32 getTileWidth() const
Returns the default processing tile width.
virtual bool isOpen() const =0
Derived classes must implement this method to be concrete.
virtual void getPropertyNames(std::vector< ossimString > &propertyNames) const
virtual ossimRefPtr< ossimImageGeometry > getImageGeometry()
Returns the image geometry object associated with this tile source or NULL if non defined...
#define TYPE_DATA
Definition: ossimRtti.h:339
virtual ossim_uint32 getImageTileHeight() const =0
Returns the tile width of the image or 0 if the image is not tiled.
unsigned int ossim_uint32
virtual ossimString getLongName() const
Definition: ossimObject.cpp:53
virtual void close()
Deletes the overview and clears the valid image vertices.
virtual ossimIrect getImageRectangle(ossim_uint32 resLevel=0) const
Returns zero-based bounding rectangle of the image.
ossimScalarType
virtual ossimRefPtr< ossimProperty > getProperty(const ossimString &name) const
virtual ossim_uint32 getImageTileWidth() const =0
Returns the tile width of the image or 0 if the image is not tiled.
virtual ossimScalarType getOutputScalarType() const
This will be used to query the output pixel type of the tile source.
This class defines an abstract Handler which all image handlers(loaders) should derive from...
#define OSSIM_DLL
virtual ossim_uint32 getNumberOfSamples(ossim_uint32 resLevel=0) const =0
Pure virtual, derived classes must implement.
virtual ossim_uint32 getNumberOfInputBands() const =0
ossimAdrgHeader * m_AdrgHeader
unsigned char ossim_uint8
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of an object to a keyword list.
virtual ossimRefPtr< ossimImageData > getTile(const ossimIpt &origin, ossim_uint32 resLevel=0)