MrSID Decode SDK for Raster Reference Manual 9.5.4.4709

- Main Page
- Namespaces
- Classes
- Files
- Examples

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
LTIImageReader Class Referenceabstract

abstract class for implementing an image reader More...

`#include <lti_imageReader.h>`

Inheritance diagram for LTIImageReader:
[legend]
Collaboration diagram for LTIImageReader:
[legend]

## Public Member Functions
LT_STATUS | getDimsAtMag (double mag, lt_uint32 &width, lt_uint32 &height) const
| get image width and height at given magnification More...
lt_uint32 | getModifications (const LTIScene &scene) const
| get the modification bitfield for this image More...
LT_STATUS | getMetadataBlob (const char *type, LTIOStreamInf *&stream) const
| extract the metadata associated with the image of the given type More...
LTIMaskSource * | getMask () const
bool | getPipelineInfo (LTIPipelineInfo info) const
lt_int64 | getEncodingCost (const LTIScene &scene) const
| get the cost to encode this scene More...
bool | getReaderScene (const LTIScene &decodeScene, LTIScene &readerScene) const
| get the underlying scene to be used More...
LT_STATUS | readBegin (const LTIPixel &pixelProps, const LTIScene &fullScene)
| start strip-based read More...
LT_STATUS | readStrip (LTISceneBuffer &buffer, const LTIScene &stripScene)
| read a strip from the image More...
LT_STATUS | readEnd (void)
| finish strip-based read More...
Public Member Functions inherited from LTIOverrideDimensions< LTIOverridePixelProps< LTIOverrideBackgroundPixel< LTIOverrideGeoCoord< LTIOverrideMagnification< LTIOverrideIsSelective< LTIOverrideStripHeight< LTIOverrideDelegates< LTIOverridePixelLookupTables< LTIOverrideMetadata< LTIImageStage > > > > > > > > > >
lt_uint32 | getWidth () const
| get image width More...
lt_uint32 | getHeight () const
| get image height More...
Public Member Functions inherited from LTIOverridePixelProps< LTIOverrideBackgroundPixel< LTIOverrideGeoCoord< LTIOverrideMagnification< LTIOverrideIsSelective< LTIOverrideStripHeight< LTIOverrideDelegates< LTIOverridePixelLookupTables< LTIOverrideMetadata< LTIImageStage > > > > > > > > >
const LTIPixel & | getPixelProps () const
| get the pixel properties of the image More...
const LTIPixel & | getMinDynamicRange () const
| get the minimum dynamic range value of image More...
const LTIPixel & | getMaxDynamicRange () const
| get the maximum dynamic range value of image More...
LT_STATUS | overridePixelBPS (lt_uint8 bps)
| override the bits-per-sample of the image's (sample's) datatype More...
LT_STATUS | overrideDynamicRange (const LTIPixel &drmin, const LTIPixel &drmax)
| override the dynamic range of the image More...
Public Member Functions inherited from LTIOverrideBackgroundPixel< LTIOverrideGeoCoord< LTIOverrideMagnification< LTIOverrideIsSelective< LTIOverrideStripHeight< LTIOverrideDelegates< LTIOverridePixelLookupTables< LTIOverrideMetadata< LTIImageStage > > > > > > > >
const LTIPixel * | getBackgroundPixel () const
| get the values of the background pixel More...
const LTIPixel * | getNoDataPixel () const
| get the values of the "no data" (transparency) pixel More...
LT_STATUS | overrideBackgroundPixel (const LTIPixel *backgroundPixel)
| override the background color of the image More...
LT_STATUS | overrideNoDataPixel (const LTIPixel *nodataPixel)
| override the "no data" (transparency) color of the image More...
Public Member Functions inherited from LTIOverrideGeoCoord< LTIOverrideMagnification< LTIOverrideIsSelective< LTIOverrideStripHeight< LTIOverrideDelegates< LTIOverridePixelLookupTables< LTIOverrideMetadata< LTIImageStage > > > > > > >
const LTIGeoCoord & | getGeoCoord () const
| get the geographic coordinates of the image More...
bool | isGeoCoordImplicit () const
| is geo information "real" or not More...
LT_STATUS | overrideGeoCoord (const LTIGeoCoord &geoCoord)
| override the geographic coordinates of the image More...
Public Member Functions inherited from LTIOverrideMagnification< LTIOverrideIsSelective< LTIOverrideStripHeight< LTIOverrideDelegates< LTIOverridePixelLookupTables< LTIOverrideMetadata< LTIImageStage > > > > > >
double | getMinMagnification () const
| get the minimum magnification More...
double | getMaxMagnification () const
| get the maximum magnification More...
Public Member Functions inherited from LTIOverrideIsSelective< LTIOverrideStripHeight< LTIOverrideDelegates< LTIOverridePixelLookupTables< LTIOverrideMetadata< LTIImageStage > > > > >
bool | isSelective () const
| check if image supports "random access" decoding More...
Public Member Functions inherited from LTIOverrideStripHeight< LTIOverrideDelegates< LTIOverridePixelLookupTables< LTIOverrideMetadata< LTIImageStage > > > >
lt_uint32 | getStripHeight () const
| get strip height More...
LT_STATUS | setStripHeight (lt_uint32 stripHeight)
| set the strip height More...
Public Member Functions inherited from LTIOverrideDelegates< LTIOverridePixelLookupTables< LTIOverrideMetadata< LTIImageStage > > >
void | setProgressDelegate (LTIProgressDelegate *delegate)
| set progress delegate More...
LTIProgressDelegate * | getProgressDelegate () const
| get progress delegate More...
void | setInterruptDelegate (LTIInterruptDelegate *delegate)
| set interrupt delegate More...
LTIInterruptDelegate * | getInterruptDelegate () const
| get interrupt delegate More...
Public Member Functions inherited from LTIOverridePixelLookupTables< LTIOverrideMetadata< LTIImageStage > >
const LTIPixelLookupTable * | getPixelLookupTable () const
| get the color lookup table, if any More...
LT_STATUS | overridePixelLookupTable (const LTIPixelLookupTable *pixelLookupTable)
| override the CLUT of the image More...
Public Member Functions inherited from LTIOverrideMetadata< LTIImageStage >
const LTIMetadataDatabase & | getMetadata () const
| get the metadata associated with the image More...
LT_STATUS | overrideMetadata (const LTIMetadataDatabase &metadata)
| override the metadata of the image More...
Public Member Functions inherited from LTIImageStage
LT_STATUS | read (const LTIScene &scene, LTISceneBuffer &buffer)
| read (decode) a scene from the image More...
lt_uint32 | getNumStrips () const
| get number of strips in scene More...
LTIScene | getStripScene (lt_uint32 stripNumber) const
| get a strip for current scene More...
Public Member Functions inherited from LTIImage
lt_uint16 | getNumBands () const
| get number of bands More...
lt_uint16 | getNumBandsWithoutAlpha () const
| get number of bands without alpha More...
LTIColorSpace | getColorSpace () const
| get colorspace More...
LTIDataType | getDataType () const
| get data type More...
bool | isNaturalDynamicRange () const
| check if the range is "complete" or not More...
lt_int64 | getNominalImageSizeWithoutAlpha () const
| get the nominal size of the image, not considering the alpha band More...
lt_int64 | getNominalImageSizeWithAlpha () const
| get the nominal size of the image, including the alpha band More...
void | getGeoPoint (LTIPosition position, double &x, double &y) const
| get position of a named point More...
LTIPixel * | createBackgroundPixel () const
| return new background pixel More...
Public Member Functions inherited from LTIReferenceCountedObject
virtual void | retain (void) const
| increment reference counter More...
virtual void | release (void) const
| decrement the reference counter and delete the object when the counter is zero More...

## 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.

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.

LTIMaskSource* LTIImageReader::getMask | ( | ) |  | const
| virtual

Implements LTIImageStage.

LT_STATUS LTIImageReader::getMetadataBlob | ( | const char * | type,
|  | LTIOStreamInf *& | stream
| ) |  | const
| virtual

This function returns XMP or EXIF metadata as a blob.

Parameters

  type | type of metadata to extract (xmp|exif)
  stream | output stream containing the asked for metadata. The caller must delete the returned stream.

Returns
  status code indicating success or failure

Implements LTIImage.

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.

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.

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 const char* LTIImageReader::getSourceName | ( | void | ) |  | const
| protected pure virtual

Implemented in LTIRawImageReader, and Nitf::ImageReader.

Examples:
  DerivedImageReader.cpp.

LT_STATUS LTIImageReader::init | ( | const LTIImage * | image = `NULL`) |  |
| protected

Examples:
  DerivedImageReader.cpp.

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.

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

## Member Data Documentation

const bool LTIImageReader::m_supportBandSelection
| protected

Definition at line 83 of file lti_imageReader.h.

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

- lti_imageReader.h

LizardTech