MrSID Decode SDK for Raster Reference Manual
9.5.4.4709
|
class for writing geographic images to files or streams More...
#include <lti_geoFileImageWriter.h>
Public Member Functions | |
virtual | ~LTIGeoFileImageWriter () |
virtual LT_STATUS | writeBegin (const LTIScene &scene) |
begin an encode (write) operation | |
virtual LT_STATUS | writeStrip (LTISceneBuffer &stripBuffer, const LTIScene &stripScene)=0 |
encode one strip of the scene | |
virtual LT_STATUS | writeEnd (void) |
complete an encode (write) operation | |
virtual LT_STATUS | deleteOutput (void) |
clean up a failed encode (write) operation | |
virtual LT_STATUS | setOutputFileSpec (const LTFileSpec &fileSpec) |
set output file name | |
virtual LT_STATUS | setOutputFileSpec (const char *fileSpec) |
set output file name | |
virtual LT_STATUS | setOutputStream (LTIOStreamInf *stream) |
set output file stream | |
virtual void | setWriteWorldFile (bool enabled) |
enable writing of world file | |
Protected Member Functions | |
LTIGeoFileImageWriter (bool supportsStreams) | |
constructor | |
LTIOStreamInf * | getStream () const |
get underlying stream | |
LTFileSpec * | getFileSpec () const |
get target filename |
This abstract class extends LTIImageWriter by adding functions for controlling the output form (either a file or a stream) and world file generation.
Definition at line 30 of file lti_geoFileImageWriter.h.
virtual LTIGeoFileImageWriter::~LTIGeoFileImageWriter | ( | ) | [virtual] |
LTIGeoFileImageWriter::LTIGeoFileImageWriter | ( | bool | supportsStreams | ) | [protected] |
Constructs a writer which will write to files or streams. The supportsStreams
parameter is used to indicate whether the derived class can write directly to a stream or only to files.
supportsStreams | set to true if output to streams is allowed |
virtual LT_STATUS LTIGeoFileImageWriter::deleteOutput | ( | void | ) | [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.
Implements LTIImageWriter.
Reimplemented in LTIBBBImageWriter.
LTFileSpec* LTIGeoFileImageWriter::getFileSpec | ( | ) | const [protected] |
Returns the name of the file being written to.
If the output target is set by the user to be a stream, the returned filename will be NULL.
LTIOStreamInf* LTIGeoFileImageWriter::getStream | ( | ) | const [protected] |
Returns the stream being written to.
If the output target is a filename, the returned stream will be NULL until the write() sequence has begun.
virtual LT_STATUS LTIGeoFileImageWriter::setOutputFileSpec | ( | const LTFileSpec & | fileSpec | ) | [virtual] |
Sets the output target to the given filename. Must be called prior to calling write().
fileSpec | the name of the file to write to |
virtual LT_STATUS LTIGeoFileImageWriter::setOutputFileSpec | ( | const char * | fileSpec | ) | [virtual] |
Sets the output target to the given filename. Must be called prior to calling write().
fileSpec | the name of the file to write to |
virtual LT_STATUS LTIGeoFileImageWriter::setOutputStream | ( | LTIOStreamInf * | stream | ) | [virtual] |
Sets the output target to the given stream. Must be called prior to calling write().
This operation will only succeed if the derived class has set the supportsStream
parameter to the LTIGeoFileImageWriter ctor to true.
stream | the stream to write to (may not be NULL) |
virtual void LTIGeoFileImageWriter::setWriteWorldFile | ( | bool | enabled | ) | [virtual] |
Enables or disables automatic generation of a world file. Only applicable when the output target is a filename.
The default is to not generate a world file.
enabled | set to true for world file generation |
virtual LT_STATUS LTIGeoFileImageWriter::writeBegin | ( | const LTIScene & | scene | ) | [virtual] |
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 |
Implements LTIImageWriter.
Reimplemented in PNGImageWriter, TIFFImageWriter, JpegImageWriter, LTIRawImageWriter, BMPImageWriter, and LTIBBBImageWriter.
virtual LT_STATUS LTIGeoFileImageWriter::writeEnd | ( | void | ) | [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.
Implements LTIImageWriter.
Reimplemented in PNGImageWriter, TIFFImageWriter, JpegImageWriter, and BMPImageWriter.
virtual LT_STATUS LTIGeoFileImageWriter::writeStrip | ( | LTISceneBuffer & | stripBuffer, |
const LTIScene & | stripScene | ||
) | [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 |
Implements LTIImageWriter.
Implemented in PNGImageWriter, TIFFImageWriter, JpegImageWriter, LTIRawImageWriter, and BMPImageWriter.