MrSID Decode SDK for Raster Reference Manual  9.5.1.4427
lti_dynamicRangeFilter.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_DYNAMIC_RANGE_FILTER_H
14 #define LTI_DYNAMIC_RANGE_FILTER_H
15 
16 // lt_lib_mrsid_core
17 #include "lti_pixel.h"
18 #include "lti_imageFilter.h"
20 
21 
23 
24 
30 #ifdef SWIG
32 #else
34  <LTIOverrideBackgroundPixel
35  <LTIImageFilter> >
36 #endif
37 {
39 public:
57  const LTIPixel *srcDRMin = NULL,
58  const LTIPixel *srcDRMax = NULL,
59  LTIDataType dstDataType = LTI_DATATYPE_INVALID);
60 
72  LTIDataType dstDataType);
73 
90  const LTIPixel *srcMin, const LTIPixel *srcMax,
91  const LTIPixel &dstMin, const LTIPixel &dstMax);
92 
93  // LTIImageStage
94  virtual lt_int64 getEncodingCost(const LTIScene& scene) const;
95  virtual lt_uint32 getModifications(const LTIScene &scene) const;
96 
97  // LizardTech-internal only
98  const LTIPixel &getSrcMin() const { return m_srcMin; }
99  const LTIPixel &getSrcMax() const { return m_srcMax; }
100  LT_STATUS setSrcMinMax(const LTIPixel& srcMin, const LTIPixel& srcMax);
101  LT_STATUS setDstMinMax(const LTIPixel& srcMin, const LTIPixel& srcMax);
102 
103  void setPixelFillMethod(LTIPixelFillMethod method, double fuzzyThreshold);
104 
105  static LT_STATUS push(LTIImageStage *&pipeline, const LTIPixel &pixelProps,
106  bool applyDynamicRange);
107 
108  static LT_STATUS transformBuffer(const LTIPixel &srcMin,
109  const LTIPixel &srcMax,
110  const LTISceneBuffer &srcBuffer,
111  const LTIPixel &dstMin,
112  const LTIPixel &dstMax,
113  LTISceneBuffer &dstBuffer,
114  lt_uint32 numCols,
115  lt_uint32 numRows);
116 
117  static LT_STATUS transformPixel(const LTIPixel &srcMin,
118  const LTIPixel &srcMax,
119  const LTIPixel &srcPixel,
120  const LTIPixel &dstMin,
121  const LTIPixel &dstMax,
122  LTIPixel &dstPixel);
123  LT_STATUS reinit(void);
124 
125 protected:
126  LT_STATUS decodeBegin(const LTIPixel &pixelProps,
127  const LTIScene &fullScene);
128  LT_STATUS decodeStrip(LTISceneBuffer &stripBuffer,
129  const LTIScene &stripScene);
130  LT_STATUS decodeEnd(void);
131 
132 private:
133 
134  lt_uint32 m_mods;
135  lt_uint16 *m_bandSelection;
136 
137  LTIPixel m_srcMin;
138  LTIPixel m_srcMax;
139  LTIPixel m_dstMin;
140  LTIPixel m_dstMax;
141 
142  LTIPixelFillMethod m_fillMethod;
143  double m_srcFuzzyThreshold;
144  double m_dstFuzzyThreshold;
145  bool m_needNoDataFixup;
146  LTIPixel m_shiftedNoData;
147 
148 };
149 
150 
152 
153 #endif // LTI_DYNAMIC_RANGE_FILTER_H
representation of a scene
Definition: lti_scene.h:64
LT_STATUS initialize(LTIImageStage *srcImage, const LTIPixel *srcDRMin=NULL, const LTIPixel *srcDRMax=NULL, LTIDataType dstDataType=LTI_DATATYPE_INVALID)
initializer
LT_STATUS decodeBegin(const LTIPixel &pixelProps, const LTIScene &fullScene)
start strip-based read
LTIDataType
datatypes
Definition: lti_types.h:105
change dynamic range or datatype of the samples of the image
static LT_STATUS transformPixel(const LTIPixel &srcMin, const LTIPixel &srcMax, const LTIPixel &srcPixel, const LTIPixel &dstMin, const LTIPixel &dstMax, LTIPixel &dstPixel)
#define LT_END_NAMESPACE(theNameSpace)
compiler does not support namespaces
Definition: lt_define.h:85
LT_STATUS decodeStrip(LTISceneBuffer &stripBuffer, const LTIScene &stripScene)
read a strip from the image
static LT_STATUS transformBuffer(const LTIPixel &srcMin, const LTIPixel &srcMax, const LTISceneBuffer &srcBuffer, const LTIPixel &dstMin, const LTIPixel &dstMax, LTISceneBuffer &dstBuffer, lt_uint32 numCols, lt_uint32 numRows)
const LTIPixel & getSrcMin() const
virtual lt_uint32 getModifications(const LTIScene &scene) const
get the modification bitfield for this image
virtual lt_int64 getEncodingCost(const LTIScene &scene) const
get the cost to encode this scene
lt_uint32 LT_STATUS
An integral status code.
Definition: lt_status.h:39
static LT_STATUS push(LTIImageStage *&pipeline, const LTIPixel &pixelProps, bool applyDynamicRange)
abstract class for implementing an image transform
const LTIPixel & getSrcMax() const
basic properties of a pixel
Definition: lti_pixel.h:36
LTIPixelFillMethod
constants representing pixel filling methods
Definition: lti_types.h:187
LT_STATUS decodeEnd(void)
finish strip-based read
LT_STATUS setSrcMinMax(const LTIPixel &srcMin, const LTIPixel &srcMax)
unsigned short lt_uint16
unsigned 16-bit integer
Definition: lt_types.h:50
class to hold data passed between image stages
void setPixelFillMethod(LTIPixelFillMethod method, double fuzzyThreshold)
LT_STATUS setDstMinMax(const LTIPixel &srcMin, const LTIPixel &srcMax)
LT_STATUS reinit(void)
abstract class for decoding from an image
#define LT_BEGIN_NAMESPACE(theNameSpace)
compiler does not support namespaces
Definition: lt_define.h:84
#define LTI_REFERENCE_COUNTED_BOILERPLATE(classname)
unsigned int lt_uint32
unsigned 32-bit integer
Definition: lt_types.h:54

LizardTech