MrSID Decode SDK for Raster Reference Manual  9.5.4.4709
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 
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 
280 
281 #endif // MRSIDIMAGEREADERBASE_H
representation of a scene
Definition: lti_scene.h:64
static LT_STATUS getGeoCoordFromMetadata(LTIMetadataDatabase &metadata, LTIGeoCoord &geoCoord, bool &hasGeo)
virtual void setMaxWorkerThreads(int numThreads)=0
set the maximum number of worker threads
virtual lt_uint32 getModifications(const LTIScene &scene) const
void setPassword(const lt_utf8 *password)
set password handler
#define LT_END_NAMESPACE(theNameSpace)
compiler does not support namespaces
Definition: lt_define.h:85
MrSIDSingleImageReaderBase(bool supportBandSelection)
virtual lt_int64 getEncodingCost(const LTIScene &scene) const
simple concrete delegate for locked MrSID images
void setPasswordDelegate(MrSIDPasswordDelegate *passwordDelegate)
set password handler
represents a geographic coordinate
Definition: lti_geoCoord.h:32
MrSIDMemoryUsage
LT_STATUS init(MrSIDImageStageManager *manager)
lt_uint32 LT_STATUS
An integral status code.
Definition: lt_status.h:39
LT_STATUS init(MrSIDMemoryUsage memoryUsage, MrSIDStreamUsage streamUsage, const lt_uint8 preamble[8])
lt_uint8 lt_utf8
(DEPRECATED)
Definition: lt_types.h:146
LT_STATUS getMrSIDVersion(lt_uint8 &major, lt_uint8 &minor, lt_uint8 &tweak, char &letter) const
get MrSID image version (for LizardTech internal use only)
virtual lt_uint8 getNumLevels() const =0
get number of resolution levels
Abstract definition of a stream.
Represents a file or directory path.
Definition: lt_fileSpec.h:39
class for storing metadata associated with an image
delegate for locked MrSID images
virtual int getMaxWorkerThreads() const =0
get the maximum number of worker threads
base class for MrSID image readers
static LT_STATUS getMrSIDGeneration(const LTFileSpec &fileSpec, lt_uint8 &gen, bool &raster)
get MrSID generation
static LTIOStreamInf * openWorldFileStream(const LTFileSpec &fileSpec, bool useWorldFile)
virtual bool isLocked() const =0
image encryption query
abstract class for implementing a geo image reader
MrSIDStreamUsage
MrSIDImageStageManager * m_manager
This file contains a number of enums, typedefs, etc, that are used throughout the MrSID SDK...
#define LT_BEGIN_NAMESPACE(theNameSpace)
compiler does not support namespaces
Definition: lt_define.h:84
unsigned int lt_uint32
unsigned 32-bit integer
Definition: lt_types.h:54
unsigned char lt_uint8
unsigned 8-bit integer
Definition: lt_types.h:46
virtual ~MrSIDImageReaderInterface()

LizardTech