MrSID Decode SDK for Raster Reference Manual
9.5.1.4427
Main Page
Namespaces
Classes
Files
Examples
File List
File Members
lti_multiresFilter.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_MULTIRESFILTER_H
14
#define LTI_MULTIRESFILTER_H
15
16
// lt_lib_mrsid_core
17
#include "
lti_imageFilter.h
"
18
#include "
lti_imageStageOverrides.h
"
19
#include "
lti_scene.h
"
20
21
LT_BEGIN_NAMESPACE
(LizardTech)
22
23
class LTIResampler;
24
36
#ifdef SWIG
37
class
LTIMultiResFilter
:
public
LTIImageFilter
38
#else
39
class
LTIMultiResFilter
:
public
LTIOverrideDimensions
40
<LTIOverrideGeoCoord
41
<LTIOverrideMagnification
42
<LTIOverrideStripHeight
43
<LTIImageFilter> > > >
44
#endif
45
{
46
LTI_REFERENCE_COUNTED_BOILERPLATE
(
LTIMultiResFilter
);
47
public
:
60
LT_STATUS
initialize
(
LTIImageStage
* srcImage);
61
77
LT_STATUS
initialize
(
LTIImageStage
* srcImage,
78
lt_int8
scaleFactor);
79
80
LT_STATUS
initialize
(
LTIImageStage
* srcImage,
81
double
deltaMag,
82
double
minMag,
83
double
maxMag);
84
85
// LTIImage
86
LT_STATUS
getDimsAtMag
(
double
mag,
87
lt_uint32
&width,
88
lt_uint32
&height)
const
;
89
90
// LTIImageStage
91
lt_int64
getEncodingCost
(
const
LTIScene
& scene)
const
;
92
bool
getReaderScene
(
const
LTIScene
&decodeScene,
93
LTIScene
&readerScene)
const
;
94
virtual
lt_uint32
getModifications
(
const
LTIScene
&scene)
const
;
95
bool
getPipelineInfo
(
LTIPipelineInfo
info)
const
;
96
101
LT_STATUS
setResampleMethod
(
LTIResampleMethod
resampleMethod);
102
103
void
setMagSnapThreshold
(
double
threshold);
104
105
// for LizardTech internal use only
106
// call this before initialize() if you want non-sq. pixels
107
// (the deltaMag in the constructor is ignored)
108
void
setDeltaMagXY
(
double
deltaMagX,
double
deltaMagY);
109
110
// for LizardTech internal use only
111
static
double
magForIcon
(
const
LTIImage
&image,
112
lt_uint32
iconSize);
113
static
double
magForIcon
(
lt_uint32
width,
lt_uint32
height,
114
lt_uint32
iconSize);
115
116
static
LT_STATUS
push
(
LTIImageStage
*&pipeline,
const
LTIScene
&dstScene);
117
static
LT_STATUS
push
(
LTIImageStage
*&pipeline,
double
mag);
118
119
protected
:
120
LT_STATUS
decodeBegin
(
const
LTIPixel
&pixelProps,
121
const
LTIScene
&fullScene);
122
LT_STATUS
decodeStrip
(
LTISceneBuffer
&stripBuffer,
123
const
LTIScene
&stripScene);
124
LT_STATUS
decodeEnd
(
void
);
125
126
protected
:
127
enum
Mode
128
{
129
MODE_INVALID
,
130
MODE_RESAMPLE
,
131
MODE_PASSTHROUGH
,
132
MODE_DOWNSAMPLE_FULLREAD
,
133
MODE_ALL_AT_ONCE
134
};
135
136
bool
getChildScene
(
const
LTIScene
&scene,
137
Mode
&mode,
138
double
&xScale,
139
double
&yScale,
140
LTIScene
&childScene)
const
;
141
142
enum
143
{
144
// The largest possible mag is based on the 2gb
145
// scene limitation. Thus the largest scene we
146
// should ever expect is approximately the square
147
// root of (2gb / 3) pixels on a side. If we
148
// assume the smallest image we'll ever encounter
149
// is 32x32 then the largest magnification can
150
// be calculated. It's big, but we need a real number!
151
kMaxMagnification
= 512
// 51200% zoom!
152
};
153
154
private
:
155
struct
StripCache;
156
157
double
m_deltaMagX;
158
double
m_deltaMagY;
159
160
double
m_magSnapThreshold;
161
162
Mode
m_mode;
163
double
m_xScale;
164
double
m_yScale;
165
LTIScene
m_childScene;
166
double
m_dx;
167
double
m_dy;
168
double
m_curY;
169
170
lt_int32
m_childStrip;
171
lt_int32
m_myStrip;
172
173
lt_uint32
m_cacheStripHeight;
174
StripCache *m_stripCache0;
175
StripCache *m_stripCache1;
176
177
LTIResampler *m_resampler;
178
};
179
180
181
LT_END_NAMESPACE
(LizardTech)
182
183
#endif // LTI_MULTIRESFILTER_H
LizardTech