MrSID Decode SDK for Raster Reference Manual  9.5.4.4709
LTIImage Class Reference

abstract class representing an image More...

#include <lti_image.h>

Inheritance diagram for LTIImage:
LTIReferenceCountedObject LTIImageStage LTIImageFilter LTIOverrideMetadata< LTIImageStage > J2KImageReader LTIOverrideBackgroundPixel< LTIImageFilter > LTIOverrideGeoCoord< LTIImageFilter > LTIOverrideMetadata< LTIImageFilter > LTIOverrideStripHeight< LTIImageFilter > LTIViewerImageFilter LTIWatermarkFilter MrSIDImageReader LTIOverridePixelLookupTables< LTIOverrideMetadata< LTIImageStage > >

List of all members.

Public Member Functions

virtual lt_uint32 getWidth () const =0
 get image width
virtual lt_uint32 getHeight () const =0
 get image height
virtual LT_STATUS getDimsAtMag (double mag, lt_uint32 &width, lt_uint32 &height) const =0
 get image width and height at given magnification
lt_uint16 getNumBands () const
 get number of bands
lt_uint16 getNumBandsWithoutAlpha () const
 get number of bands without alpha
LTIColorSpace getColorSpace () const
 get colorspace
LTIDataType getDataType () const
 get data type
virtual const LTIPixelgetPixelProps () const =0
 get the pixel properties of the image
virtual const LTIPixelgetBackgroundPixel () const =0
 get the values of the background pixel
virtual const LTIPixelgetNoDataPixel () const =0
 get the values of the "no data" (transparency) pixel
virtual const LTIPixelLookupTablegetPixelLookupTable () const =0
 get the color lookup table, if any
virtual const LTIPixelgetMinDynamicRange () const =0
 get the minimum dynamic range value of image
virtual const LTIPixelgetMaxDynamicRange () const =0
 get the maximum dynamic range value of image
bool isNaturalDynamicRange () const
 check if the range is "complete" or not
virtual const LTIGeoCoordgetGeoCoord () const =0
 get the geographic coordinates of the image
virtual bool isGeoCoordImplicit () const =0
 is geo information "real" or not
virtual const LTIMetadataDatabasegetMetadata () const =0
 get the metadata associated with the image
virtual double getMinMagnification () const =0
 get the minimum magnification
virtual double getMaxMagnification () const =0
 get the maximum magnification
virtual bool isSelective () const =0
 check if image supports "random access" decoding
virtual lt_uint32 getModifications (const LTIScene &scene) const =0
 get the modification bitfield for this image
virtual LT_STATUS getMetadataBlob (const char *type, LTIOStreamInf *&stream) const =0
 extract the metadata associated with the image of the given type
lt_int64 getNominalImageSizeWithoutAlpha () const
 get the nominal size of the image, not considering the alpha band
lt_int64 getNominalImageSizeWithAlpha () const
 get the nominal size of the image, including the alpha band
void getGeoPoint (LTIPosition position, double &x, double &y) const
 get position of a named point
LTIPixelcreateBackgroundPixel () const
 return new background pixel

Protected Member Functions

 LTIImage (void)
virtual ~LTIImage (void)

Detailed Description

The LTIImage abstract class represents the basic properties of an image, including dimensions, data type, background color, etc.

LTIImage does not support extraction of pixels (decoding); that functionality is provided by the derived class LTIImageStage.

Definition at line 32 of file lti_image.h.


Constructor & Destructor Documentation

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

Member Function Documentation

Creates and returns a new pixel of the correct background color for the image. If no background color has been set, a new black pixel will be returned (unless the image is CMYK, in which case a white pixel will be returned).

The caller takes ownership of the returned pixel.

Returns:
a new background pixel

This function returns the colorspace of the image, e.g. RGB or greyscale.

This function is equivalent to getPixelProps().getColorSpace().

Returns:
the colorspace of the image
Examples:
DerivedImageFilter.cpp, and ImageInfo.cpp.

This function returns the data type of the samples in the image, e.g. unsigned byte or 32-bit float.

This function is equivalent to getPixelProps().getDataType().

Returns:
the datatype of the image
Examples:
DecodeJP2ToMemory.cpp, DecodeMrSIDToMemory.cpp, DerivedImageFilter.cpp, DerivedImageReader.cpp, ImageInfo.cpp, and Pipeline.cpp.
virtual LT_STATUS LTIImage::getDimsAtMag ( double  mag,
lt_uint32 width,
lt_uint32 height 
) const [pure virtual]

This function returns the width and height of the image, in pixels, relative to the given magnification.

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

Implemented in LTIMosaicFilter, Nitf::ImageReader, LTIEmbeddedImage, LTIMultiResFilter, LTIImageReader, and LTIImageFilter.

virtual const LTIGeoCoord& LTIImage::getGeoCoord ( ) const [pure virtual]

This function returns the geographic coordinates of the image.

Note that if the image has no explicit geographic coordinate information, e.g. stored within the metadata of a file, the geographic coordinates are implicitly set (upperleft is (0,-height), resolution is (1,-1))

Returns:
a pointer to an object containing the geographic coordinates

Implemented in LTIOverrideGeoCoord< LTIOverrideMagnification< LTIOverrideStripHeight< LTIImageFilter > > >, LTIOverrideGeoCoord< LTIOverrideMagnification< LTIOverrideIsSelective< LTIOverrideStripHeight< LTIOverrideDelegates< LTIOverridePixelLookupTables< LTIOverrideMetadata< LTIImageStage > > > > > > >, LTIOverrideGeoCoord< LTIImageFilter >, and LTIImageFilter.

