MrSID Decode SDK for Raster Reference Manual  9.5.4.4709
LTIGeoFileImageWriter Class Reference

class for writing geographic images to files or streams More...

#include <lti_geoFileImageWriter.h>

Inheritance diagram for LTIGeoFileImageWriter:
LTIImageWriter BMPImageWriter JpegImageWriter LTIRawImageWriter PNGImageWriter TIFFImageWriter LTIBBBImageWriter GeoTIFFImageWriter

List of all members.

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
LTIOStreamInfgetStream () const
 get underlying stream
LTFileSpecgetFileSpec () const
 get target filename

Detailed Description

This abstract class extends LTIImageWriter by adding functions for controlling the output form (either a file or a stream) and world file generation.

Examples:
DerivedImageWriter.cpp.

Definition at line 30 of file lti_geoFileImageWriter.h.


Constructor & Destructor Documentation

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.

Parameters:
supportsStreamsset to true if output to streams is allowed

Member Function Documentation

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.

Returns:
status code indicating the failure of operation

Implements LTIImageWriter.

Reimplemented in LTIBBBImageWriter.

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.

Returns:
the filename (may be NULL)

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.

Returns:
the stream (may be NULL)
Examples:
DerivedImageWriter.cpp.
virtual LT_STATUS LTIGeoFileImageWriter::setOutputFileSpec ( const LTFileSpec fileSpec) [virtual]

Sets the output target to the given filename. Must be called prior to calling write().

Parameters:
fileSpecthe name of the file to write to
Returns:
status code indicating success or failure
Examples:
GeoScene.cpp.
virtual LT_STATUS LTIGeoFileImageWriter::setOutputFileSpec ( const char *  fileSpec) [virtual]

Sets the output target to the given filename. Must be called prior to calling write().

Parameters:
fileSpecthe name of the file to write to
Returns:
success or failure

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.

Parameters:
streamthe stream to write to (may not be NULL)
Returns:
status code indicating success or failure
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.

Parameters:
enabledset 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.

Parameters:
scenethe scene to decode and output
Returns:
status code indicating success or failure

Implements LTIImageWriter.

Reimplemented in PNGImageWriter, TIFFImageWriter, JpegImageWriter, LTIRawImageWriter, BMPImageWriter, and LTIBBBImageWriter.

Examples:
DerivedImageWriter.cpp.
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.

Returns:
status code indicating success or failure

Implements LTIImageWriter.

Reimplemented in PNGImageWriter, TIFFImageWriter, JpegImageWriter, and BMPImageWriter.

Examples:
DerivedImageWriter.cpp.
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.

Parameters:
stripBufferthe pixels for the current strip
stripScenethe scene representing the strip being written
Returns:
status code indicating success or failure

Implements LTIImageWriter.

Implemented in PNGImageWriter, TIFFImageWriter, JpegImageWriter, LTIRawImageWriter, and BMPImageWriter.

Examples:
DerivedImageWriter.cpp.

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