OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimJpegTileSource.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: David Burken
8 //
9 // Description:
10 //
11 // Contains class declaration for JpegTileSource.
12 // JpegTileSource is derived from ImageHandler which is derived from
13 // TileSource.
14 //*******************************************************************
15 // $Id: ossimJpegTileSource.h 22117 2013-01-18 21:04:23Z dburken $
16 
17 #ifndef ossimJpegTileSource_HEADER
18 #define ossimJpegTileSource_HEADER
19 
22 
23 class ossimImageData;
24 
26 {
27 public:
28 
30 
32  const char* prefix=0);
33 
34  ossimJpegTileSource(const char* jpeg_file);
35 
36 
37  virtual ossimString getShortName() const;
38  virtual ossimString getLongName() const;
39 
46  ossim_uint32 resLevel=0);
47 
60  virtual bool getTile(ossimImageData* result, ossim_uint32 resLevel=0);
61 
66  virtual ossim_uint32 getNumberOfInputBands() const;
67 
73  virtual ossim_uint32 getNumberOfOutputBands()const;
74 
79  virtual ossim_uint32 getNumberOfLines(ossim_uint32 reduced_res_level = 0) const;
80 
85  virtual ossim_uint32 getNumberOfSamples(ossim_uint32 reduced_res_level = 0) const;
86 
91  virtual ossimIrect getImageRectangle(ossim_uint32 reduced_res_level = 0) const;
92 
97  virtual bool saveState(ossimKeywordlist& kwl,
98  const char* prefix=0)const;
99 
104  virtual bool loadState(const ossimKeywordlist& kwl,
105  const char* prefix=0);
106 
110  virtual ossimScalarType getOutputScalarType() const;
111 
115  virtual ossim_uint32 getTileWidth() const;
116 
120  virtual ossim_uint32 getTileHeight() const;
121 
128  virtual ossim_uint32 getImageTileWidth() const;
129 
136  virtual ossim_uint32 getImageTileHeight() const;
137 
138  bool isValidRLevel(ossim_uint32 reduced_res_level) const;
139 
140 
141  bool isOpen()const;
145  bool open(const ossimFilename& jpeg_file);
146  virtual void close();
147 
153  virtual ossimRefPtr<ossimProperty> getProperty(const ossimString& name)const;
154 
159  virtual void getPropertyNames(std::vector<ossimString>& propertyNames)const;
160 
167 
168 protected:
169 
175 
176  virtual ~ossimJpegTileSource();
177  class PrivateData;
187  virtual bool open();
188 
189  void allocate();
190  void destroy();
191  void restart();
192 
197  void fillTile(const ossimIrect& clip_rect, ossimImageData* tile);
198 
202  FILE* theFilePtr;
207 
209 
211 
212 TYPE_DATA
213 };
214 
215 #endif
virtual bool open()=0
Pure virtual open.
Represents serializable keyword/value map.
virtual ossim_uint32 getNumberOfOutputBands() const
Returns the number of bands in a tile returned from this TileSource.
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.
ossimRefPtr< ossimImageData > theTile
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 isValidRLevel(ossim_uint32 resLevel) const
Determines if the passed in reslution level is valid.
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...
ossimAppFixedTileCache::ossimAppFixedCacheId theCacheId
#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.
virtual ossimRefPtr< ossimImageGeometry > getInternalImageGeometry() const
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.
PrivateData * thePrivateData
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
ossimRefPtr< ossimImageData > theCacheTile
virtual ossim_uint32 getNumberOfSamples(ossim_uint32 resLevel=0) const =0
Pure virtual, derived classes must implement.
virtual ossim_uint32 getNumberOfInputBands() const =0
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)