void LTIImage::getGeoPoint ( LTIPosition  position,
double &  x,
double &  y 
) const

Returns the (x,y) position of the given named point.

Parameters:
positionthe position to be returned
xthe x-position of the point
ythe y-position of the point
virtual double LTIImage::getMaxMagnification ( ) const [pure virtual]

This function returns the maximum magnification of the image. Images that do not support "zooming in" will return 1.0; images that support "res-up", e.g. MrSID, will return a value less than 1.0.

Returns:
the maximum magnification

Implemented in LTIOverrideMagnification< LTIOverrideStripHeight< LTIImageFilter > >, LTIOverrideMagnification< LTIOverrideIsSelective< LTIOverrideStripHeight< LTIOverrideDelegates< LTIOverridePixelLookupTables< LTIOverrideMetadata< LTIImageStage > > > > > >, and LTIImageFilter.

virtual const LTIMetadataDatabase& LTIImage::getMetadata ( ) const [pure virtual]

This function returns a reference to the object containing the metadata associated with the image.

Returns:
a reference to the metadata database

Implemented in LTIImageFilter, LTIOverrideMetadata< LTIImageStage >, and LTIOverrideMetadata< LTIImageFilter >.

virtual LT_STATUS LTIImage::getMetadataBlob ( const char *  type,
LTIOStreamInf *&  stream 
) const [pure virtual]

This function returns XMP or EXIF metadata as a blob.

Parameters:
typetype of metadata to extract (xmp|exif)
streamoutput stream containing the asked for metadata. The caller must delete the returned stream.
Returns:
status code indicating success or failure

Implemented in LTIMosaicFilter, LTIImageReader, and LTIImageFilter.

virtual double LTIImage::getMinMagnification ( ) const [pure virtual]

This function returns the minimum magnification of the image. Images that do not support "zooming out" will return 1.0; images that contain "overviews", e.g. MrSID, will return a value greater than 1.0.

Returns:
the minimum magnification

Implemented in LTIOverrideMagnification< LTIOverrideStripHeight< LTIImageFilter > >, LTIOverrideMagnification< LTIOverrideIsSelective< LTIOverrideStripHeight< LTIOverrideDelegates< LTIOverridePixelLookupTables< LTIOverrideMetadata< LTIImageStage > > > > > >, and LTIImageFilter.

virtual lt_uint32 LTIImage::getModifications ( const LTIScene scene) const [pure virtual]

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

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

Implemented in MrSIDSingleImageReaderBase, J2KImageReader, LTIBandSelectFilter, LTIEmbeddedImage, LTIMosaicFilter, LTIDynamicRangeFilter, LTIMultiResFilter, MrSIDImageReader, LTIColorTransformer, LTIViewerImageFilter, LTIWatermarkFilter, LTITranslationFilter, LTIImageReader, and LTIImageFilter.

Returns number of bytes of actual data in the image, e.g. as if the image were a raw file but including any alpha band. This value is simply the product of:

  • image width,
  • image height,
  • samples per pixel (including alpha), and
  • bytes per sample.

Note this value may be substantially different than the "physical" image size due to compression.

Returns:
the nominal size of the image, in bytes, including alpha
Examples:
ImageInfo.cpp.

Returns number of bytes of actual data in the image, e.g. as if the image were a raw file but ignoring any alpha band. This value is simply the product of:

  • image width,
  • image height,
  • samples per pixel (ignoring alpha), and
  • bytes per sample.

Note this value may be substantially different than the "physical" image size due to compression.

Returns:
the nominal size of the image, in bytes, ignoring alpha

This function returns the number of bands (colors) in the image. This value is closely related to the colorspace of the image.

This function is equivalent to getPixelProps().getNumBands().

Returns:
the number of bands in the image
Examples:
DecodeJP2ToMemory.cpp, DecodeMrSIDToMemory.cpp, ImageInfo.cpp, and SceneBuffer.cpp.

This function returns the number of bands (colors) in the image. This value is closely related to the colorspace of the image.

This function is equivalent to getPixelProps().getNumBands().

Returns:
the number of bands in the image
virtual const LTIPixelLookupTable* LTIImage::getPixelLookupTable ( ) const [pure virtual]

This function returns a pointer the color lookup table, used for indexed or palletized images. Will return NULL if no table is used.

Returns:
pointer to the pixel lookup table

Implemented in LTIOverridePixelLookupTables< LTIOverrideMetadata< LTIImageStage > >, and LTIImageFilter.

virtual bool LTIImage::isGeoCoordImplicit ( ) const [pure virtual]

This function returns true if the dynamic range min/max values for the image correspond to the full range of the underlying datatype.

Returns:
true if range spans the datatype's range
virtual bool LTIImage::isSelective ( ) const [pure virtual]

Some formats, notably JPEG, do not support "selective" decoding. That is, they require that scenes being decoding must march in order down the scanlines of the image. Formats like TIFF and MrSID, however, are "selective": any scene can be requested at any time.

Returns:
true if and only if the image supports arbitrary scene requests

Implemented in LTIOverrideIsSelective< LTIOverrideStripHeight< LTIOverrideDelegates< LTIOverridePixelLookupTables< LTIOverrideMetadata< LTIImageStage > > > > >, and LTIImageFilter.


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