MrSIDImageReader Class Reference

reader for MrSID images (MG2, MG3 and MG4) More...

#include <MrSIDImageReader.h>

Inheritance diagram for MrSIDImageReader:

Inheritance graph
[legend]
Collaboration diagram for MrSIDImageReader:

Collaboration graph
[legend]

List of all members.

Public Member Functions

LT_STATUS initialize (const LTFileSpec &fileSpec, bool useWorldFile=false, MrSIDMemoryUsage memoryUsage=MRSID_MEMORY_USAGE_DEFAULT, MrSIDStreamUsage streamUsage=MRSID_STREAM_USAGE_DEFAULT)
 initializer
LT_STATUS initialize (LTIOStreamInf *stream, LTIOStreamInf *worldFileStream=NULL, MrSIDMemoryUsage memoryUsage=MRSID_MEMORY_USAGE_DEFAULT, MrSIDStreamUsage streamUsage=MRSID_STREAM_USAGE_DEFAULT)
 initializer
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
lt_uint8 getNumLevels (void) const
 get number of resolution levels
bool isLocked (void) const
 image encryption query
void setMaxWorkerThreads (int numThreads)
 set the maximum number of worker threads
int getMaxWorkerThreads () const
 get the maximum number of worker threads
const MrSIDImageStageManagergetManager (void) const
const LTIMosaicFiltergetMosaicFilter (void) const
const MG2ImageReader * getMG2ImageReader (void) const
const MG3SingleImageReader * getMG3ImageReader (void) const
const MG4SingleImageReader * getMG4ImageReader (void) const

Static Public Member Functions

static MrSIDImageReadercreate (void)

Protected Member Functions

 MrSIDImageReader (void)
virtual ~MrSIDImageReader (void)
LT_STATUS protectedInit (LTIOStreamInf *worldfile, bool deleteImages)

Protected Attributes

MrSIDImageStageManagerm_manager
LTIMosaicFilterm_mosaicFilter
MrSIDSingleImageReaderBasem_mrsidReader
lt_uint8 m_numLevels
bool m_isLocked


Detailed Description

This class supports reading MrSID/MG2, MrSID/MG3, and MrSID/MG4 raster images, including MG3 and MG4 composites.
Examples:

DecodeMrSIDBandSelection.cpp, DecodeMrSIDToMemory.cpp, DecodeMrSIDToRaw.cpp, DecodeMrSIDToTIFF.cpp, ErrorHandling.cpp, GeoScene.cpp, ImageInfo.cpp, InterruptDelegate.cpp, MetadataDump.cpp, ProgressDelegate.cpp, and SceneBuffer.cpp.

Definition at line 35 of file MrSIDImageReader.h.


Constructor & Destructor Documentation

MrSIDImageReader::MrSIDImageReader ( void   )  [protected]

virtual MrSIDImageReader::~MrSIDImageReader ( void   )  [protected, virtual]


Member Function Documentation

static MrSIDImageReader* MrSIDImageReader::create ( void   )  [static]

LT_STATUS MrSIDImageReader::initialize ( const LTFileSpec fileSpec,
bool  useWorldFile = false,
MrSIDMemoryUsage  memoryUsage = MRSID_MEMORY_USAGE_DEFAULT,
MrSIDStreamUsage  streamUsage = MRSID_STREAM_USAGE_DEFAULT 
)

Construct a MrSID reader from the given file.

Parameters:
fileSpec file containing MrSID image
useWorldFile incorporate world file data when reading image
memoryUsage control memory resource usage
streamUsage control stream resource usage
Examples:
DecodeMrSIDBandSelection.cpp, DecodeMrSIDToMemory.cpp, DecodeMrSIDToRaw.cpp, DecodeMrSIDToTIFF.cpp, ErrorHandling.cpp, GeoScene.cpp, ImageInfo.cpp, InterruptDelegate.cpp, MetadataDump.cpp, ProgressDelegate.cpp, and SceneBuffer.cpp.

LT_STATUS MrSIDImageReader::initialize ( LTIOStreamInf stream,
LTIOStreamInf worldFileStream = NULL,
MrSIDMemoryUsage  memoryUsage = MRSID_MEMORY_USAGE_DEFAULT,
MrSIDStreamUsage  streamUsage = MRSID_STREAM_USAGE_DEFAULT 
)

Construct a MrSID reader from the given stream.

Parameters:
stream stream containing MrSID image (may not be NULL)
worldFileStream stream containing world file data (may be NULL)
memoryUsage control memory resource usage
streamUsage control stream resource usage

virtual lt_int64 MrSIDImageReader::getEncodingCost ( const LTIScene scene  )  const [virtual]

Returns the "cost" to encode this scene, for use by those image writers which have usage metering enabled. The typical cost is equal to the nominal image size (width * height * numBands * bytesPerSample), but this is overridden for special situations, e.g. the mosaic filter.

Parameters:
scene the scene to be charged for
Returns:
the cost to encode the given scene

Reimplemented from LTIImageFilter.

virtual lt_uint32 MrSIDImageReader::getModifications ( const LTIScene scene  )  const [virtual]

This function returns a bitfield describing what kinds of modifications have been made to the image during and since its initial encoding.

Parameters:
scene the area pertaining to this request
Returns:
a bitfield itemizing the encoding modifications

Reimplemented from LTIImageFilter.

lt_uint8 MrSIDImageReader::getNumLevels ( void   )  const [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

Implements MrSIDImageReaderInterface.

bool MrSIDImageReader::isLocked ( void   )  const [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

Implements MrSIDImageReaderInterface.

void MrSIDImageReader::setMaxWorkerThreads ( int  numThreads  )  [virtual]

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

Parameters:
numThreads the 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.

Implements MrSIDImageReaderInterface.

Examples:
DecodeMrSIDToMemory.cpp.

int MrSIDImageReader::getMaxWorkerThreads (  )  const [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

Implements MrSIDImageReaderInterface.

const MrSIDImageStageManager& MrSIDImageReader::getManager ( void   )  const

const LTIMosaicFilter* MrSIDImageReader::getMosaicFilter ( void   )  const

const MG2ImageReader* MrSIDImageReader::getMG2ImageReader ( void   )  const

const MG3SingleImageReader* MrSIDImageReader::getMG3ImageReader ( void   )  const

const MG4SingleImageReader* MrSIDImageReader::getMG4ImageReader ( void   )  const

LT_STATUS MrSIDImageReader::protectedInit ( LTIOStreamInf worldfile,
bool  deleteImages 
) [protected]


Member Data Documentation

Definition at line 95 of file MrSIDImageReader.h.

Definition at line 96 of file MrSIDImageReader.h.

Definition at line 97 of file MrSIDImageReader.h.

Definition at line 98 of file MrSIDImageReader.h.

bool MrSIDImageReader::m_isLocked [protected]

Definition at line 99 of file MrSIDImageReader.h.


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

LizardTech