MrSID Decode SDK for Raster Reference Manual  9.0.0.3864
LTIGeoFileImageWriter Class Referenceabstract

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

Public Member Functions

virtual ~LTIGeoFileImageWriter ()
 
virtual LT_STATUS writeBegin (const LTIScene &scene)
 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)
 complete an encode (write) operation More...
 
virtual LT_STATUS deleteOutput (void)
 clean up a failed encode (write) operation More...
 
virtual LT_STATUS setOutputFileSpec (const LTFileSpec &fileSpec)
 set output file name More...
 
virtual LT_STATUS setOutputFileSpec (const char *fileSpec)
 set output file name More...
 
virtual LT_STATUS setOutputStream (LTIOStreamInf *stream)
 set output file stream More...
 
virtual void setWriteWorldFile (bool enabled)
 enable writing of world file More...
 
- Public Member Functions inherited from LTIImageWriter
virtual ~LTIImageWriter ()
 
virtual LT_STATUS write (const LTIScene &scene)
 write (encode) a scene to the output format 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 LTIImageStagegetSourceImageStage (void) const
 get the source image stage More...
 
LTIProgressDelegategetProgressDelegate (void) const
 get progress delegate More...
 
LTIInterruptDelegategetInterruptDelegate (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

 LTIGeoFileImageWriter (bool supportsStreams)
 constructor More...
 
LTIOStreamInfgetStream () const
 get underlying stream More...
 
LTFileSpecgetFileSpec () const
 get target filename More...
 
- Protected Member Functions inherited from LTIImageWriter
 LTIImageWriter (void)
 
LT_STATUS init (LTIImageStage *imageStage)
 initialization function More...
 
LT_STATUS writeCleanup (LT_STATUS sts)
 

Additional Inherited Members

- Protected Attributes inherited from LTIImageWriter
LTIImageStagem_image
 

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

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.

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.

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.

Returns
the filename (may 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.

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
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.

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:

LizardTech