OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimOpjJp2Reader.h
Go to the documentation of this file.
1 //----------------------------------------------------------------------------
2 //
3 // License: See top level LICENSE.txt file
4 //
5 // Author: David Burken
6 //
7 // Description: OSSIM Open JPEG JP2 reader (tile source).
8 //
9 // http://www.openjpeg.org/
10 //
11 //----------------------------------------------------------------------------
12 // $Id$
13 
14 #ifndef ossimOpjJp2Reader_HEADER
15 #define ossimOpjJp2Reader_HEADER 1
16 
19 #include <vector>
20 
21 // Forward class declarations.
22 class ossimImageData;
23 class ossimJ2kCodRecord;
24 
26 {
27 public:
28 
30  enum
31  {
34  };
35 
37  {
39  };
40 
43 
45  virtual ~ossimOpjJp2Reader();
46 
48  virtual ossimString getShortName() const;
49 
51  virtual ossimString getLongName() const;
52 
54  virtual ossimString getClassName() const;
55 
62  ossim_uint32 resLevel=0);
63 
68  virtual ossim_uint32 getNumberOfInputBands() const;
69 
75  virtual ossim_uint32 getNumberOfOutputBands()const;
76 
87 
92  virtual ossim_uint32 getNumberOfLines(ossim_uint32 reduced_res_level = 0) const;
93 
98  virtual ossim_uint32 getNumberOfSamples(ossim_uint32 reduced_res_level = 0) const;
99 
104  virtual ossimIrect getImageRectangle(ossim_uint32 reduced_res_level = 0) const;
105 
110  virtual bool saveState(ossimKeywordlist& kwl,
111  const char* prefix=0)const;
112 
117  virtual bool loadState(const ossimKeywordlist& kwl,
118  const char* prefix=0);
119 
123  virtual ossimScalarType getOutputScalarType() const;
124 
131  virtual ossim_uint32 getImageTileWidth() const;
132 
139  virtual ossim_uint32 getImageTileHeight() const;
140 
141  virtual bool isOpen()const;
142 
143  virtual double getMaxPixelValue(ossim_uint32 band = 0)const;
144 
149  virtual bool open();
150 
152  virtual void close();
153 
160 
161 protected:
180  virtual bool getOverviewTile(ossim_uint32 resLevel,
181  ossimImageData* result);
182 
183 private:
184 
189 
194 
199 
205 
206  // Cleans memory. Called on close or destruct.
207  void destroy();
208 
209 
210  bool initSizRecord( std::istream* str,
211  ossimJ2kSizRecord& sizRecord) const;
212 
213  bool initCodRecord( std::istream* str,
214  ossimJ2kCodRecord& sizRecord) const;
215 
219  void allocate();
220 
222 
227  ossim_int32 m_format; // OPJ_CODEC_FORMAT
228 
229 TYPE_DATA
230 };
231 
232 #endif
void allocate()
Initializes tiles.
virtual ossimRefPtr< ossimImageGeometry > getImageGeometryFromGeotiffBox()
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.
std::basic_ifstream< char > ifstream
Class for char input file streams.
Definition: ossimIosFwd.h:44
virtual ossimScalarType getOutputScalarType() const
Returns the output pixel type of the tile source.
virtual ossim_uint32 getNumberOfInputBands() const
Returns the number of bands in the image.
virtual ossimString getLongName() const
virtual ossimRefPtr< ossimImageData > getTile(const ossimIrect &rect, ossim_uint32 resLevel=0)
Returns a pointer to a tile given an origin representing the upper left corner of the tile to grab fr...
virtual double getMaxPixelValue(ossim_uint32 band=0) const
Returns the max pixel of the band.
virtual void close()
close method
virtual ossimString getShortName() const
ossimRefPtr< ossimImageData > m_tile
virtual ossimIrect getImageRectangle(ossim_uint32 reduced_res_level=0) const
Returns the zero based image rectangle for the reduced resolution data set (rrds) passed in...
virtual ossim_uint32 getNumberOfDecimationLevels() const
Returns the number of decimation levels.
virtual ossimRefPtr< ossimImageGeometry > getImageGeometry()
Returns the image geometry object associated with this tile source or NULL if non defined...
virtual ossim_uint32 getImageTileHeight() const
Returns the tile width of the image or 0 if the image is not tiled.
virtual ossimString getClassName() const
bool initSizRecord(std::istream *str, ossimJ2kSizRecord &sizRecord) const
virtual ~ossimOpjJp2Reader()
virtual destructor
virtual ossimRefPtr< ossimImageGeometry > getInternalImageGeometry()
bool initCodRecord(std::istream *str, ossimJ2kCodRecord &sizRecord) const
ossim_uint32 m_minDwtLevels
#define TYPE_DATA
Definition: ossimRtti.h:339
unsigned int ossim_uint32
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of an object to a keyword list.
virtual ossim_uint32 getImageTileWidth() const
Returns the tile width of the image or 0 if the image is not tiled.
virtual ossim_uint32 getNumberOfOutputBands() const
Returns the number of bands in a tile returned from this TileSource.
ossimScalarType
ossimRefPtr< ossimImageData > m_cacheTile
std::basic_istream< char > istream
Base class for char input streams.
Definition: ossimIosFwd.h:20
This class defines an abstract Handler which all image handlers(loaders) should derive from...
virtual bool open()
open method.
ossimJ2kSizRecord m_sizRecord
ossimOpjJp2Reader()
default constructor
virtual bool isOpen() const
Derived classes must implement this method to be concrete.
virtual ossim_uint32 getNumberOfLines(ossim_uint32 reduced_res_level=0) const
Returns the number of lines in the image.
ossimRefPtr< ossimImageGeometry > getMetadataImageGeometry() const
virtual bool getOverviewTile(ossim_uint32 resLevel, ossimImageData *result)
Gets an overview tile.
std::ifstream * m_str
virtual ossim_uint32 getNumberOfSamples(ossim_uint32 reduced_res_level=0) const
Returns the number of samples in the image.
virtual ossimRefPtr< ossimImageGeometry > getImageGeometryFromGmlBox()
int ossim_int32