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_EMBEDDED_IMAGE_H 00014 #define LTI_EMBEDDED_IMAGE_H 00015 00016 // lt_lib_mrsid_core 00017 #include "lti_imageFilter.h" 00018 #include "lti_imageStageOverrides.h" 00019 #include "lti_scene.h" 00020 #include "lti_sceneBuffer.h" 00021 00022 LT_BEGIN_NAMESPACE(LizardTech) 00023 00024 00039 #ifdef SWIG 00040 class LTIEmbeddedImage : public LTIImageFilter 00041 #else 00042 class LTIEmbeddedImage : public LTIOverrideDimensions 00043 <LTIOverridePixelProps 00044 <LTIOverrideBackgroundPixel 00045 <LTIOverrideGeoCoord 00046 <LTIImageFilter> > > > 00047 #endif 00048 { 00049 LTI_REFERENCE_COUNTED_BOILERPLATE(LTIEmbeddedImage); 00050 public: 00051 enum AlphaMode 00052 { 00053 DoNothing, 00054 FromMerge, 00055 FromSourceRectangle, 00056 }; 00057 00077 LT_STATUS initialize(LTIImageStage* srcImage, 00078 lt_uint32 newWidth, 00079 lt_uint32 newHeight, 00080 double newXPos, 00081 double newYPos, 00082 const LTIPixel* backgroundPixel, 00083 const LTIPixel* nodataPixel, 00084 AlphaMode alphaMode = DoNothing); 00085 00086 00087 // LTIImage 00088 LT_STATUS getDimsAtMag(double mag, 00089 lt_uint32 &width, 00090 lt_uint32 &height) const; 00091 00092 // LTIImageStage 00093 lt_int64 getEncodingCost(const LTIScene& scene) const; 00094 bool getReaderScene(const LTIScene &decodeScene, 00095 LTIScene &readerScene) const; 00096 00097 00104 LT_STATUS setFillingBackground(bool fill); 00105 00111 bool getFillingBackground(void) const; 00112 00118 LT_STATUS setFillMethod(LTIPixelFillMethod method, 00119 double fuzzyThreshold /*= LTISceneBuffer::DefaultFuzzyThreshold*/); 00120 00124 LTIPixelFillMethod getFillMethod(void) const; 00125 double getFuzzyThreshold(void) const; 00126 00127 // LTIImageStage 00128 virtual lt_uint32 getModifications(const LTIScene &scene) const; 00129 00130 // for LizardTech internal use only 00131 lt_int32 getChildXPosAtMag(double mag) const; 00132 // for LizardTech internal use only 00133 lt_int32 getChildYPosAtMag(double mag) const; 00134 // for LizardTech internal use only 00135 bool getChildScene(const LTIScene &parentScene, LTIScene &childScene) const; 00136 00137 00138 static LT_STATUS push(LTIImageStage *&pipeline, LTIScene &scene, 00139 const LTIPixel *backgroundPixel = NULL); 00140 00141 protected: 00142 LT_STATUS decodeBegin(const LTIPixel &pixelProps, 00143 const LTIScene &fullScene); 00144 LT_STATUS decodeStrip(LTISceneBuffer &stripBuffer, 00145 const LTIScene &stripScene); 00146 LT_STATUS decodeEnd(void); 00147 00148 private: 00149 double m_childXPos_P; 00150 double m_childYPos_P; 00151 00152 LTIScene m_parentScene; 00153 LTIScene m_childScene; 00154 bool m_haveAnything; 00155 lt_int32 m_firstStrip; 00156 lt_int32 m_lastStrip; 00157 00158 bool m_fillingBackground; 00159 LTIPixelFillMethod m_fillMethod; 00160 double m_fuzzyThreshold; 00161 AlphaMode m_alphaMode; 00162 00163 LTIPixel *m_decodePixelProps; 00164 }; 00165 00166 00167 LT_END_NAMESPACE(LizardTech) 00168 00169 #endif // LTI_EMBEDDED_IMAGE_H