abstract class representing an image More...
#include <lti_image.h>
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 LTIPixel & | getPixelProps () const =0 |
get the pixel properties of the image | |
virtual const LTIPixel * | getBackgroundPixel () const =0 |
get the values of the background pixel | |
virtual const LTIPixel * | getNoDataPixel () const =0 |
get the values of the "no data" (transparency) pixel | |
virtual const LTIPixelLookupTable * | getPixelLookupTable () const =0 |
get the color lookup table, if any | |
virtual const LTIPixel & | getMinDynamicRange () const =0 |
get the minimum dynamic range value of image | |
virtual const LTIPixel & | getMaxDynamicRange () const =0 |
get the maximum dynamic range value of image | |
bool | isNaturalDynamicRange () const |
check if the range is "complete" or not | |
virtual const LTIGeoCoord & | getGeoCoord () const =0 |
get the geographic coordinates of the image | |
virtual bool | isGeoCoordImplicit () const =0 |
is geo information "real" or not | |
virtual const LTIMetadataDatabase & | getMetadata () 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 | |
LTIPixel * | createBackgroundPixel () const |
return new background pixel |
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.
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.
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.
Implemented in LTIImageFilter, LTIOverrideBackgroundPixel< LTIOverrideGeoCoord< LTIOverrideMagnification< LTIOverrideIsSelective< LTIOverrideStripHeight< LTIOverrideDelegates< LTIOverridePixelLookupTables< LTIOverrideMetadata< LTIImageStage > > > > > > > >, LTIOverrideBackgroundPixel< LTIOverrideGeoCoord< LTIImageFilter > >, LTIOverrideBackgroundPixel< LTIImageFilter >, and LTIOverrideBackgroundPixel< LTIOverrideMetadata< 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().
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().
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.
mag | magnification to determine width at | |
width | the image width at the magnification | |
height | the image height at the magnification |
Implemented in LTIEmbeddedImage, LTIImageFilter, LTIImageReader, LTIMosaicFilter, LTIMultiResFilter, and LizardTech::Nitf::ImageReader.
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))
Implemented in LTIImageFilter, LTIOverrideGeoCoord< LTIOverrideMagnification< LTIOverrideStripHeight< LTIImageFilter > > >, LTIOverrideGeoCoord< LTIOverrideMagnification< LTIOverrideIsSelective< LTIOverrideStripHeight< LTIOverrideDelegates< LTIOverridePixelLookupTables< LTIOverrideMetadata< LTIImageStage > > > > > > >, and LTIOverrideGeoCoord< LTIImageFilter >.
void LTIImage::getGeoPoint | ( | LTIPosition | position, | |
double & | x, | |||
double & | y | |||
) | const |
Returns the (x,y) position of the given named point.
position | the position to be returned | |
x | the x-position of the point | |
y | the y-position of the point |
virtual lt_uint32 LTIImage::getHeight | ( | ) | const [pure virtual] |
This function returns the height of the image, in pixels.
Implemented in LTIImageFilter, LTIOverrideDimensions< LTIOverridePixelProps< LTIOverrideBackgroundPixel< LTIOverrideGeoCoord< LTIImageFilter > > > >, LTIOverrideDimensions< LTIOverrideGeoCoord< LTIOverrideMagnification< LTIOverrideStripHeight< LTIImageFilter > > > >, and LTIOverrideDimensions< LTIOverridePixelProps< LTIOverrideBackgroundPixel< LTIOverrideGeoCoord< LTIOverrideMagnification< LTIOverrideIsSelective< LTIOverrideStripHeight< LTIOverrideDelegates< LTIOverridePixelLookupTables< LTIOverrideMetadata< LTIImageStage > > > > > > > > > >.
virtual const LTIPixel& LTIImage::getMaxDynamicRange | ( | ) | const [pure virtual] |
This function returns the pixels of maximum value of the dynamic range of the image.
Implemented in LTIImageFilter, LTIOverridePixelProps< LTIOverrideBackgroundPixel< LTIOverrideGeoCoord< LTIOverrideMagnification< LTIOverrideIsSelective< LTIOverrideStripHeight< LTIOverrideDelegates< LTIOverridePixelLookupTables< LTIOverrideMetadata< LTIImageStage > > > > > > > > >, LTIOverridePixelProps< LTIOverrideBackgroundPixel< LTIOverrideMetadata< LTIImageFilter > > >, LTIOverridePixelProps< LTIOverrideBackgroundPixel< LTIImageFilter > >, and LTIOverridePixelProps< LTIOverrideBackgroundPixel< LTIOverrideGeoCoord< 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.
Implemented in LTIImageFilter, LTIOverrideMagnification< LTIOverrideStripHeight< LTIImageFilter > >, and LTIOverrideMagnification< LTIOverrideIsSelective< LTIOverrideStripHeight< LTIOverrideDelegates< LTIOverridePixelLookupTables< LTIOverrideMetadata< LTIImageStage > > > > > >.
virtual const LTIMetadataDatabase& LTIImage::getMetadata | ( | ) | const [pure virtual] |
This function returns a reference to the object containing the metadata associated with the image.
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.
type | type of metadata to extract (xmp|exif) | |
stream | output stream containing the asked for metadata. The caller must delete the returned stream. |
Implemented in LTIImageFilter, LTIImageReader, and LTIMosaicFilter.
virtual const LTIPixel& LTIImage::getMinDynamicRange | ( | ) | const [pure virtual] |
This function returns the pixels of minimum value of the dynamic range of the image.
Implemented in LTIImageFilter, LTIOverridePixelProps< LTIOverrideBackgroundPixel< LTIOverrideGeoCoord< LTIOverrideMagnification< LTIOverrideIsSelective< LTIOverrideStripHeight< LTIOverrideDelegates< LTIOverridePixelLookupTables< LTIOverrideMetadata< LTIImageStage > > > > > > > > >, LTIOverridePixelProps< LTIOverrideBackgroundPixel< LTIOverrideMetadata< LTIImageFilter > > >, LTIOverridePixelProps< LTIOverrideBackgroundPixel< LTIImageFilter > >, and LTIOverridePixelProps< LTIOverrideBackgroundPixel< LTIOverrideGeoCoord< 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.
Implemented in LTIImageFilter, LTIOverrideMagnification< LTIOverrideStripHeight< LTIImageFilter > >, and LTIOverrideMagnification< LTIOverrideIsSelective< LTIOverrideStripHeight< LTIOverrideDelegates< LTIOverridePixelLookupTables< LTIOverrideMetadata< LTIImageStage > > > > > >.
This function returns a bitfield describing what kinds of modifications have been made to the image during and since its initial encoding.
scene | the area pertaining to this request |
Implemented in J2KImageReader, LTIBandSelectFilter, LTIColorTransformer, LTIDynamicRangeFilter, LTIEmbeddedImage, LTIImageFilter, LTIImageReader, LTIMosaicFilter, LTIMultiResFilter, LTITranslationFilter, LTIViewerImageFilter, LTIWatermarkFilter, MrSIDImageReader, and MrSIDSingleImageReaderBase.
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.
Implemented in LTIImageFilter, LTIOverrideBackgroundPixel< LTIOverrideGeoCoord< LTIOverrideMagnification< LTIOverrideIsSelective< LTIOverrideStripHeight< LTIOverrideDelegates< LTIOverridePixelLookupTables< LTIOverrideMetadata< LTIImageStage > > > > > > > >, LTIOverrideBackgroundPixel< LTIOverrideGeoCoord< LTIImageFilter > >, LTIOverrideBackgroundPixel< LTIImageFilter >, and LTIOverrideBackgroundPixel< LTIOverrideMetadata< 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:
Note this value may be substantially different than the "physical" image size due to compression.
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:
Note this value may be substantially different than the "physical" image size due to compression.
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().
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().
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.
Implemented in LTIImageFilter, and LTIOverridePixelLookupTables< LTIOverrideMetadata< LTIImageStage > >.
virtual const LTIPixel& LTIImage::getPixelProps | ( | ) | const [pure virtual] |
This function returns an object which describes the basic properties of a pixel in the image.
Implemented in LTIImageFilter, LTIOverridePixelProps< LTIOverrideBackgroundPixel< LTIOverrideGeoCoord< LTIOverrideMagnification< LTIOverrideIsSelective< LTIOverrideStripHeight< LTIOverrideDelegates< LTIOverridePixelLookupTables< LTIOverrideMetadata< LTIImageStage > > > > > > > > >, LTIOverridePixelProps< LTIOverrideBackgroundPixel< LTIOverrideMetadata< LTIImageFilter > > >, LTIOverridePixelProps< LTIOverrideBackgroundPixel< LTIImageFilter > >, and LTIOverridePixelProps< LTIOverrideBackgroundPixel< LTIOverrideGeoCoord< LTIImageFilter > > >.
virtual lt_uint32 LTIImage::getWidth | ( | ) | const [pure virtual] |
This function returns the width of the image, in pixels.
Implemented in LTIImageFilter, LTIOverrideDimensions< LTIOverridePixelProps< LTIOverrideBackgroundPixel< LTIOverrideGeoCoord< LTIImageFilter > > > >, LTIOverrideDimensions< LTIOverrideGeoCoord< LTIOverrideMagnification< LTIOverrideStripHeight< LTIImageFilter > > > >, and LTIOverrideDimensions< LTIOverridePixelProps< LTIOverrideBackgroundPixel< LTIOverrideGeoCoord< LTIOverrideMagnification< LTIOverrideIsSelective< LTIOverrideStripHeight< LTIOverrideDelegates< LTIOverridePixelLookupTables< LTIOverrideMetadata< LTIImageStage > > > > > > > > > >.
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.
Implemented in LTIImageFilter, LTIOverrideGeoCoord< LTIOverrideMagnification< LTIOverrideStripHeight< LTIImageFilter > > >, LTIOverrideGeoCoord< LTIOverrideMagnification< LTIOverrideIsSelective< LTIOverrideStripHeight< LTIOverrideDelegates< LTIOverridePixelLookupTables< LTIOverrideMetadata< LTIImageStage > > > > > > >, and LTIOverrideGeoCoord< 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.
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.
Implemented in LTIImageFilter, and LTIOverrideIsSelective< LTIOverrideStripHeight< LTIOverrideDelegates< LTIOverridePixelLookupTables< LTIOverrideMetadata< LTIImageStage > > > > >.
LizardTech |