MrSID Decode SDK for Raster Reference Manual  9.5.4.4709
LTIImage Class Referenceabstract

abstract class representing an image More...

#include <lti_image.h>

Inheritance diagram for LTIImage:
LTIReferenceCountedObject LTIImageStage LTIImageFilter J2KImageReader LTIViewerImageFilter LTIWatermarkFilter MrSIDImageReader

Public Member Functions

virtual lt_uint32 getWidth () const =0
 get image width More...
 
virtual lt_uint32 getHeight () const =0
 get image height More...
 
virtual LT_STATUS getDimsAtMag (double mag, lt_uint32 &width, lt_uint32 &height) const =0
 get image width and height at given magnification More...
 
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...
 
virtual const LTIPixelgetPixelProps () const =0
 get the pixel properties of the image More...
 
virtual const LTIPixelgetBackgroundPixel () const =0
 get the values of the background pixel More...
 
virtual const LTIPixelgetNoDataPixel () const =0
 get the values of the "no data" (transparency) pixel More...
 
virtual const LTIPixelLookupTablegetPixelLookupTable () const =0
 get the color lookup table, if any More...
 
virtual const LTIPixelgetMinDynamicRange () const =0
 get the minimum dynamic range value of image More...
 
virtual const LTIPixelgetMaxDynamicRange () const =0
 get the maximum dynamic range value of image More...
 
bool isNaturalDynamicRange () const
 check if the range is "complete" or not More...
 
virtual const LTIGeoCoordgetGeoCoord () const =0
 get the geographic coordinates of the image More...
 
virtual bool isGeoCoordImplicit () const =0
 is geo information "real" or not More...
 
virtual const LTIMetadataDatabasegetMetadata () const =0
 get the metadata associated with the image More...
 
virtual double getMinMagnification () const =0
 get the minimum magnification More...
 
virtual double getMaxMagnification () const =0
 get the maximum magnification More...
 
virtual bool isSelective () const =0
 check if image supports "random access" decoding More...
 
virtual lt_uint32 getModifications (const LTIScene &scene) const =0
 get the modification bitfield for this image More...
 
virtual LT_STATUS getMetadataBlob (const char *type, LTIOStreamInf *&stream) const =0
 extract the metadata associated with the image of the given type 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...
 
LTIPixelcreateBackgroundPixel () 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

 LTIImage (void)
 
virtual ~LTIImage (void)
 
- Protected Member Functions inherited from LTIReferenceCountedObject
 LTIReferenceCountedObject (void)
 
virtual ~LTIReferenceCountedObject (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  )
protectedvirtual

Member Function Documentation

LTIPixel* LTIImage::createBackgroundPixel ( ) const

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
virtual const LTIPixel* LTIImage::getBackgroundPixel ( ) const
pure virtual

This function returns a pointer to an object containing the values of the background pixel of the image. If the pointer is NULL, no background color has been set for the image.

Returns
pointer to the background pixel

Implemented in LTIImageFilter.

LTIColorSpace LTIImage::getColorSpace ( ) const

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.
LTIDataType LTIImage::getDataType ( ) const

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, and ImageInfo.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 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 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 lt_uint32 LTIImage::getHeight ( ) const
pure virtual

This function returns the height of the image, in pixels.

Returns
the image height

Implemented in LTIImageFilter.

virtual const LTIPixel& LTIImage::getMaxDynamicRange ( ) const
pure virtual

This function returns the pixels of maximum value of the dynamic range of the image.

Returns
pixel object with the maximum dynamic range values

Implemented in LTIImageFilter.

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

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

virtual const LTIPixel& LTIImage::getMinDynamicRange ( ) const
pure virtual

This function returns the pixels of minimum value of the dynamic range of the image.

Returns
pixel object with the minimum dynamic range values

Implemented in 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 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 J2KImageReader, MrSIDImageReader, LTIViewerImageFilter, LTIWatermarkFilter, and LTIImageFilter.

virtual const LTIPixel* LTIImage::getNoDataPixel ( ) const
pure virtual

This function returns a pointer to an object containing the values of the no data pixel of the image. If the pointer is NULL, no transparency color has been set for the image.

Returns
pointer to the no data pixel

Implemented in LTIImageFilter.

lt_int64 LTIImage::getNominalImageSizeWithAlpha ( ) const

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.
lt_int64 LTIImage::getNominalImageSizeWithoutAlpha ( ) const

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
lt_uint16 LTIImage::getNumBands ( ) const

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.
lt_uint16 LTIImage::getNumBandsWithoutAlpha ( ) const

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

virtual const LTIPixel& LTIImage::getPixelProps ( ) const
pure virtual

This function returns an object which describes the basic properties of a pixel in the image.

Returns
the pixel properties of the image

Implemented in LTIImageFilter.

virtual lt_uint32 LTIImage::getWidth ( ) const
pure virtual

This function returns the width of the image, in pixels.

Returns
the image width

Implemented in LTIImageFilter.

virtual bool LTIImage::isGeoCoordImplicit ( ) const
pure virtual

This function returns true if the geo information is implicit, i.e. the source image did not have native geo coord info.

Returns
true if and only if the geo information is not "real"

Implemented in LTIImageFilter.

bool LTIImage::isNaturalDynamicRange ( ) const

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


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

LizardTech