LTIImageReader Class Reference

abstract class for implementing an image reader More...

#include <lti_imageReader.h>

Inheritance diagram for LTIImageReader:

Inheritance graph
[legend]
Collaboration diagram for LTIImageReader:

Collaboration graph
[legend]

List of all members.

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


Detailed Description

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.
Examples:

DerivedImageReader.cpp.

Definition at line 33 of file lti_imageReader.h.


Constructor & Destructor Documentation

LTIImageReader::LTIImageReader ( bool  supportBandSelection  )  [protected]


Member Function Documentation

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.

Parameters:
mag magnification to determine width at
width the image width at the magnification
height the image height at the magnification
Returns:
status code indicating success or failure

Implements LTIImage.

Reimplemented in Nitf::ImageReader.

virtual LTIMaskSource* LTIImageReader::getMask (  )  const [virtual]

Implements LTIImageStage.

virtual bool LTIImageReader::getPipelineInfo ( LTIPipelineInfo  info  )  const [virtual]

Implements LTIImageStage.

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.

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

Implements LTIImageStage.

Reimplemented in MrSIDSingleImageReaderBase.

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.

Parameters:
decodeScene the scene that would be given to read()
readerScene the scene that is the actual scene passed the underlying image reader
Returns:
true if readerScene is not empty

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.

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

Implements LTIImage.

Reimplemented in MrSIDSingleImageReaderBase.

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.

Parameters:
pixelProps the band selection
fullScene the full scene to be read
Returns:
status code indicating success or failure

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.

Parameters:
buffer the buffer to read the pixels into
stripScene the scene for this strip being decoded
Returns:
status code indicating success or failure

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.

Returns:
status code indicating success or failure

Reimplemented from LTIImageStage.

LT_STATUS LTIImageReader::init ( const LTIImage image = NULL  )  [protected]

LT_STATUS LTIImageReader::loadMetadataIntoObjects ( const LTIMetadataDatabase fileMetadata,
LTIPixel pixelProps,
bool  updatePixelProps,
bool  updateGeoCoord 
) [protected]

virtual const char* LTIImageReader::getSourceName ( void   )  const [protected, pure virtual]


Member Data Documentation

Definition at line 81 of file lti_imageReader.h.


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

LizardTech