MrSID Decode SDK for Raster Reference Manual
9.5.4.4709
|
00001 /* $Id$ */ 00002 /* ////////////////////////////////////////////////////////////////////////// 00003 // // 00004 // This code is Copyright (c) 2004 LizardTech, Inc, 1008 Western Avenue, // 00005 // Suite 200, Seattle, WA 98104. Unauthorized use or distribution // 00006 // prohibited. Access to and use of this code is permitted only under // 00007 // license from LizardTech, Inc. Portions of the code are protected by // 00008 // US and foreign patents and other filings. All Rights Reserved. // 00009 // // 00011 /* PUBLIC */ 00012 00013 #ifndef LTI_IMAGEWRITER_H 00014 #define LTI_IMAGEWRITER_H 00015 00016 // lt_lib_mrsid_core 00017 #include "lti_types.h" 00018 00019 #include <stdlib.h> 00020 00021 LT_BEGIN_NAMESPACE(LizardTech) 00022 00023 00024 00031 class LTIImageWriter 00032 { 00033 LT_DISALLOW_COPY_CONSTRUCTOR(LTIImageWriter); 00034 public: 00035 virtual ~LTIImageWriter(); 00036 00053 virtual LT_STATUS write(const LTIScene& scene); 00054 00069 virtual LT_STATUS writeBegin(const LTIScene& scene) = 0; 00070 00084 virtual LT_STATUS writeStrip(LTISceneBuffer& stripBuffer, 00085 const LTIScene& stripScene) = 0; 00086 00098 virtual LT_STATUS writeEnd(void) = 0; 00099 00111 virtual LT_STATUS deleteOutput(void) = 0; 00112 00123 LT_STATUS setStripHeight(lt_uint32 stripHeight); 00124 00132 lt_uint32 getStripHeight(void) const; 00133 00144 virtual lt_uint32 getDefaultStripHeight(void) const; 00145 00155 virtual lt_int64 getEncodingCost(const LTIScene& scene) const; 00156 00171 void setProgressDelegate(LTIProgressDelegate* delegate); 00172 00187 void setInterruptDelegate(LTIInterruptDelegate* delegate); 00188 00189 00196 const LTIImageStage *getSourceImageStage(void) const; 00197 00211 LTIProgressDelegate* getProgressDelegate(void) const; 00212 00226 LTIInterruptDelegate* getInterruptDelegate(void) const; 00227 00238 virtual LT_STATUS setEncodingApplication(const char *name, 00239 const char *version, 00240 const char *comment = NULL); 00241 protected: 00242 LTIImageWriter(void); 00251 LT_STATUS init(LTIImageStage *imageStage); 00252 LT_STATUS writeCleanup(LT_STATUS sts); 00253 00254 LTIImageStage* m_image; 00255 00256 private: 00257 LT_STATUS checkDelegates(const LTIScene& fullScene, 00258 const LTIScene* currScene, 00259 bool atEnd); 00260 00261 lt_uint32 m_stripHeight; 00262 00263 LTIProgressDelegate* m_progressDelegate; 00264 LTIInterruptDelegate* m_interruptDelegate; 00265 }; 00266 00267 00268 LT_END_NAMESPACE(LizardTech) 00269 00270 00271 #endif // LTI_IMAGEWRITER_H