MrSID Decode SDK for Raster Reference Manual  9.5.1.4427
MrSIDImageReaderInterface Class Referenceabstract

base class for MrSID image readers More...

#include <MrSIDImageReaderBase.h>

Inheritance diagram for MrSIDImageReaderInterface:
MrSIDImageReader MrSIDSingleImageReaderBase

Public Member Functions

virtual ~MrSIDImageReaderInterface ()
 
virtual lt_uint8 getNumLevels () const =0
 get number of resolution levels More...
 
virtual bool isLocked () const =0
 image encryption query More...
 
void setPasswordDelegate (MrSIDPasswordDelegate *passwordDelegate)
 set password handler More...
 
void setPassword (const lt_utf8 *password)
 set password handler More...
 
virtual void setMaxWorkerThreads (int numThreads)=0
 set the maximum number of worker threads More...
 
virtual int getMaxWorkerThreads () const =0
 get the maximum number of worker threads More...
 
LT_STATUS getMrSIDGeneration (lt_uint8 &gen, bool &raster) const
 get MrSID generation More...
 
LT_STATUS getMrSIDVersion (lt_uint8 &major, lt_uint8 &minor, lt_uint8 &tweak, char &letter) const
 get MrSID image version (for LizardTech internal use only) More...
 

Static Public Member Functions

static LT_STATUS getMrSIDGeneration (const LTFileSpec &fileSpec, lt_uint8 &gen, bool &raster)
 get MrSID generation More...
 
static LT_STATUS getMrSIDGeneration (LTIOStreamInf &stream, lt_uint8 &gen, bool &raster)
 get MrSID generation More...
 
static LT_STATUS getMrSIDGeneration (const lt_uint8 version[8], lt_uint8 &gen, bool &raster)
 get MrSID generation More...
 

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

virtual MrSIDImageReaderInterface::~MrSIDImageReaderInterface ( )
virtual
MrSIDImageReaderInterface::MrSIDImageReaderInterface ( )
protected

Member Function Documentation

static LT_STATUS MrSIDImageReaderInterface::getGeoCoordFromMetadata ( LTIMetadataDatabase metadata,
LTIGeoCoord geoCoord,
bool &  hasGeo 
)
staticprotected
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
LT_STATUS MrSIDImageReaderInterface::getMrSIDGeneration ( lt_uint8 gen,
bool &  raster 
) const

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 
)
staticprotected
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
void MrSIDImageReaderInterface::setPasswordDelegate ( MrSIDPasswordDelegate passwordDelegate)

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

lt_uint8 MrSIDImageReaderInterface::m_magic[8]
protected

Definition at line 253 of file MrSIDImageReaderBase.h.

MrSIDMemoryUsage MrSIDImageReaderInterface::m_memoryUsage
protected

Definition at line 251 of file MrSIDImageReaderBase.h.

MrSIDStreamUsage MrSIDImageReaderInterface::m_streamUsage
protected

Definition at line 252 of file MrSIDImageReaderBase.h.


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

LizardTech