MrSID Decode SDK for Raster Reference Manual  9.0.0.3864
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 
22 LT_BEGIN_NAMESPACE(LizardTech)
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  LT_STATUS setSrcMinMax(const LTIPixel& srcMin, const LTIPixel& srcMax);
99  LT_STATUS setDstMinMax(const LTIPixel& srcMin, const LTIPixel& srcMax);
100 
101  static LT_STATUS push(LTIImageStage *&pipeline, const LTIPixel &pixelProps,
102  bool applyDynamicRange);
103 
104  static LT_STATUS transformBuffer(const LTIPixel &srcMin,
105  const LTIPixel &srcMax,
106  const LTISceneBuffer &srcBuffer,
107  const LTIPixel &dstMin,
108  const LTIPixel &dstMax,
109  LTISceneBuffer &dstBuffer,
110  lt_uint32 numCols,
111  lt_uint32 numRows);
112 
113  static LT_STATUS transformPixel(const LTIPixel &srcMin,
114  const LTIPixel &srcMax,
115  const LTIPixel &srcPixel,
116  const LTIPixel &dstMin,
117  const LTIPixel &dstMax,
118  LTIPixel &dstPixel);
119 
120 protected:
121  LT_STATUS decodeBegin(const LTIPixel &pixelProps,
122  const LTIScene &fullScene);
123  LT_STATUS decodeStrip(LTISceneBuffer &stripBuffer,
124  const LTIScene &stripScene);
125  LT_STATUS decodeEnd(void);
126 
127 private:
128  void updateMods(void);
129 
130  lt_uint32 m_mods;
131  lt_uint16 *m_bandSelection;
132 
133  LTIPixel m_srcMin;
134  LTIPixel m_srcMax;
135  LTIPixel m_dstMin;
136  LTIPixel m_dstMax;
137 };
138 
139 
140 LT_END_NAMESPACE(LizardTech)
141 
142 #endif // LTI_DYNAMIC_RANGE_FILTER_H

LizardTech