MrSID Decode SDK for Raster Reference Manual 9.5.4.4709

- Main Page
- Namespaces
- Classes
- Files
- Examples

- File List
- File Members

lti_embeddedImage.h
Go to the documentation of this file.
1 /* $Id$ */
2 /* //////////////////////////////////////////////////////////////////////////
3 // //
4 // This code is Copyright (c) 2004 LizardTech, Inc, 1008 Western Avenue, //
5 // Suite 200, Seattle, WA 98104. Unauthorized use or distribution //
6 // prohibited. Access to and use of this code is permitted only under //
7 // license from LizardTech, Inc. Portions of the code are protected by //
8 // US and foreign patents and other filings. All Rights Reserved. //
9 // //
11 /* PUBLIC */
12
13 #ifndef LTI_EMBEDDED_IMAGE_H
14 #define LTI_EMBEDDED_IMAGE_H
15
16 // lt_lib_mrsid_core
17 #include "lti_imageFilter.h"
18 #include "lti_imageStageOverrides.h"
19 #include "lti_scene.h"
20 #include "lti_sceneBuffer.h"
21
22 LT_BEGIN_NAMESPACE(LizardTech)
23
24
39 #ifdef SWIG
40 class LTIEmbeddedImage : public LTIImageFilter
41 #else
42 class LTIEmbeddedImage : public LTIOverrideDimensions
43 <LTIOverridePixelProps
44 <LTIOverrideBackgroundPixel
45 <LTIOverrideGeoCoord
46 <LTIImageFilter> > > >
47 #endif
48 {
49 LTI_REFERENCE_COUNTED_BOILERPLATE(LTIEmbeddedImage);
50 public:
51 enum AlphaMode
52 {
53 DoNothing,
54 FromMerge,
55 FromSourceRectangle,
56 };
57
77 LT_STATUS initialize(LTIImageStage* srcImage,
78 lt_uint32 newWidth,
79 lt_uint32 newHeight,
80 double newXPos,
81 double newYPos,
82 const LTIPixel* backgroundPixel,
83 const LTIPixel* nodataPixel,
84 AlphaMode alphaMode = DoNothing);
85
86
87 // LTIImage
88 LT_STATUS getDimsAtMag(double mag,
89 lt_uint32 &width,
90 lt_uint32 &height) const;
91
92 // LTIImageStage
93 lt_int64 getEncodingCost(const LTIScene& scene) const;
94 bool getReaderScene(const LTIScene &decodeScene,
95 LTIScene &readerScene) const;
96
97
104 LT_STATUS setFillingBackground(bool fill);
105
111 bool getFillingBackground(void) const;
112
118 LT_STATUS setFillMethod(LTIPixelFillMethod method,
119 double fuzzyThreshold /*= LTISceneBuffer::DefaultFuzzyThreshold*/);
120
124 LTIPixelFillMethod getFillMethod(void) const;
125 double getFuzzyThreshold(void) const;
126
127 // LTIImageStage
128 virtual lt_uint32 getModifications(const LTIScene &scene) const;
129
130 // for LizardTech internal use only
131 lt_int32 getChildXPosAtMag(double mag) const;
132 // for LizardTech internal use only
133 lt_int32 getChildYPosAtMag(double mag) const;
134 // for LizardTech internal use only
135 bool getChildScene(const LTIScene &parentScene, LTIScene &childScene) const;
136
137
138 static LT_STATUS push(LTIImageStage *&pipeline, LTIScene &scene,
139 const LTIPixel *backgroundPixel = NULL);
140
141 protected:
142 LT_STATUS decodeBegin(const LTIPixel &pixelProps,
143 const LTIScene &fullScene);
144 LT_STATUS decodeStrip(LTISceneBuffer &stripBuffer,
145 const LTIScene &stripScene);
146 LT_STATUS decodeEnd(void);
147
148 private:
149 double m_childXPos_P;
150 double m_childYPos_P;
151
152 LTIScene m_parentScene;
153 LTIScene m_childScene;
154 bool m_haveAnything;
155 lt_int32 m_firstStrip;
156 lt_int32 m_lastStrip;
157
158 bool m_fillingBackground;
159 LTIPixelFillMethod m_fillMethod;
160 double m_fuzzyThreshold;
161 AlphaMode m_alphaMode;
162
163 LTIPixel *m_decodePixelProps;
164 };
165
166
167 LT_END_NAMESPACE(LizardTech)
168
169 #endif // LTI_EMBEDDED_IMAGE_H

LizardTech