MrSID Decode SDK for Raster Reference Manual  9.5.4.4709
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 
21 
22 
23 
27 {
28  LTIOverrideMetadataData();
29  ~LTIOverrideMetadataData();
30 
31  LT_STATUS createMetadata(const LTIMetadataDatabase *metadata);
32  LTIMetadataDatabase &getMetadata();
33 
35 };
36 
37 
38 template<class BASE>
39 struct LTIOverrideMetadata : public BASE,
41 {
43  {
44  return *m_metadata;
45  }
46 
48  {
50  }
51 };
52 
55 
57 {
59 
73 
76 };
77 
78 template<class BASE>
79 struct LTIOverrideDimensions : public BASE,
81 
82 {
84  {
85  return m_width;
86  }
87 
89  {
90  return m_height;
91  }
92 };
93 
96 
98 {
101 
115  LT_STATUS setPixelProps(const LTIPixel& pixelProps);
117 
136  LT_STATUS setDynamicRange(const LTIPixel& drmin,
137  const LTIPixel& drmax);
138 
154 
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 
170  {
171  return *m_drminPixel;
172  }
173 
175  {
176  return *m_drmaxPixel;
177  }
178 
180  {
181  return setPixelBPS(bps);
182  }
183 
185  const LTIPixel& drmax)
186  {
187  return setDynamicRange(drmin, drmax);
188  }
189 };
190 
193 
195 {
198 
212  LT_STATUS setBackgroundPixel(const LTIPixel* backgroundPixel);
213 
227  LT_STATUS setNoDataPixel(const LTIPixel* nodataPixel);
228 
231 };
232 
233 
234 template<class BASE>
235 struct LTIOverrideBackgroundPixel : public BASE,
237 {
238 public:
240  {
241  return m_backgroundPixel;
242  }
243  const LTIPixel *getNoDataPixel() const
244  {
245  return m_nodataPixel;
246  }
247 
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 
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 
277 {
280 
293  LT_STATUS setGeoCoord(const LTIGeoCoord& geoCoord);
294 
311  LT_STATUS setDefaultGeoCoord(const LTIImage &image);
312 
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 
332  {
333  return setGeoCoord(geoCoord);
334  }
335 };
336 
339 
341 {
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,
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 
385 {
387 
401  void setIsSelective(bool enable);
402 
404 };
405 
406 template<class BASE>
407 struct LTIOverrideIsSelective : public BASE,
409 {
410  bool isSelective() const
411  {
412  return m_isSelective;
413  }
414 };
415 
418 
420 {
422 
424 };
425 
426 template<class BASE>
427 struct LTIOverrideStripHeight : public BASE,
429 {
431  {
432  return m_stripHeight;
433  }
434 
436  {
437  m_stripHeight = stripHeight;
438  return LT_STS_Success;
439  }
440 };
441 
444 
446 {
448 
451 };
452 
453 template<class BASE>
454 struct LTIOverrideDelegates : public BASE,
455  protected LTIOverrideDelegatesData
456 {
458  {
459  m_progressDelegate = delegate;
460  }
461 
463  {
464  return m_progressDelegate;
465  }
466 
468  {
469  m_interruptDelegate = delegate;
470  }
471 
473  {
474  return m_interruptDelegate;
475  }
476 };
477 
480 
482 {
485 
501  LT_STATUS setPixelLookupTable(const LTIPixelLookupTable* pixelLookupTable);
502 
504 };
505 
506 template<class BASE>
507 struct LTIOverridePixelLookupTables : public BASE,
509 {
511  {
512  return m_pixelLookupTable;
513  }
514 
516  {
517  return setPixelLookupTable(pixelLookupTable);
518  }
519 };
520 
521 
524 
527 
530 
532 
533 
534 #endif // LTI_IMAGE_STAGE_OVERRIDES_H
LTIMetadataDatabase * m_metadata
#define LT_STS_Success
status code indicating success
Definition: lt_status.h:52
LT_STATUS overrideDynamicRange(const LTIPixel &drmin, const LTIPixel &drmax)
LT_STATUS setStripHeight(lt_uint32 stripHeight)
LT_STATUS setBackgroundPixel(const LTIPixel *backgroundPixel)
set the background color of the image
LT_STATUS setNoDataPixel(const LTIPixel *nodataPixel)
set the "no data" (transparency) color of the image
LT_STATUS overrideNoDataPixel(const LTIPixel *nodataPixel)
LT_STATUS setDefaultDynamicRange(void)
set the dynamic range of the image
#define LT_END_NAMESPACE(theNameSpace)
compiler does not support namespaces
Definition: lt_define.h:85
lt_uint32 getStripHeight() const
LT_STATUS createMetadata(const LTIMetadataDatabase *metadata)
LT_STATUS setDefaultGeoCoord(const LTIImage &image)
set the geographic coordinates of the image
represents a geographic coordinate
Definition: lti_geoCoord.h:32
const LTIPixel & getMaxDynamicRange() const
const LTIPixel * getBackgroundPixel() const
LTIInterruptDelegate * m_interruptDelegate
LT_STATUS setPixelLookupTable(const LTIPixelLookupTable *pixelLookupTable)
set the color lookup table
color lookup table
lt_uint32 LT_STATUS
An integral status code.
Definition: lt_status.h:39
LT_STATUS overridePixelLookupTable(const LTIPixelLookupTable *pixelLookupTable)
LTIProgressDelegate * getProgressDelegate() const
const LTIPixel & getPixelProps() const
LT_STATUS setMagnification(double minMag, double maxMag)
set the minimum and maximum magnifications of the image properties
LTIInterruptDelegate * getInterruptDelegate() const
LT_STATUS setGeoCoord(const LTIGeoCoord &geoCoord)
set the geographic coordinates of the image
const LTIPixel * getNoDataPixel() const
void setInterruptDelegate(LTIInterruptDelegate *delegate)
LT_STATUS overridePixelBPS(lt_uint8 bps)
class for storing metadata associated with an image
void setProgressDelegate(LTIProgressDelegate *delegate)
basic properties of a pixel
Definition: lti_pixel.h:36
void setIsSelective(bool enable)
set image to support "random access"
lt_uint32 getHeight() const
LTIProgressDelegate * m_progressDelegate
const LTIMetadataDatabase & getMetadata() const
abstract class representing an image
Definition: lti_image.h:32
void setNonAlphaSampleValuesFromPixel(const LTIPixel &src)
sets all samples to minimum
LT_STATUS overrideBackgroundPixel(const LTIPixel *backgroundPixel)
This file contains a number of enums, typedefs, etc, that are used throughout the MrSID SDK...
LT_STATUS setDimensions(lt_uint32 width, lt_uint32 height)
set width and height of the image
#define LT_BEGIN_NAMESPACE(theNameSpace)
compiler does not support namespaces
Definition: lt_define.h:84
unsigned int lt_uint32
unsigned 32-bit integer
Definition: lt_types.h:54
LT_STATUS setDynamicRange(const LTIPixel &drmin, const LTIPixel &drmax)
set the dynamic range of the image
LT_STATUS overrideMetadata(const LTIMetadataDatabase &metadata)
LT_STATUS setPixelProps(const LTIPixel &pixelProps)
set pixel properties of the image
interrupt delegate (callback) base class
Definition: lti_delegates.h:39
unsigned char lt_uint8
unsigned 8-bit integer
Definition: lt_types.h:46
const LTIGeoCoord & getGeoCoord() const
const LTIPixelLookupTable * getPixelLookupTable() const
LT_STATUS overrideGeoCoord(const LTIGeoCoord &geoCoord)
const LTIPixel & getMinDynamicRange() const
progress delegate (callback) base class
Definition: lti_delegates.h:72
LT_STATUS setPixelBPS(lt_uint8 bps)

LizardTech