MrSID Decode SDK for Raster Reference Manual
9.0.0.3864
|
abstract class for implementing an image writer More...
#include <lti_imageWriter.h>
Public Member Functions | |
virtual | ~LTIImageWriter () |
virtual LT_STATUS | write (const LTIScene &scene) |
write (encode) a scene to the output format More... | |
virtual LT_STATUS | writeBegin (const LTIScene &scene)=0 |
begin an encode (write) operation More... | |
virtual LT_STATUS | writeStrip (LTISceneBuffer &stripBuffer, const LTIScene &stripScene)=0 |
encode one strip of the scene More... | |
virtual LT_STATUS | writeEnd (void)=0 |
complete an encode (write) operation More... | |
virtual LT_STATUS | deleteOutput (void)=0 |
clean up a failed encode (write) operation More... | |
LT_STATUS | setStripHeight (lt_uint32 stripHeight) |
set the stripheight for the encode More... | |
lt_uint32 | getStripHeight (void) const |
get the stripheight for the encode More... | |
virtual lt_uint32 | getDefaultStripHeight (void) const |
get the preferred stripheight for the encode More... | |
virtual lt_int64 | getEncodingCost (const LTIScene &scene) const |
get the cost to encode the scene More... | |
void | setProgressDelegate (LTIProgressDelegate *delegate) |
set progress delegate More... | |
void | setInterruptDelegate (LTIInterruptDelegate *delegate) |
set interrupt delegate More... | |
const LTIImageStage * | getSourceImageStage (void) const |
get the source image stage More... | |
LTIProgressDelegate * | getProgressDelegate (void) const |
get progress delegate More... | |
LTIInterruptDelegate * | getInterruptDelegate (void) const |
get interrupt delegate More... | |
virtual LT_STATUS | setEncodingApplication (const char *name, const char *version, const char *comment=NULL) |
set name and version of the creating application More... | |
Protected Member Functions | |
LTIImageWriter (void) | |
LT_STATUS | init (LTIImageStage *imageStage) |
initialization function More... | |
LT_STATUS | writeCleanup (LT_STATUS sts) |
Protected Attributes | |
LTIImageStage * | m_image |
The LTIImageWriter abstract class is used to output pixels from an image pipeline to an actual image format. The classes MG3ImageWriter, TIFFImageWriter, etc, derive from this class.
Definition at line 31 of file lti_imageWriter.h.
|
virtual |
|
protected |
|
pure virtual |
This function should delete any output files that were create during the calls to writeBegin() and writeStrip().
This function is called by write(). Derived classes must implement this function.
Implemented in LTIGeoFileImageWriter, and LTIBBBImageWriter.
|
virtual |
Returns the preferred stripheight for the encoder. By default, this is just the stripheight of the underlying image pipeline. A derived class may override this to reflect specific needs of an encoder implementation, however.
|
virtual |
Returns the cost to encode this scene, for application using the usage metering system. See LTIImageStage::getEncodingCost() for details.
scene | the scene to determine the cost for |
LTIInterruptDelegate* LTIImageWriter::getInterruptDelegate | ( | void | ) | const |
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 write() methods so that they can determine if the user has requested that the write operation should be aborted.
LTIProgressDelegate* LTIImageWriter::getProgressDelegate | ( | void | ) | const |
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 write() methods so that they can inform the user of the progress of the write operation.
const LTIImageStage* LTIImageWriter::getSourceImageStage | ( | void | ) | const |
Note this may not be the same image stage that was passed to the the initialize() method.
lt_uint32 LTIImageWriter::getStripHeight | ( | void | ) | const |
Returns the number of rows which will be encoded at a time.
|
protected |
Note that the pointer to the input image stage may not be NULL. The writer does not take ownership of the image stage.
imageStage | the source of image data to be written |
|
virtual |
This function allows the application to identify itself in the metadata of the output file if the format supports it.
name | the name of the encoding application |
version | a string indicating the detailed version information |
comment | any additional information about the encoding app |
void LTIImageWriter::setInterruptDelegate | ( | LTIInterruptDelegate * | delegate | ) |
This function sets the interrupt delegate, which is used in a callback-like fashion by the calling application to asynchronously indicate that a write() operation should be halted without completing.
Passing NULL to this function should remove the LTIImageWriter'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 writer |
void LTIImageWriter::setProgressDelegate | ( | LTIProgressDelegate * | delegate | ) |
This function sets the progress delegate, which is used in a callback-like fashion to report percent-complete of a write() operation back to the calling application.
Passing NULL to this function should remove the LTIImageWriter'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 writer |
This function sets the stripheight to be used when encoding a scene, i.e. the number of rows to process at one time. This value is used to control the decode requests from the image pipeline.
stripHeight | the number of rows to encode at one time |
This function writes the given scene to the implemented image format.
The write() function just calls writeBegin() for the given scene(), then calls writeStrip() repeatedly for each strip in the scene(), then calls writeEnd().
A derived classes should not override this function, unless it has special requirements for interacting with the rest of the image pipeline.
scene | the scene to decode and output |
Reimplemented in PNGImageWriter.
This function implements the logic for beginning the encoding of the given scene.
The scene must be a valid scene for the underlying image pipeline.
This function is called by write(). Derived classes must implement this function.
scene | the scene to decode and output |
Implemented in PNGImageWriter, TIFFImageWriter, JpegImageWriter, LTIRawImageWriter, BMPImageWriter, LTIGeoFileImageWriter, and LTIBBBImageWriter.
|
pure virtual |
This function implements the logic for completing the encoding of the given scene.
This function is called by write(). Derived classes must implement this function.
Implemented in PNGImageWriter, TIFFImageWriter, JpegImageWriter, BMPImageWriter, and LTIGeoFileImageWriter.
|
pure virtual |
This function implements the logic for actually encoding a given strip of the given scene.
This function is called by write(). Derived classes must implement this function.
stripBuffer | the pixels for the current strip |
stripScene | the scene representing the strip being written |
Implemented in PNGImageWriter, TIFFImageWriter, JpegImageWriter, LTIRawImageWriter, BMPImageWriter, and LTIGeoFileImageWriter.
|
protected |
Definition at line 254 of file lti_imageWriter.h.
LizardTech |