MrSID Decode SDK for Raster Reference Manual  9.5.4.4709
MrSIDImageReaderInterface Class Reference

base class for MrSID image readers More...

#include <MrSIDImageReaderBase.h>

Inheritance diagram for MrSIDImageReaderInterface:
MrSIDImageReader MrSIDSingleImageReaderBase

List of all members.

Public Member Functions

virtual ~MrSIDImageReaderInterface ()
virtual lt_uint8 getNumLevels () const =0
 get number of resolution levels
virtual bool isLocked () const =0
 image encryption query
void setPasswordDelegate (MrSIDPasswordDelegate *passwordDelegate)
 set password handler
void setPassword (const lt_utf8 *password)
 set password handler
virtual void setMaxWorkerThreads (int numThreads)=0
 set the maximum number of worker threads
virtual int getMaxWorkerThreads () const =0
 get the maximum number of worker threads
LT_STATUS getMrSIDGeneration (lt_uint8 &gen, bool &raster) const
 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)

Static Public Member Functions

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
static LT_STATUS getMrSIDGeneration (const lt_uint8 version[8], lt_uint8 &gen, bool &raster)
 get MrSID generation

Protected Member Functions

 MrSIDImageReaderInterface ()
LT_STATUS init (MrSIDMemoryUsage memoryUsage, MrSIDStreamUsage streamUsage, const lt_uint8 preamble[8])

Static Protected Member Functions

static LT_STATUS getGeoCoordFromMetadata (LTIMetadataDatabase &metadata, LTIGeoCoord &geoCoord, bool &hasGeo)
static LTIOStreamInfopenWorldFileStream (const LTFileSpec &fileSpec, bool useWorldFile)

Protected Attributes

MrSIDMemoryUsage m_memoryUsage
MrSIDStreamUsage m_streamUsage
lt_uint8 m_magic [8]

Detailed Description

All the MrSID image readers (MrSIDImageReader, MG2ImageReader and MG3ImageReader) inherit from this class.

Definition at line 68 of file MrSIDImageReaderBase.h.


Constructor & Destructor Documentation


Member Function Documentation

static LT_STATUS MrSIDImageReaderInterface::getGeoCoordFromMetadata ( LTIMetadataDatabase metadata,
LTIGeoCoord geoCoord,
bool &  hasGeo 
) [static, protected]
virtual int MrSIDImageReaderInterface::getMaxWorkerThreads ( ) const [pure virtual]

This function gets the maximun number of worker threads that can be used during a decode request.

See also:
setMaxWorkerThreads() for details.
Returns:
the maximum number of worker threads that may be used

Implemented in MrSIDImageReader.

static LT_STATUS MrSIDImageReaderInterface::getMrSIDGeneration ( const LTFileSpec fileSpec,
lt_uint8 gen,
bool &  raster 
) [static]

Returns the MrSID generation number for a specific MrSID image. This is a static function, which is passed a filename.

The gen value returned will be 2 (for MrSID/MG2), 3 (for MrSID/MG3), 4 (for MrSID/MG4) or 0 (if error).

Parameters:
fileSpecthe file to get the version of
genthe MrSID generation
rasteris the file raster or point cloud?
Returns:
status code indicating success or failure
static LT_STATUS MrSIDImageReaderInterface::getMrSIDGeneration ( LTIOStreamInf stream,
lt_uint8 gen,
bool &  raster 
) [static]

Returns the MrSID generation number for a specific MrSID image. This is a static function, which is passed a stream.

The gen value returned will be 2 (for MrSID/MG2), 3 (for MrSID/MG3), 4 (for MrSID/MG4) or 0 (if error).

Parameters:
streamthe file to get the version of
genthe MrSID generation
rasteris the file raster or point cloud?
Returns:
status code indicating success or failure
static LT_STATUS MrSIDImageReaderInterface::getMrSIDGeneration ( const lt_uint8  version[8],
lt_uint8 gen,
bool &  raster 
) [static]

Returns the MrSID generation number for a specific MrSID image. This is a static function, which is passed an 8-byte buffer.

The gen value returned will be 2 (for MrSID/MG2), 3 (for MrSID/MG3), 4 (for MrSID/MG4) or 0 (if error).

Parameters:
versionthe full version signature (1st 8 bytes of the file)
genthe MrSID generation
rasteris the file raster or point cloud?
Returns:
status code indicating success or failure

Returns the MrSID generation number for the image.

The gen value returned will be 2 (for MrSID/MG2), 3 (for MrSID/MG3), 4 (for MrSID/MG4) or 0 (if error).

Parameters:
genthe major version number
rasteris the file raster or point cloud?
Returns:
status code indicating success or failure
LT_STATUS MrSIDImageReaderInterface::getMrSIDVersion ( lt_uint8 major,
lt_uint8 minor,
lt_uint8 tweak,
char &  letter 
) const

Returns detailed version information for the MrSID image. Typical version numbers will be 1.0.1 for MG2 (the letter value is not used), 3.0.26.q for MG3, 3.4.0.a for MG4 raster, and 4.0.0.a for MG4 lidar. To avoid confusion, developers should avoid interpreting the meaning of this number, but rather use getMrSIDGeneration().

Parameters:
majorthe major version number
minorthe minor version number
tweakthe revision number
letterthe revision build number (not used by MG2)
virtual lt_uint8 MrSIDImageReaderInterface::getNumLevels ( ) const [pure virtual]

Returns the number of resolution levels supported by the image. This value returned corresponds to the LTIImage::getMinMagnification() function.

Returns:
the number of resolution levels in the MrSID image

Implemented in MrSIDImageReader.

LT_STATUS MrSIDImageReaderInterface::init ( MrSIDMemoryUsage  memoryUsage,
MrSIDStreamUsage  streamUsage,
const lt_uint8  preamble[8] 
) [protected]
virtual bool MrSIDImageReaderInterface::isLocked ( ) const [pure virtual]

Returns true iff the image is password-protected. If the image is locked, the setPasswordDelegate() or setPassword() function must be used to provide the decoder with information to decrypt the image as decode requests are processed.

Returns:
true, if image is password-protected

Implemented in MrSIDImageReader.

static LTIOStreamInf* MrSIDImageReaderInterface::openWorldFileStream ( const LTFileSpec fileSpec,
bool  useWorldFile 
) [static, protected]
virtual void MrSIDImageReaderInterface::setMaxWorkerThreads ( int  numThreads) [pure virtual]

This function sets the maximum number of worker threads that can be used during a decode request.

Parameters:
numThreadsthe maximum number of threads to use, including the calling thread numThreads < 1 defaults to the number of logical cores
Note:
: The internal decoder may use fewer threads. For example, MG2 does not use wroker threads.
: The internal decoder may limit the number of threads to the number of logical core on the system.

Implemented in MrSIDImageReader.

void MrSIDImageReaderInterface::setPassword ( const lt_utf8 password)

This function is set the password used by the decoder logic to decode the image, if one is needed.

The password must be set prior to performing any decode (read) requests; for more flexibility, the setPasswordDelegate() function may be used.

See the isLocked() function for more details.

Parameters:
passwordthe password for the image

This function is used to set up a password delegate, which will be automatically called form within the internal decoder logic to obtain a text password, if one is needed for decoded the image.

Alternatively, the more direct setPassword() function may be used.

See the isLocked() function for more details.

Parameters:
passwordDelegatethe delegate to be called

Member Data Documentation

Definition at line 253 of file MrSIDImageReaderBase.h.


The documentation for this class was generated from the following file: