MrSID Decode SDK for Raster Reference Manual  9.1.0.4045
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"
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
43  <LTIOverridePixelProps
44  <LTIOverrideBackgroundPixel
45  <LTIOverrideGeoCoord
46  <LTIImageFilter> > > >
47 #endif
48 {
50 public:
51  enum AlphaMode
52  {
56  };
57 
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 
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 protected:
137  LT_STATUS decodeBegin(const LTIPixel &pixelProps,
138  const LTIScene &fullScene);
139  LT_STATUS decodeStrip(LTISceneBuffer &stripBuffer,
140  const LTIScene &stripScene);
141  LT_STATUS decodeEnd(void);
142 
143 private:
144  double m_childXPos_P;
145  double m_childYPos_P;
146 
147  LTIScene m_parentScene;
148  LTIScene m_childScene;
149  bool m_haveAnything;
150  lt_int32 m_firstStrip;
151  lt_int32 m_lastStrip;
152 
153  bool m_fillingBackground;
154  LTIPixelFillMethod m_fillMethod;
155  double m_fuzzyThreshold;
156  AlphaMode m_alphaMode;
157 
158  LTIPixel *m_decodePixelProps;
159 };
160 
161 
162 LT_END_NAMESPACE(LizardTech)
163 
164 #endif // LTI_EMBEDDED_IMAGE_H
class to hold data passed between image stages
virtual lt_uint32 getModifications(const LTIScene &scene) const
get the modification bitfield for this image
unsigned int lt_uint32
unsigned 32-bit integer
Definition: lt_types.h:54
abstract class for decoding from an image
#define LT_BEGIN_NAMESPACE(theNameSpace)
compiler does not support namespaces
Definition: lt_define.h:84
representation of a scene
Definition: lti_scene.h:64
LTIPixelFillMethod getFillMethod(void) const
Get the fill method.
double getFuzzyThreshold(void) const
lt_int32 getChildYPosAtMag(double mag) const
lt_uint32 LT_STATUS
An integral status code.
Definition: lt_status.h:39
LT_STATUS setFillMethod(LTIPixelFillMethod method, double fuzzyThreshold)
Set the fill method which controls how noData pixels are matched.
bool getChildScene(const LTIScene &parentScene, LTIScene &childScene) const
signed int lt_int32
signed 32-bit integer
Definition: lt_types.h:52
bool getReaderScene(const LTIScene &decodeScene, LTIScene &readerScene) const
get the underlying scene to be used
LT_STATUS initialize(LTIImageStage *srcImage, lt_uint32 newWidth, lt_uint32 newHeight, double newXPos, double newYPos, const LTIPixel *backgroundPixel, const LTIPixel *nodataPixel, AlphaMode alphaMode=DoNothing)
initialize
lt_int64 getEncodingCost(const LTIScene &scene) const
get the cost to encode this scene
LT_STATUS decodeEnd(void)
finish strip-based read
lt_int32 getChildXPosAtMag(double mag) const
#define LT_END_NAMESPACE(theNameSpace)
compiler does not support namespaces
Definition: lt_define.h:85
bool getFillingBackground(void) const
query whether or not the background of the new "outer" image should be filled
LT_STATUS decodeStrip(LTISceneBuffer &stripBuffer, const LTIScene &stripScene)
read a strip from the image
abstract class for implementing an image transform
LTIPixelFillMethod
constants representing pixel filling methods
Definition: lti_types.h:187
LT_STATUS setFillingBackground(bool fill)
control whether or not the background of the new "outer" image should be filled
LT_STATUS decodeBegin(const LTIPixel &pixelProps, const LTIScene &fullScene)
start strip-based read
create a larger frame for the image
basic properties of a pixel
Definition: lti_pixel.h:36
LT_STATUS getDimsAtMag(double mag, lt_uint32 &width, lt_uint32 &height) const
get image width and height at given magnification
#define LTI_REFERENCE_COUNTED_BOILERPLATE(classname)

LizardTech