MrSID Decode SDK for Raster Reference Manual 9.5.5.5244
lti_multiresFilter.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_MULTIRESFILTER_H
9#define LTI_MULTIRESFILTER_H
10
11// lt_lib_mrsid_core
12#include "lti_imageFilter.h"
14#include "lti_scene.h"
15
16LT_BEGIN_LIZARDTECH_NAMESPACE
17
18class LTIResampler;
19
31#ifdef SWIG
33#else
35 <LTIOverrideGeoCoord
36 <LTIOverrideMagnification
37 <LTIOverrideStripHeight
38 <LTIImageFilter> > > >
39#endif
40{
42public:
56
73 lt_int8 scaleFactor);
74
76 double deltaMag,
77 double minMag,
78 double maxMag);
79
80 // LTIImage
82 lt_uint32 &width,
83 lt_uint32 &height) const;
84
85 // LTIImageStage
86 lt_int64 getEncodingCost(const LTIScene& scene) const;
87 bool getReaderScene(const LTIScene &decodeScene,
88 LTIScene &readerScene) const;
89 virtual lt_uint32 getModifications(const LTIScene &scene) const;
91
97 LT_STATUS setResamplePixelCenter(bool usePixelCenter);
98
99 void setMagSnapThreshold(double threshold);
100
101 // for LizardTech internal use only
102 // call this before initialize() if you want non-sq. pixels
103 // (the deltaMag in the constructor is ignored)
104 void setDeltaMagXY(double deltaMagX, double deltaMagY);
105
106 // for LizardTech internal use only
107 static double magForIcon(const LTIImage &image,
108 lt_uint32 iconSize);
109 static double magForIcon(lt_uint32 width, lt_uint32 height,
110 lt_uint32 iconSize);
111
112 static LT_STATUS push(LTIImageStage *&pipeline, const LTIScene &dstScene, LTIResampleMethod method = LTI_RESAMPLE_NEAREST);
113 static LT_STATUS push(LTIImageStage *&pipeline, double mag, LTIResampleMethod method = LTI_RESAMPLE_NEAREST);
114
115protected:
116 LT_STATUS decodeBegin(const LTIPixel &pixelProps,
117 const LTIScene &fullScene);
119 const LTIScene &stripScene);
121
122protected:
123 enum Mode
124 {
130 };
131
132 bool getChildScene(const LTIScene &scene,
133 Mode &mode,
134 double &xScale,
135 double &yScale,
136 LTIScene &childScene) const;
137
138 enum
139 {
140 // The largest possible mag is based on the 2gb
141 // scene limitation. Thus the largest scene we
142 // should ever expect is approximately the square
143 // root of (2gb / 3) pixels on a side. If we
144 // assume the smallest image we'll ever encounter
145 // is 32x32 then the largest magnification can
146 // be calculated. It's big, but we need a real number!
147 kMaxMagnification = 512 // 51200% zoom!
148 };
149
150private:
151 struct StripCache;
152
153 double m_deltaMagX;
154 double m_deltaMagY;
155
156 double m_magSnapThreshold;
157
158 Mode m_mode;
159 double m_xScale;
160 double m_yScale;
161 LTIScene m_childScene;
162 double m_dx;
163 double m_dy;
164 double m_curY;
165
166 lt_int32 m_childStrip;
167 lt_int32 m_myStrip;
168
169 StripCache *m_stripCache0;
170 StripCache *m_stripCache1;
171
172 LTIResampler *m_resampler;
173 bool m_usePixelCenter;
174};
175
176
177LT_END_LIZARDTECH_NAMESPACE
178
179#endif // LTI_MULTIRESFILTER_H
#define LTI_REFERENCE_COUNTED_BOILERPLATE(classname)
LTIResampleMethod
constants representing resampling methods
Definition: lti_types.h:172
@ LTI_RESAMPLE_NEAREST
Definition: lti_types.h:174
LTIPipelineInfo
Definition: lti_types.h:224
lt_uint32 LT_STATUS
An integral status code.
Definition: lt_status.h:30
signed char lt_int8
signed 8-bit integer
Definition: lt_types.h:34
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
signed int lt_int32
signed 32-bit integer
Definition: lt_types.h:42
abstract class representing an image
Definition: lti_image.h:28
abstract class for implementing an image transform
abstract class for decoding from an image
add resolutions to the image
bool getPipelineInfo(LTIPipelineInfo info) const
LT_STATUS decodeEnd(void)
finish strip-based read
virtual lt_uint32 getModifications(const LTIScene &scene) const
get the modification bitfield for this image
LT_STATUS initialize(LTIImageStage *srcImage)
initializer
LT_STATUS setResampleMethod(LTIResampleMethod resampleMethod)
Set resampling method.
bool getChildScene(const LTIScene &scene, Mode &mode, double &xScale, double &yScale, LTIScene &childScene) const
lt_int64 getEncodingCost(const LTIScene &scene) const
get the cost to encode this scene
LT_STATUS initialize(LTIImageStage *srcImage, double deltaMag, double minMag, double maxMag)
static double magForIcon(lt_uint32 width, lt_uint32 height, lt_uint32 iconSize)
static LT_STATUS push(LTIImageStage *&pipeline, const LTIScene &dstScene, LTIResampleMethod method=LTI_RESAMPLE_NEAREST)
LT_STATUS decodeStrip(LTISceneBuffer &stripBuffer, const LTIScene &stripScene)
read a strip from the image
LT_STATUS getDimsAtMag(double mag, lt_uint32 &width, lt_uint32 &height) const
get image width and height at given magnification
void setMagSnapThreshold(double threshold)
bool getReaderScene(const LTIScene &decodeScene, LTIScene &readerScene) const
get the underlying scene to be used
static LT_STATUS push(LTIImageStage *&pipeline, double mag, LTIResampleMethod method=LTI_RESAMPLE_NEAREST)
LT_STATUS decodeBegin(const LTIPixel &pixelProps, const LTIScene &fullScene)
start strip-based read
LT_STATUS initialize(LTIImageStage *srcImage, lt_int8 scaleFactor)
initializer (for compatibly with the old LTIStaticZoomFilter)
void setDeltaMagXY(double deltaMagX, double deltaMagY)
LT_STATUS setResamplePixelCenter(bool usePixelCenter)
static double magForIcon(const LTIImage &image, lt_uint32 iconSize)
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