MrSID Decode SDK for Raster Reference Manual  9.0.0.3864
LTIImage Class Referenceabstract

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

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...
 
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...
 
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
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, 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 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, LTIImageFilter, LTIColorTransformer, LTIImageReader, LTIViewerImageFilter, LTIWatermarkFilter, and LTITranslationFilter.

virtual const LTIPixel* LTIImage::getNoDataPixel ( ) const
pure virtual
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.
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
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 LTIOverrideIsSelective< LTIOverrideStripHeight< LTIOverrideDelegates< LTIOverridePixelLookupTables< LTIOverrideMetadata< LTIImageStage > > > > >, and LTIImageFilter.


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

LizardTech