OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimTiledImageHandler.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: Oscar Kramer
8 //
9 // Description:
10 //
11 // Image handler used when the full image is distributed across multiple files,
12 // As is the case for tiled Quickbird imagery. This is not for use with band-separate formats,
13 // but only "spatially-separate" schemes. Throughout, MFT = multiple file tiles, the disk storage
14 // scheme handled by this class.
15 //
16 //**************************************************************************************************
17 // $Id: ossimTiledImageHandler.h 2644 2011-05-26 15:20:11Z oscar.kramer $
18 #ifndef ossimTiledImageHandler_HEADER
19 #define ossimTiledImageHandler_HEADER
20 
22 
23 // Enable this flag to utilize the system of separate overviews for each tile-file
24 #define USING_SUB_OVRS 0
25 
31 {
32 public:
35 
37  virtual ~ossimTiledImageHandler();
38 
42  virtual bool open() = 0;
43 
46  virtual void close();
47 
50  virtual bool isOpen()const;
51 
52  virtual ossim_uint32 getNumberOfInputBands() const;
53 
57  virtual ossim_uint32 getNumberOfLines(ossim_uint32 resLevel = 0) const;
58 
62  virtual ossim_uint32 getNumberOfSamples(ossim_uint32 resLevel = 0) const;
63 
66  virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0)const;
67 
70  virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
71 
77  virtual bool isImageTiled() const;
78 
83  virtual ossim_uint32 getImageTileWidth() const;
84 
89  virtual ossim_uint32 getImageTileHeight() const;
90 
92  virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& rect, ossim_uint32 resLevel);
93 
95  virtual ossimScalarType getOutputScalarType() const;
96 
98  virtual ossimIrect getImageRectangle(ossim_uint32 resLevel = 0) const;
99 
100 protected:
101 
104  {
105  public:
106  ossimTileFile() : overviewIsOpen(false) {}
107 
109  vector<ossimIrect> subImageRects; // one rect per resolution level
112  };
113 
115  void allocate();
116 
117  vector<ossimTileFile> m_tileFiles;
122 
123 #if USING_SUB_OVRS
124 public:
128  virtual bool buildOverview(
129  ossimImageHandlerOverviewCompressionType compressionType = OSSIM_OVERVIEW_COMPRESSION_NONE,
130  ossim_uint32 quality = 75,
132  bool includeFullResFlag=false);
133 
134  virtual bool openOverview();
135  virtual void closeOverview();
136 
139  virtual const ossimImageHandler* getOverview() const { return NULL; }
140 
143  virtual bool hasOverviews() const;
144 
148 
149 protected:
151  virtual void completeOpen();
152 
153  bool m_lockSubOvrs;
154 
155 #endif /* #if USING_SUB_OVRS */
156 
157 TYPE_DATA
158 };
159 
160 #endif /* #ifndef ossimTiledImageHandler_HEADER */
virtual bool open()=0
Pure virtual open.
ossimRefPtr< ossimImageHandler > imageHandler
#define OSSIMDLLEXPORT
virtual bool buildOverview(ossimImageHandlerOverviewCompressionType compressionType=OSSIM_OVERVIEW_COMPRESSION_NONE, ossim_uint32 quality=75, ossimFilterResampler::ossimFilterResamplerType resampleType=ossimFilterResampler::ossimFilterResampler_BOX, bool includeFullResFlag=false)
Will build over file for theImageFile.
Represents serializable keyword/value map.
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 const ossimImageHandler * getOverview() const
virtual void closeOverview()
If theOverview is initialized it will be deleted and set to NULL.
virtual bool openOverview()
Searches for an overview.
This class defines an abstract Handler which all image handlers(loaders) should derive from...
virtual ossim_uint32 getNumberOfDecimationLevels() const
This returns the total number of decimation levels.
virtual bool isOpen() const =0
Derived classes must implement this method to be concrete.
#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 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 ossim_uint32 getImageTileWidth() const =0
Returns the tile width of the image or 0 if the image is not tiled.
Class for record of one tile file:
virtual void completeOpen()
Will complete the opening process.
virtual bool isImageTiled() const
Indicates whether or not the image is tiled internally.
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...
ossimRefPtr< ossimImageData > m_blankTile
vector< ossimTileFile > m_tileFiles
virtual bool hasOverviews() const
virtual ossim_uint32 getNumberOfSamples(ossim_uint32 resLevel=0) const =0
Pure virtual, derived classes must implement.
virtual ossim_uint32 getNumberOfInputBands() const =0
ossimRefPtr< ossimImageData > m_tile
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)