MrSID Decode SDK for Raster Reference Manual
9.5.1.4427
Main Page
Namespaces
Classes
Files
Examples
File List
File Members
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
"
19
#include "
lti_imageStageOverrides.h
"
20
21
22
LT_BEGIN_NAMESPACE
(LizardTech)
23
24
30
#ifdef SWIG
31
class
LTIDynamicRangeFilter
:
public
LTIImageFilter
32
#else
33
class
LTIDynamicRangeFilter
:
public
LTIOverridePixelProps
34
<LTIOverrideBackgroundPixel
35
<LTIImageFilter> >
36
#endif
37
{
38
LTI_REFERENCE_COUNTED_BOILERPLATE
(
LTIDynamicRangeFilter
);
39
public
:
56
LT_STATUS
initialize
(
LTIImageStage
* srcImage,
57
const
LTIPixel
*srcDRMin = NULL,
58
const
LTIPixel
*srcDRMax = NULL,
59
LTIDataType
dstDataType =
LTI_DATATYPE_INVALID
);
60
71
LT_STATUS
initialize
(
LTIImageStage
* srcImage,
72
LTIDataType
dstDataType);
73
89
LT_STATUS
initialize
(
LTIImageStage
*srcImage,
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
151
LT_END_NAMESPACE
(LizardTech)
152
153
#endif // LTI_DYNAMIC_RANGE_FILTER_H
LizardTech