MrSID Decode SDK for Raster Reference Manual 9.5.4.4709

- Main Page
- Namespaces
- Classes
- Files
- Examples

- File List
- File Members

lti_imageStageOverrides.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_IMAGE_STAGE_OVERRIDES_H
14 #define LTI_IMAGE_STAGE_OVERRIDES_H
15
16 // lt_lib_mrsid_core
17 #include "lti_types.h"
18 #include "lti_pixel.h"
19
20 LT_BEGIN_NAMESPACE(LizardTech)
21
22
23
26 struct LTIOverrideMetadataData
27 {
28 LTIOverrideMetadataData();
29 ~LTIOverrideMetadataData();
30
31 LT_STATUS createMetadata(const LTIMetadataDatabase *metadata);
32 LTIMetadataDatabase &getMetadata();
33
34 LTIMetadataDatabase *m_metadata;
35 };
36
37
38 template<class BASE>
39 struct LTIOverrideMetadata : public BASE,
40 protected LTIOverrideMetadataData
41 {
42 const LTIMetadataDatabase &getMetadata() const
43 {
44 return *m_metadata;
45 }
46
47 LT_STATUS overrideMetadata(const LTIMetadataDatabase &metadata)
48 {
49 return LTIOverrideMetadataData::createMetadata(&metadata);
50 }
51 };
52
55
56 struct LTIOverrideDimensionsData
57 {
58 LTIOverrideDimensionsData();
59
72 LT_STATUS setDimensions(lt_uint32 width, lt_uint32 height);
73
74 lt_uint32 m_width;
75 lt_uint32 m_height;
76 };
77
78 template<class BASE>
79 struct LTIOverrideDimensions : public BASE,
80 protected LTIOverrideDimensionsData
81
82 {
83 lt_uint32 getWidth() const
84 {
85 return m_width;
86 }
87
88 lt_uint32 getHeight() const
89 {
90 return m_height;
91 }
92 };
93
96
97 struct LTIOverridePixelPropsData
98 {
99 LTIOverridePixelPropsData();
100 ~LTIOverridePixelPropsData();
101
115 LT_STATUS setPixelProps(const LTIPixel& pixelProps);
116 LT_STATUS setPixelBPS(lt_uint8 bps);
117
136 LT_STATUS setDynamicRange(const LTIPixel& drmin,
137 const LTIPixel& drmax);
138
153 LT_STATUS setDefaultDynamicRange(void);
154
155 LTIPixel *m_pixelProps;
156 LTIPixel *m_drminPixel;
157 LTIPixel *m_drmaxPixel;
158 };
159
160 template<class BASE>
161 struct LTIOverridePixelProps : public BASE,
162 protected LTIOverridePixelPropsData
163 {
164 const LTIPixel &getPixelProps() const
165 {
166 return *m_pixelProps;
167 }
168
169 const LTIPixel &getMinDynamicRange() const
170 {
171 return *m_drminPixel;
172 }
173
174 const LTIPixel &getMaxDynamicRange() const
175 {
176 return *m_drmaxPixel;
177 }
178
179 LT_STATUS overridePixelBPS(lt_uint8 bps)
180 {
181 return setPixelBPS(bps);
182 }
183
184 LT_STATUS overrideDynamicRange(const LTIPixel& drmin,
185 const LTIPixel& drmax)
186 {
187 return setDynamicRange(drmin, drmax);
188 }
189 };
190
193
194 struct LTIOverrideBackgroundPixelData
195 {
196 LTIOverrideBackgroundPixelData();
197 ~LTIOverrideBackgroundPixelData();
198
212 LT_STATUS setBackgroundPixel(const LTIPixel* backgroundPixel);
213
227 LT_STATUS setNoDataPixel(const LTIPixel* nodataPixel);
228
229 LTIPixel *m_backgroundPixel;
230 LTIPixel *m_nodataPixel;
231 };
232
233
234 template<class BASE>
235 struct LTIOverrideBackgroundPixel : public BASE,
236 protected LTIOverrideBackgroundPixelData
237 {
238 public:
239 const LTIPixel *getBackgroundPixel() const
240 {
241 return m_backgroundPixel;
242 }
243 const LTIPixel *getNoDataPixel() const
244 {
245 return m_nodataPixel;
246 }
247
248 LT_STATUS overrideBackgroundPixel(const LTIPixel *backgroundPixel)
249 {
250 if (backgroundPixel != NULL)
251 {
252 LTIPixel mergedPixel(this->getPixelProps());
253 mergedPixel.setNonAlphaSampleValuesFromPixel(*backgroundPixel);
254 return setBackgroundPixel(&mergedPixel);
255 }
256 else
257 return setBackgroundPixel(NULL);
258 }
259
260 LT_STATUS overrideNoDataPixel(const LTIPixel *nodataPixel)
261 {
262 if (nodataPixel != NULL)
263 {
264 LTIPixel mergedPixel(this->getPixelProps());
265 mergedPixel.setNonAlphaSampleValuesFromPixel(*nodataPixel);
266 return setNoDataPixel(&mergedPixel);
267 }
268 else
269 return setNoDataPixel(NULL);
270 }
271 };
272
275
276 struct LTIOverrideGeoCoordData
277 {
278 LTIOverrideGeoCoordData();
279 ~LTIOverrideGeoCoordData();
280
293 LT_STATUS setGeoCoord(const LTIGeoCoord& geoCoord);
294
311 LT_STATUS setDefaultGeoCoord(const LTIImage &image);
312
313 LTIGeoCoord *m_geoCoord;
314 bool m_geoCoordImplicit;
315 };
316
317 template<class BASE>
318 struct LTIOverrideGeoCoord : public BASE,
319 protected LTIOverrideGeoCoordData
320 {
321 const LTIGeoCoord &getGeoCoord() const
322 {
323 return *m_geoCoord;
324 }
325
326 bool isGeoCoordImplicit() const
327 {
328 return m_geoCoordImplicit;
329 }
330
331 LT_STATUS overrideGeoCoord(const LTIGeoCoord &geoCoord)
332 {
333 return setGeoCoord(geoCoord);
334 }
335 };
336
339
340 struct LTIOverrideMagnificationData
341 {
342 LTIOverrideMagnificationData();
343
359 LT_STATUS setMagnification(double minMag,
360 double maxMag);
361
362 double m_minMag;
363 double m_maxMag;
364 };
365
366 template<class BASE>
367 struct LTIOverrideMagnification : public BASE,
368 protected LTIOverrideMagnificationData
369 {
370 double getMinMagnification() const
371 {
372 return m_minMag;
373 }
374
375 double getMaxMagnification() const
376 {
377 return m_maxMag;
378 }
379 };
380
383
384 struct LTIOverrideIsSelectiveData
385 {
386 LTIOverrideIsSelectiveData();
387
401 void setIsSelective(bool enable);
402
403 bool m_isSelective;
404 };
405
406 template<class BASE>
407 struct LTIOverrideIsSelective : public BASE,
408 protected LTIOverrideIsSelectiveData
409 {
410 bool isSelective() const
411 {
412 return m_isSelective;
413 }
414 };
415
418
419 struct LTIOverrideStripHeightData
420 {
421 LTIOverrideStripHeightData();
422
423 lt_uint32 m_stripHeight;
424 };
425
426 template<class BASE>
427 struct LTIOverrideStripHeight : public BASE,
428 protected LTIOverrideStripHeightData
429 {
430 lt_uint32 getStripHeight() const
431 {
432 return m_stripHeight;
433 }
434
435 LT_STATUS setStripHeight(lt_uint32 stripHeight)
436 {
437 m_stripHeight = stripHeight;
438 return LT_STS_Success;
439 }
440 };
441
444
445 struct LTIOverrideDelegatesData
446 {
447 LTIOverrideDelegatesData();
448
449 LTIProgressDelegate *m_progressDelegate;
450 LTIInterruptDelegate *m_interruptDelegate;
451 };
452
453 template<class BASE>
454 struct LTIOverrideDelegates : public BASE,
455 protected LTIOverrideDelegatesData
456 {
457 void setProgressDelegate(LTIProgressDelegate* delegate)
458 {
459 m_progressDelegate = delegate;
460 }
461
462 LTIProgressDelegate *getProgressDelegate() const
463 {
464 return m_progressDelegate;
465 }
466
467 void setInterruptDelegate(LTIInterruptDelegate* delegate)
468 {
469 m_interruptDelegate = delegate;
470 }
471
472 LTIInterruptDelegate *getInterruptDelegate() const
473 {
474 return m_interruptDelegate;
475 }
476 };
477
480
481 struct LTIOverridePixelLookupTablesData
482 {
483 LTIOverridePixelLookupTablesData();
484 ~LTIOverridePixelLookupTablesData();
485
501 LT_STATUS setPixelLookupTable(const LTIPixelLookupTable* pixelLookupTable);
502
503 LTIPixelLookupTable *m_pixelLookupTable;
504 };
505
506 template<class BASE>
507 struct LTIOverridePixelLookupTables : public BASE,
508 protected LTIOverridePixelLookupTablesData
509 {
510 const LTIPixelLookupTable *getPixelLookupTable() const
511 {
512 return m_pixelLookupTable;
513 }
514
515 LT_STATUS overridePixelLookupTable(const LTIPixelLookupTable* pixelLookupTable)
516 {
517 return setPixelLookupTable(pixelLookupTable);
518 }
519 };
520
521
524
527
530
531 LT_END_NAMESPACE(LizardTech)
532
533
534 #endif // LTI_IMAGE_STAGE_OVERRIDES_H

LizardTech