MrSID Decode SDK for Raster Reference Manual 9.5.5.5244
MrSIDImageReaderBase.h
Go to the documentation of this file.
1//
2// This code is property of Celartem, Inc dba Extensis.
3// Copyright (c) 1995-2023. All rights reserved.
4// Use permitted only under license from Extensis.
5//
6/* PUBLIC */
7
8#ifndef MRSIDIMAGEREADERBASE_H
9#define MRSIDIMAGEREADERBASE_H
10
11// lt_lib_mrsid_core
12#include "lti_types.h"
13#include "lti_geoImageReader.h"
14
15LT_BEGIN_LIZARDTECH_NAMESPACE
16
18#ifdef LT_SUPPORT_ENCRYPTED_MRSIDS
21#endif
22
23
24/*
25 * memory settings for creating MrSID decoders
26 *
27 * "Small", "medium", and "large" refer to how much memory the
28 * decoder will use when opening the image and constructing certain
29 * internal data structures and tables. In general, decode
30 * performance will increase if more memory can be used.
31 */
33{
39};
40
41/*
42 * stream settings for creating MrSID decoders
43 *
44 * Normally, the stream used by the decoder is
45 * only opened when doing actual decode work, as resources like
46 * file handles can be a scarce resource in some environments. This
47 * obviously incurs a performance penalty; the "KeepStreamOpen" modes
48 * can be used to change the behaviour.
49 */
51{
56};
57
58
66{
67 LT_DISALLOW_COPY_CONSTRUCTOR(MrSIDImageReaderInterface);
68public:
70
80 virtual lt_uint8 getNumLevels() const = 0;
81
92 virtual bool isLocked() const = 0;
93
94#ifdef LT_SUPPORT_ENCRYPTED_MRSIDS
109
124 void setPassword(const lt_utf8* password);
125#endif
126
127public:
142 virtual void setMaxWorkerThreads(int numThreads) = 0;
143
155 virtual int getMaxWorkerThreads() const = 0;
156
157public:
172 static LT_STATUS getMrSIDGeneration(const LTFileSpec& fileSpec, lt_uint8& gen, bool &raster);
173
188 static LT_STATUS getMrSIDGeneration(LTIOStreamInf& stream, lt_uint8 &gen, bool &raster);
189
204 static LT_STATUS getMrSIDGeneration(const lt_uint8 version[8], lt_uint8& gen, bool &raster);
205
218 LT_STATUS getMrSIDGeneration(lt_uint8 &gen, bool &raster) const;
219
235 lt_uint8& tweak, char& letter) const;
236
237protected:
240 MrSIDStreamUsage streamUsage,
241 const lt_uint8 preamble[8]);
242
244 LTIGeoCoord &geoCoord,
245 bool &hasGeo);
246
248 bool useWorldFile);
249
253
254private:
255#ifdef LT_SUPPORT_ENCRYPTED_MRSIDS
256 MrSIDPasswordDelegate* m_pwdDelegate;
257 MrSIDSimplePasswordDelegate* m_localPwdDelegate;
258#endif
259};
260
261
264{
265 LT_DISALLOW_COPY_CONSTRUCTOR(MrSIDSingleImageReaderBase);
266public:
267 // LTIImageStage
268 virtual lt_int64 getEncodingCost(const LTIScene& scene) const;
269 virtual lt_uint32 getModifications(const LTIScene &scene) const;
270
271protected:
272 MrSIDSingleImageReaderBase(bool supportBandSelection);
274
276
278};
279
280LT_END_LIZARDTECH_NAMESPACE
281
282#endif // MRSIDIMAGEREADERBASE_H
This file contains a number of enums, typedefs, etc, that are used throughout the MrSID SDK.
lt_uint32 LT_STATUS
An integral status code.
Definition: lt_status.h:30
lt_uint8 lt_utf8
signed 8-bit integer
Definition: lt_types.h:130
unsigned char lt_uint8
unsigned 8-bit integer
Definition: lt_types.h:36
unsigned int lt_uint32
unsigned 32-bit integer
Definition: lt_types.h:44
long long int lt_int64
signed 64-bit integer
Definition: lt_types.h:57
MrSIDStreamUsage
@ MRSID_STREAM_USAGE_DEFAULT
@ MRSID_STREAM_USAGE_INVALID
@ MRSID_STREAM_USAGE_KEEPOPEN
@ MRSID_STREAM_USAGE_KEEPCLOSED
MrSIDMemoryUsage
@ MRSID_MEMORY_USAGE_INVALID
@ MRSID_MEMORY_USAGE_DEFAULT
@ MRSID_MEMORY_USAGE_MEDIUM
@ MRSID_MEMORY_USAGE_LARGE
@ MRSID_MEMORY_USAGE_SMALL
Represents a file or directory path.
Definition: lt_fileSpec.h:35
Abstract definition of a stream.
represents a geographic coordinate
Definition: lti_geoCoord.h:28
abstract class for implementing a geo image reader
class for storing metadata associated with an image
representation of a scene
Definition: lti_scene.h:60
base class for MrSID image readers
static LT_STATUS getGeoCoordFromMetadata(LTIMetadataDatabase &metadata, LTIGeoCoord &geoCoord, bool &hasGeo)
virtual int getMaxWorkerThreads() const =0
get the maximum number of worker threads
virtual bool isLocked() const =0
image encryption query
virtual void setMaxWorkerThreads(int numThreads)=0
set the maximum number of worker threads
static LT_STATUS getMrSIDGeneration(const lt_uint8 version[8], lt_uint8 &gen, bool &raster)
get MrSID generation
void setPasswordDelegate(MrSIDPasswordDelegate *passwordDelegate)
set password handler
static LTIOStreamInf * openWorldFileStream(const LTFileSpec &fileSpec, bool useWorldFile)
static LT_STATUS getMrSIDGeneration(const LTFileSpec &fileSpec, lt_uint8 &gen, bool &raster)
get MrSID generation
static LT_STATUS getMrSIDGeneration(LTIOStreamInf &stream, lt_uint8 &gen, bool &raster)
get MrSID generation
LT_STATUS getMrSIDVersion(lt_uint8 &major, lt_uint8 &minor, lt_uint8 &tweak, char &letter) const
get MrSID image version (for LizardTech internal use only)
LT_STATUS init(MrSIDMemoryUsage memoryUsage, MrSIDStreamUsage streamUsage, const lt_uint8 preamble[8])
virtual ~MrSIDImageReaderInterface()
virtual lt_uint8 getNumLevels() const =0
get number of resolution levels
void setPassword(const lt_utf8 *password)
set password handler
LT_STATUS getMrSIDGeneration(lt_uint8 &gen, bool &raster) const
get MrSID generation
LT_STATUS init(MrSIDImageStageManager *manager)
MrSIDImageStageManager * m_manager
MrSIDSingleImageReaderBase(bool supportBandSelection)
virtual lt_int64 getEncodingCost(const LTIScene &scene) const
get the cost to encode this scene
virtual lt_uint32 getModifications(const LTIScene &scene) const
get the modification bitfield for this image
delegate for locked MrSID images
simple concrete delegate for locked MrSID images

Extensis