MrSID Decode SDK for Raster Reference Manual 9.5.5.5244
lti_dynamicRangeFilter.h
Go to the documentation of this file.
1//
2// This code is property of Celartem, Inc dba Extensis.
3// Copyright (c) 1995-2023. All rights reserved.
4// Use permitted only under license from Extensis.
5//
6/* PUBLIC */
7
8#ifndef LTI_DYNAMIC_RANGE_FILTER_H
9#define LTI_DYNAMIC_RANGE_FILTER_H
10
11// lt_lib_mrsid_core
12#include "lti_pixel.h"
13#include "lti_imageFilter.h"
15
16
17LT_BEGIN_LIZARDTECH_NAMESPACE
18
25#ifdef SWIG
27#else
28class LTIDynamicRangeFilter : public LTIOverridePixelProps<LTIImageFilter>
29#endif
30{
32public:
50 const LTIPixel *srcDRMin = nullptr,
51 const LTIPixel *srcDRMax = nullptr,
52 LTIDataType dstDataType = LTI_DATATYPE_INVALID);
53
65 LTIDataType dstDataType);
66
83 const LTIPixel *srcMin, const LTIPixel *srcMax,
84 const LTIPixel &dstMin, const LTIPixel &dstMax);
85
86 // LTIImageStage
87 virtual lt_int64 getEncodingCost(const LTIScene& scene) const;
88 virtual lt_uint32 getModifications(const LTIScene &scene) const;
89
90 // LizardTech-internal only
91 const LTIPixel &getSrcMin() const { return m_srcMin; }
92 const LTIPixel &getSrcMax() const { return m_srcMax; }
93 LT_STATUS setSrcMinMax(const LTIPixel& srcMin, const LTIPixel& srcMax);
94 LT_STATUS setDstMinMax(const LTIPixel& srcMin, const LTIPixel& srcMax);
95
96 void setPixelFillMethod(LTIPixelFillMethod method, double fuzzyThreshold);
97
98 static LT_STATUS push(LTIImageStage *&pipeline, const LTIPixel &pixelProps,
99 bool applyDynamicRange);
100
101 static LT_STATUS transformBuffer(const LTIPixel &srcMin,
102 const LTIPixel &srcMax,
103 const LTISceneBuffer &srcBuffer,
104 const LTIPixel &dstMin,
105 const LTIPixel &dstMax,
106 LTISceneBuffer &dstBuffer,
107 lt_uint32 numCols,
108 lt_uint32 numRows);
109
110 static LT_STATUS transformPixel(const LTIPixel &srcMin,
111 const LTIPixel &srcMax,
112 const LTIPixel &srcPixel,
113 const LTIPixel &dstMin,
114 const LTIPixel &dstMax,
115 LTIPixel &dstPixel);
117
118protected:
119 LT_STATUS decodeBegin(const LTIPixel &pixelProps,
120 const LTIScene &fullScene);
122 const LTIScene &stripScene);
124
125private:
126
127 lt_uint32 m_mods;
128 lt_uint16 *m_bandSelection;
129
130 LTIPixel m_srcMin;
131 LTIPixel m_srcMax;
132 LTIPixel m_dstMin;
133 LTIPixel m_dstMax;
134
135 LTIPixelFillMethod m_fillMethod;
136 double m_srcFuzzyThreshold;
137 double m_dstFuzzyThreshold;
138 bool m_needNoDataFixup;
139 LTIPixel m_shiftedNoData;
140
141};
142
143
144LT_END_LIZARDTECH_NAMESPACE
145
146#endif // LTI_DYNAMIC_RANGE_FILTER_H
#define LTI_REFERENCE_COUNTED_BOILERPLATE(classname)
LTIDataType
datatypes
Definition: lti_types.h:101
@ LTI_DATATYPE_INVALID
Definition: lti_types.h:102
LTIPixelFillMethod
constants representing pixel filling methods
Definition: lti_types.h:183
lt_uint32 LT_STATUS
An integral status code.
Definition: lt_status.h:30
unsigned short lt_uint16
unsigned 16-bit integer
Definition: lt_types.h:40
unsigned int lt_uint32
unsigned 32-bit integer
Definition: lt_types.h:44
long long int lt_int64
signed 64-bit integer
Definition: lt_types.h:57
change dynamic range or datatype of the samples of the image
LT_STATUS setDstMinMax(const LTIPixel &srcMin, const LTIPixel &srcMax)
void setPixelFillMethod(LTIPixelFillMethod method, double fuzzyThreshold)
LT_STATUS decodeEnd(void)
finish strip-based read
LT_STATUS reinit(void)
LT_STATUS initialize(LTIImageStage *srcImage, const LTIPixel *srcDRMin=nullptr, const LTIPixel *srcDRMax=nullptr, LTIDataType dstDataType=LTI_DATATYPE_INVALID)
initializer
LT_STATUS decodeStrip(LTISceneBuffer &stripBuffer, const LTIScene &stripScene)
read a strip from the image
const LTIPixel & getSrcMin() const
const LTIPixel & getSrcMax() const
LT_STATUS initialize(LTIImageStage *srcImage, LTIDataType dstDataType)
initializer (for compatibly with LTIDataTypeTransformer)
LT_STATUS decodeBegin(const LTIPixel &pixelProps, const LTIScene &fullScene)
start strip-based read
LT_STATUS setSrcMinMax(const LTIPixel &srcMin, const LTIPixel &srcMax)
static LT_STATUS transformPixel(const LTIPixel &srcMin, const LTIPixel &srcMax, const LTIPixel &srcPixel, const LTIPixel &dstMin, const LTIPixel &dstMax, LTIPixel &dstPixel)
virtual lt_uint32 getModifications(const LTIScene &scene) const
get the modification bitfield for this image
LT_STATUS initialize(LTIImageStage *srcImage, const LTIPixel *srcMin, const LTIPixel *srcMax, const LTIPixel &dstMin, const LTIPixel &dstMax)
initializer
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)
static LT_STATUS push(LTIImageStage *&pipeline, const LTIPixel &pixelProps, bool applyDynamicRange)
virtual lt_int64 getEncodingCost(const LTIScene &scene) const
get the cost to encode this scene
abstract class for implementing an image transform
abstract class for decoding from an image
basic properties of a pixel
Definition: lti_pixel.h:32
representation of a scene
Definition: lti_scene.h:60
class to hold data passed between image stages

Extensis