MrSID Decode SDK for Raster Reference Manual  9.5.1.4427
MrSIDImageReaderBase.h
Go to the documentation of this file.
1 /* $Id$ */
2 /* //////////////////////////////////////////////////////////////////////////
3 // //
4 // This code is Copyright (c) 2004 LizardTech, Inc, 1008 Western Avenue, //
5 // Suite 200, Seattle, WA 98104. Unauthorized use or distribution //
6 // prohibited. Access to and use of this code is permitted only under //
7 // license from LizardTech, Inc. Portions of the code are protected by //
8 // US and foreign patents and other filings. All Rights Reserved. //
9 // //
11 /* PUBLIC */
12 
13 #ifndef MRSIDIMAGEREADERBASE_H
14 #define MRSIDIMAGEREADERBASE_H
15 
16 // lt_lib_mrsid_core
17 #include "lti_types.h"
18 #include "lti_geoImageReader.h"
19 
20 LT_BEGIN_NAMESPACE(LizardTech)
21 
25 
26 
27 /*
28  * memory settings for creating MrSID decoders
29  *
30  * "Small", "medium", and "large" refer to how much memory the
31  * decoder will use when opening the image and constructing certain
32  * internal data structures and tables. In general, decode
33  * performance will increase if more memory can be used.
34  */
36 {
42 };
43 
44 /*
45  * stream settings for creating MrSID decoders
46  *
47  * Normally, the stream used by the decoder is
48  * only opened when doing actual decode work, as resources like
49  * file handles can be a scarce resource in some environments. This
50  * obviously incurs a performance penalty; the "KeepStreamOpen" modes
51  * can be used to change the behaviour.
52  */
54 {
59 };
60 
61 
69 {
70  LT_DISALLOW_COPY_CONSTRUCTOR(MrSIDImageReaderInterface);
71 public:
73 
83  virtual lt_uint8 getNumLevels() const = 0;
84 
95  virtual bool isLocked() const = 0;
96 
110  void setPasswordDelegate(MrSIDPasswordDelegate* passwordDelegate);
111 
126  void setPassword(const lt_utf8* password);
127 
128 public:
143  virtual void setMaxWorkerThreads(int numThreads) = 0;
144 
156  virtual int getMaxWorkerThreads() const = 0;
157 
158 public:
173  static LT_STATUS getMrSIDGeneration(const LTFileSpec& fileSpec, lt_uint8& gen, bool &raster);
174 
189  static LT_STATUS getMrSIDGeneration(LTIOStreamInf& stream, lt_uint8 &gen, bool &raster);
190 
205  static LT_STATUS getMrSIDGeneration(const lt_uint8 version[8], lt_uint8& gen, bool &raster);
206 
219  LT_STATUS getMrSIDGeneration(lt_uint8 &gen, bool &raster) const;
220 
236  lt_uint8& tweak, char& letter) const;
237 
238 protected:
240  LT_STATUS init(MrSIDMemoryUsage memoryUsage,
241  MrSIDStreamUsage streamUsage,
242  const lt_uint8 preamble[8]);
243 
245  LTIGeoCoord &geoCoord,
246  bool &hasGeo);
247 
248  static LTIOStreamInf *openWorldFileStream(const LTFileSpec &fileSpec,
249  bool useWorldFile);
250 
254 
255 private:
256  MrSIDPasswordDelegate* m_pwdDelegate;
257  MrSIDSimplePasswordDelegate* m_localPwdDelegate;
258 };
259 
260 
263 {
264  LT_DISALLOW_COPY_CONSTRUCTOR(MrSIDSingleImageReaderBase);
265 public:
266  // LTIImageStage
267  virtual lt_int64 getEncodingCost(const LTIScene& scene) const;
268  virtual lt_uint32 getModifications(const LTIScene &scene) const;
269 
270 protected:
271  MrSIDSingleImageReaderBase(bool supportBandSelection);
273 
275 
277 };
278 
279 LT_END_NAMESPACE(LizardTech)
280 
281 #endif // MRSIDIMAGEREADERBASE_H

LizardTech