MrSID Decode SDK for Raster Reference Manual
9.5.1.4427
|
abstract class for decoding from an image More...
#include <lti_imageStage.h>
Public Member Functions | |
virtual void | setProgressDelegate (LTIProgressDelegate *delegate)=0 |
set progress delegate More... | |
virtual LTIProgressDelegate * | getProgressDelegate () const =0 |
get progress delegate More... | |
virtual void | setInterruptDelegate (LTIInterruptDelegate *delegate)=0 |
set interrupt delegate More... | |
virtual LTIInterruptDelegate * | getInterruptDelegate () const =0 |
get interrupt delegate More... | |
LT_STATUS | read (const LTIScene &scene, LTISceneBuffer &buffer) |
read (decode) a scene from the image More... | |
virtual LT_STATUS | readBegin (const LTIPixel &pixelProps, const LTIScene &fullScene) |
start strip-based read More... | |
virtual LT_STATUS | readStrip (LTISceneBuffer &buffer, const LTIScene &stripScene) |
read a strip from the image More... | |
virtual LT_STATUS | readEnd () |
finish strip-based read More... | |
virtual lt_uint32 | getStripHeight () const =0 |
get strip height More... | |
virtual LT_STATUS | setStripHeight (lt_uint32 stripHeight)=0 |
set the strip height More... | |
virtual lt_int64 | getEncodingCost (const LTIScene &scene) const =0 |
get the cost to encode this scene More... | |
virtual bool | getReaderScene (const LTIScene &decodeScene, LTIScene &readerScene) const =0 |
get the underlying scene to be used 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... | |
virtual LT_STATUS | overrideBackgroundPixel (const LTIPixel *backgroundPixel)=0 |
override the background color of the image More... | |
virtual LT_STATUS | overrideNoDataPixel (const LTIPixel *nodataPixel)=0 |
override the "no data" (transparency) color of the image More... | |
virtual LT_STATUS | overrideGeoCoord (const LTIGeoCoord &geoCoord)=0 |
override the geographic coordinates of the image More... | |
virtual LT_STATUS | overrideDynamicRange (const LTIPixel &drmin, const LTIPixel &drmax)=0 |
override the dynamic range of the image More... | |
virtual LT_STATUS | overridePixelBPS (lt_uint8)=0 |
override the bits-per-sample of the image's (sample's) datatype More... | |
virtual LT_STATUS | overridePixelLookupTable (const LTIPixelLookupTable *pixelLookupTable)=0 |
override the CLUT of the image More... | |
virtual LT_STATUS | overrideMetadata (const LTIMetadataDatabase &metadata)=0 |
override the metadata of the image More... | |
virtual LTIMaskSource * | getMask () const =0 |
virtual bool | getPipelineInfo (LTIPipelineInfo info) const =0 |
![]() | |
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 LTIPixel & | getPixelProps () const =0 |
get the pixel properties of the image More... | |
virtual const LTIPixel * | getBackgroundPixel () const =0 |
get the values of the background pixel More... | |
virtual const LTIPixel * | getNoDataPixel () const =0 |
get the values of the "no data" (transparency) pixel More... | |
virtual const LTIPixelLookupTable * | getPixelLookupTable () const =0 |
get the color lookup table, if any More... | |
virtual const LTIPixel & | getMinDynamicRange () const =0 |
get the minimum dynamic range value of image More... | |
virtual const LTIPixel & | getMaxDynamicRange () 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 LTIGeoCoord & | getGeoCoord () const =0 |
get the geographic coordinates of the image More... | |
virtual bool | isGeoCoordImplicit () const =0 |
is geo information "real" or not More... | |
virtual const LTIMetadataDatabase & | getMetadata () 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... | |
LTIPixel * | createBackgroundPixel () const |
return new background pixel More... | |
![]() | |
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 | |
LTIImageStage (void) | |
virtual | ~LTIImageStage (void) |
LT_STATUS | fillBackground (const LTIScene &scene, LTISceneBuffer &buffer) |
fill the background of the scene More... | |
LT_STATUS | fillBackground (const LTIScene &scene, LTISceneBuffer &buffer, const LTIPixel &color) |
fill the scene to given pixel More... | |
bool | isBandSelected (const LTIPixel &pixelProps) const |
virtual LT_STATUS | decodeBegin (const LTIPixel &pixelProps, const LTIScene &fullScene)=0 |
start strip-based read More... | |
virtual LT_STATUS | decodeStrip (LTISceneBuffer &stripBuffer, const LTIScene &stripScene)=0 |
read a strip from the image More... | |
virtual LT_STATUS | decodeEnd (void)=0 |
finish strip-based read More... | |
const LTIScene & | getFullScene () const |
get full scene More... | |
![]() | |
LTIImage (void) | |
virtual | ~LTIImage (void) |
![]() | |
LTIReferenceCountedObject (void) | |
virtual | ~LTIReferenceCountedObject (void) |
The LTIImageStage abstract class extends the LTIImage class by adding decode functionality, including read methods and progress and interrupt functions.
Definition at line 28 of file lti_imageStage.h.
|
protected |
|
protectedvirtual |
|
protectedpure virtual |
This function is called by readBegin() to start the actual class-specific work for decoding a scene.
Derived classes must implement this function.
This function should never be called directly.
pixelProps | the band selection |
fullScene | the full scene to be read |
Implemented in LTIImageFilter, and LTIWatermarkFilter.
|
protectedpure virtual |
This function is called by readEnd() to complete the actual class-specific work for decoding a scene.
Derived classes must implement this function.
This function should never be called directly.
Implemented in LTIImageFilter, and LTIWatermarkFilter.
|
protectedpure virtual |
This function is called by readStrip() to implement the actual class-specific work for decoding a strip of the scene.
Derived classes must implement this function.
This function should never be called directly.
stripBuffer | the buffer to read the pixels into |
stripScene | the scene for this strip being decoded |
Implemented in LTIImageFilter, and LTIWatermarkFilter.
|
protected |
This function sets the buffer to the background pixel if there is one, otherwise, the nodata pixel if there is one otherwise the background will be filled with black.
scene | the region (and scale) of the image to be read |
buffer | the buffer to read the pixels into |
|
protected |
This function sets the buffer to the given color.
scene | the region (and scale) of the image to be read |
buffer | the buffer to read the pixels into |
color | the fill color |
|
pure 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.
scene | the scene to be charged for |
Implemented in J2KImageReader, MrSIDImageReader, and LTIImageFilter.
|
protected |
This function returns the object's scene that was passed to readBegin(). Only use this function in decode{Begin, Strip, End}().
|
pure virtual |
This function returns the object's interrupt delegate.
The function will return NULL if no delegate has been set.
Derived classes should call this method from within their read() methods so that they can determine if the user has requested that the read operation should be aborted.
Implemented in LTIImageFilter.
|
pure virtual |
Implemented in LTIImageFilter.
lt_uint32 LTIImageStage::getNumStrips | ( | ) | const |
After readBegin() has been called, this will return the number of strips in the given scene.
|
pure virtual |
Implemented in LTIImageFilter.
|
pure virtual |
This function returns the object's progress delegate.
The function will return NULL if no delegate has been set.
Derived classes should call this method from within their read() methods so that they can inform the user of the progress of the read operation.
Implemented in LTIImageFilter.
|
pure virtual |
Get the scene that will be sent to the underlying LTIImageReader. This is useful in some complex pipelines.
decodeScene | the scene that would be given to read() |
readerScene | the scene that is the actual scene passed the underlying image reader |
Implemented in LTIImageFilter.
|
pure virtual |
Returns the strip height used in read() calls.
Reader classes should set this. Filter classes should inherit the stripheight of their pipeline predecessor. A writer class will force the stripheight of the pipeline to match its stripheight.
Implemented in LTIImageFilter.
After readBegin() has been called, this function can be used to return the scene corresponding to the given strip number for the current scene being decoded.
stripNumber | the strip to compute the scene for |
|
protected |
|
pure virtual |
This function is used to set the background color of the image.
backgroundPixel | the data for the background color |
Implemented in LTIImageFilter.
|
pure virtual |
Implemented in LTIImageFilter.
|
pure virtual |
This function is used to set the geographic coordinates of the image.
geoCoord | the geographic coordinate information |
Implemented in LTIImageFilter.
|
pure virtual |
Implemented in LTIImageFilter.
This function is used to set the "no data" or transparency color of the image.
nodataPixel | the data for the transparency color |
Implemented in LTIImageFilter.
Implemented in LTIImageFilter.
|
pure virtual |
Implemented in LTIImageFilter.
LT_STATUS LTIImageStage::read | ( | const LTIScene & | scene, |
LTISceneBuffer & | buffer | ||
) |
This function decodes a scene from the image and puts the pixels into the given buffer.
The scene may NOT extend beyond the boundaries of the image.
This function calls readBegin(), then calls readStrip() repeatedly until all the rows of the scene are done, then calls readEnd().
Derived classes should not override this method.
scene | the region (and scale) of the image to be read |
buffer | the buffer to read the pixels into |
|
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.
pixelProps | the band selection |
fullScene | the full scene to be read |
|
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.
|
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.
buffer | the buffer to read the pixels into |
stripScene | the scene for this strip being decoded |
|
pure virtual |
This function sets the interrupt delegate, which is used in a callback-like fashion by the calling application to asynchronously indicate that a read() operation should be halted without completing.
Passing NULL to this function should remove the LTIImageStage's current delegate, if any.
Note this function does not take ownership of the delegate object.
delegate | a pointer to the delegate object to be used by the image reader |
Implemented in LTIImageFilter.
|
pure virtual |
This function sets the progress delegate, which is used in a callback-like fashion to report percent-complete of a read() operation back to the calling application.
Passing NULL to this function should remove the LTIImageStage's current delegate, if any.
Note this function does not take ownership of the delegate object.
delegate | a pointer to the delegate object to be used by the image reader |
Implemented in LTIImageFilter.
Sets the strip height to be used in decoding. This is the number of rows to be decoded in each strip of the read() sequence.
Reader classes should implement this directly. (LTIImageFilter implements this as a call to setStripHeight() on the previous stage.)
stripHeight | the number of rows to decode at one time |
Implemented in LTIImageFilter.
LizardTech |