MrSID Decode SDK for Raster Reference Manual
9.5.1.4427
|
abstract class for implementing an image reader More...
#include <lti_imageReader.h>
Public Member Functions | |
LT_STATUS | getDimsAtMag (double mag, lt_uint32 &width, lt_uint32 &height) const |
get image width and height at given magnification | |
virtual LTIMaskSource * | getMask () const |
virtual bool | getPipelineInfo (LTIPipelineInfo info) const |
lt_int64 | getEncodingCost (const LTIScene &scene) const |
get the cost to encode this scene | |
bool | getReaderScene (const LTIScene &decodeScene, LTIScene &readerScene) const |
get the underlying scene to be used | |
virtual lt_uint32 | getModifications (const LTIScene &scene) const |
get the modification bitfield for this image | |
LT_STATUS | readBegin (const LTIPixel &pixelProps, const LTIScene &fullScene) |
start strip-based read | |
LT_STATUS | readStrip (LTISceneBuffer &buffer, const LTIScene &stripScene) |
read a strip from the image | |
LT_STATUS | readEnd (void) |
finish strip-based read | |
Protected Member Functions | |
LTIImageReader (bool supportBandSelection) | |
LT_STATUS | init (const LTIImage *image=NULL) |
LT_STATUS | loadMetadataIntoObjects (const LTIMetadataDatabase &fileMetadata, LTIPixel &pixelProps, bool updatePixelProps, bool updateGeoCoord) |
virtual const char * | getSourceName (void) const =0 |
Protected Attributes | |
const bool | m_supportBandSelection |
The LTIImageReader abstract class extends the LTIImageStage so that it can be used as a decoder for an image format, i.e. the "end" of an image pipeline. This is the base class for such classes as the MrSIDImageReader.
Definition at line 33 of file lti_imageReader.h.
LTIImageReader::LTIImageReader | ( | bool | supportBandSelection | ) | [protected] |
LT_STATUS LTIImageReader::getDimsAtMag | ( | double | mag, |
lt_uint32 & | width, | ||
lt_uint32 & | height | ||
) | const [virtual] |
This function returns the width and height of the image, in pixels, relative to the given magnification.
mag | magnification to determine width at |
width | the image width at the magnification |
height | the image height at the magnification |
Implements LTIImage.
Reimplemented in Nitf::ImageReader.
lt_int64 LTIImageReader::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.
scene | the scene to be charged for |
Implements LTIImageStage.
Reimplemented in MrSIDSingleImageReaderBase.
virtual LTIMaskSource* LTIImageReader::getMask | ( | ) | const [virtual] |
Implements LTIImageStage.
virtual lt_uint32 LTIImageReader::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.
scene | the area pertaining to this request |
Implements LTIImage.
Reimplemented in MrSIDSingleImageReaderBase.
virtual bool LTIImageReader::getPipelineInfo | ( | LTIPipelineInfo | info | ) | const [virtual] |
Implements LTIImageStage.
bool LTIImageReader::getReaderScene | ( | const LTIScene & | decodeScene, |
LTIScene & | readerScene | ||
) | const [virtual] |
Get the scene that will be sent to the underlying LTIImageReader. This is useful in some complex pipelines.
decodeScene | the scene that would be given to read() |
readerScene | the scene that is the actual scene passed the underlying image reader |
Implements LTIImageStage.
virtual const char* LTIImageReader::getSourceName | ( | void | ) | const [protected, pure virtual] |
Implemented in LTIRawImageReader, and Nitf::ImageReader.
LT_STATUS LTIImageReader::init | ( | const LTIImage * | image = NULL | ) | [protected] |
LT_STATUS LTIImageReader::loadMetadataIntoObjects | ( | const LTIMetadataDatabase & | fileMetadata, |
LTIPixel & | pixelProps, | ||
bool | updatePixelProps, | ||
bool | updateGeoCoord | ||
) | [protected] |
LT_STATUS LTIImageReader::readBegin | ( | const LTIPixel & | pixelProps, |
const LTIScene & | fullScene | ||
) | [virtual] |
This function is called by read() before readStrip() is called. It should not be called directly except in certain rare circumstances.
Derived classes should not override.
pixelProps | the band selection |
fullScene | the full scene to be read |
Reimplemented from LTIImageStage.
LT_STATUS LTIImageReader::readEnd | ( | void | ) | [virtual] |
This function is called by read() after readStrip() is called. It should not be called directly except in certain rare circumstances.
Derived classes should not override.
Reimplemented from LTIImageStage.
LT_STATUS LTIImageReader::readStrip | ( | LTISceneBuffer & | buffer, |
const LTIScene & | stripScene | ||
) | [virtual] |
This function decodes a scene from the image and puts the pixels into the given buffer. It is called by read(), and should not be called directly except in certain rare circumstances.
The scene must lie within the boundaries of the image.
Derived classes should not override this method.
Derived classes should use the progress and interrupt delegates when the read operation can be expected to take a significant amount of time to complete.
buffer | the buffer to read the pixels into |
stripScene | the scene for this strip being decoded |
Reimplemented from LTIImageStage.
const bool LTIImageReader::m_supportBandSelection [protected] |
Definition at line 81 of file lti_imageReader.h.