00001
00002
00003
00004
00005
00006
00007
00008
00009
00011
00012
00013 #ifndef LTI_IMAGE_STAGE_OVERRIDES_H
00014 #define LTI_IMAGE_STAGE_OVERRIDES_H
00015
00016
00017 #include "lti_types.h"
00018
00019 LT_BEGIN_NAMESPACE(LizardTech)
00020
00021
00022
00023
00024
00025 struct LTIOverrideMetadataData
00026 {
00027 LTIOverrideMetadataData();
00028 ~LTIOverrideMetadataData();
00029
00030 LT_STATUS createMetadata(const LTIMetadataDatabase *metadata);
00031 LTIMetadataDatabase &getMetadata();
00032
00033 LTIMetadataDatabase *m_metadata;
00034 };
00035
00036
00037 template<class BASE>
00038 struct LTIOverrideMetadata : public BASE,
00039 protected LTIOverrideMetadataData
00040 {
00041 const LTIMetadataDatabase &getMetadata() const
00042 {
00043 return *m_metadata;
00044 }
00045
00046 LT_STATUS overrideMetadata(const LTIMetadataDatabase &metadata)
00047 {
00048 return LTIOverrideMetadataData::createMetadata(&metadata);
00049 }
00050 };
00051
00054
00055 struct LTIOverrideDimensionsData
00056 {
00057 LTIOverrideDimensionsData();
00058
00071 LT_STATUS setDimensions(lt_uint32 width, lt_uint32 height);
00072
00073 lt_uint32 m_width;
00074 lt_uint32 m_height;
00075 };
00076
00077 template<class BASE>
00078 struct LTIOverrideDimensions : public BASE,
00079 protected LTIOverrideDimensionsData
00080
00081 {
00082 lt_uint32 getWidth() const
00083 {
00084 return m_width;
00085 }
00086
00087 lt_uint32 getHeight() const
00088 {
00089 return m_height;
00090 }
00091 };
00092
00095
00096 struct LTIOverridePixelPropsData
00097 {
00098 LTIOverridePixelPropsData();
00099 ~LTIOverridePixelPropsData();
00100
00114 LT_STATUS setPixelProps(const LTIPixel& pixelProps);
00115 LT_STATUS setPixelBPS(lt_uint8 bps);
00116
00135 LT_STATUS setDynamicRange(const LTIPixel& drmin,
00136 const LTIPixel& drmax);
00137
00152 LT_STATUS setDefaultDynamicRange(void);
00153
00154 LTIPixel *m_pixelProps;
00155 LTIPixel *m_drminPixel;
00156 LTIPixel *m_drmaxPixel;
00157 };
00158
00159 template<class BASE>
00160 struct LTIOverridePixelProps : public BASE,
00161 protected LTIOverridePixelPropsData
00162 {
00163 const LTIPixel &getPixelProps() const
00164 {
00165 return *m_pixelProps;
00166 }
00167
00168 const LTIPixel &getMinDynamicRange() const
00169 {
00170 return *m_drminPixel;
00171 }
00172
00173 const LTIPixel &getMaxDynamicRange() const
00174 {
00175 return *m_drmaxPixel;
00176 }
00177
00178 LT_STATUS overridePixelBPS(lt_uint8 bps)
00179 {
00180 return setPixelBPS(bps);
00181 }
00182
00183 LT_STATUS overrideDynamicRange(const LTIPixel& drmin,
00184 const LTIPixel& drmax)
00185 {
00186 return setDynamicRange(drmin, drmax);
00187 }
00188 };
00189
00192
00193 struct LTIOverrideBackgroundPixelData
00194 {
00195 LTIOverrideBackgroundPixelData();
00196 ~LTIOverrideBackgroundPixelData();
00197
00211 LT_STATUS setBackgroundPixel(const LTIPixel* backgroundPixel);
00212
00226 LT_STATUS setNoDataPixel(const LTIPixel* nodataPixel);
00227
00228 LTIPixel *m_backgroundPixel;
00229 LTIPixel *m_nodataPixel;
00230 };
00231
00232
00233 template<class BASE>
00234 struct LTIOverrideBackgroundPixel : public BASE,
00235 protected LTIOverrideBackgroundPixelData
00236 {
00237 public:
00238 const LTIPixel *getBackgroundPixel() const
00239 {
00240 return m_backgroundPixel;
00241 }
00242 const LTIPixel *getNoDataPixel() const
00243 {
00244 return m_nodataPixel;
00245 }
00246
00247 LT_STATUS overrideBackgroundPixel(const LTIPixel *backgroundPixel)
00248 {
00249 return setBackgroundPixel(backgroundPixel);
00250 }
00251 LT_STATUS overrideNoDataPixel(const LTIPixel *nodataPixel)
00252 {
00253 return setNoDataPixel(nodataPixel);
00254 }
00255 };
00256
00259
00260 struct LTIOverrideGeoCoordData
00261 {
00262 LTIOverrideGeoCoordData();
00263 ~LTIOverrideGeoCoordData();
00264
00277 LT_STATUS setGeoCoord(const LTIGeoCoord& geoCoord);
00278
00295 LT_STATUS setDefaultGeoCoord(const LTIImage &image);
00296
00297 LTIGeoCoord *m_geoCoord;
00298 bool m_geoCoordImplicit;
00299 };
00300
00301 template<class BASE>
00302 struct LTIOverrideGeoCoord : public BASE,
00303 protected LTIOverrideGeoCoordData
00304 {
00305 const LTIGeoCoord &getGeoCoord() const
00306 {
00307 return *m_geoCoord;
00308 }
00309
00310 bool isGeoCoordImplicit() const
00311 {
00312 return m_geoCoordImplicit;
00313 }
00314
00315 LT_STATUS overrideGeoCoord(const LTIGeoCoord &geoCoord)
00316 {
00317 return setGeoCoord(geoCoord);
00318 }
00319 };
00320
00323
00324 struct LTIOverrideMagnificationData
00325 {
00326 LTIOverrideMagnificationData();
00327
00343 LT_STATUS setMagnification(double minMag,
00344 double maxMag);
00345
00346 double m_minMag;
00347 double m_maxMag;
00348 };
00349
00350 template<class BASE>
00351 struct LTIOverrideMagnification : public BASE,
00352 protected LTIOverrideMagnificationData
00353 {
00354 double getMinMagnification() const
00355 {
00356 return m_minMag;
00357 }
00358
00359 double getMaxMagnification() const
00360 {
00361 return m_maxMag;
00362 }
00363 };
00364
00367
00368 struct LTIOverrideIsSelectiveData
00369 {
00370 LTIOverrideIsSelectiveData();
00371
00385 void setIsSelective(bool enable);
00386
00387 bool m_isSelective;
00388 };
00389
00390 template<class BASE>
00391 struct LTIOverrideIsSelective : public BASE,
00392 protected LTIOverrideIsSelectiveData
00393 {
00394 bool isSelective() const
00395 {
00396 return m_isSelective;
00397 }
00398 };
00399
00402
00403 struct LTIOverrideStripHeightData
00404 {
00405 LTIOverrideStripHeightData();
00406
00407 lt_uint32 m_stripHeight;
00408 };
00409
00410 template<class BASE>
00411 struct LTIOverrideStripHeight : public BASE,
00412 protected LTIOverrideStripHeightData
00413 {
00414 lt_uint32 getStripHeight() const
00415 {
00416 return m_stripHeight;
00417 }
00418
00419 LT_STATUS setStripHeight(lt_uint32 stripHeight)
00420 {
00421 m_stripHeight = stripHeight;
00422 return LT_STS_Success;
00423 }
00424 };
00425
00428
00429 struct LTIOverrideDelegatesData
00430 {
00431 LTIOverrideDelegatesData();
00432
00433 LTIProgressDelegate *m_progressDelegate;
00434 LTIInterruptDelegate *m_interruptDelegate;
00435 };
00436
00437 template<class BASE>
00438 struct LTIOverrideDelegates : public BASE,
00439 protected LTIOverrideDelegatesData
00440 {
00441 void setProgressDelegate(LTIProgressDelegate* delegate)
00442 {
00443 m_progressDelegate = delegate;
00444 }
00445
00446 LTIProgressDelegate *getProgressDelegate() const
00447 {
00448 return m_progressDelegate;
00449 }
00450
00451 void setInterruptDelegate(LTIInterruptDelegate* delegate)
00452 {
00453 m_interruptDelegate = delegate;
00454 }
00455
00456 LTIInterruptDelegate *getInterruptDelegate() const
00457 {
00458 return m_interruptDelegate;
00459 }
00460 };
00461
00464
00465 struct LTIOverridePixelLookupTablesData
00466 {
00467 LTIOverridePixelLookupTablesData();
00468 ~LTIOverridePixelLookupTablesData();
00469
00485 LT_STATUS setPixelLookupTable(const LTIPixelLookupTable* pixelLookupTable);
00486
00487 LTIPixelLookupTable *m_pixelLookupTable;
00488 };
00489
00490 template<class BASE>
00491 struct LTIOverridePixelLookupTables : public BASE,
00492 protected LTIOverridePixelLookupTablesData
00493 {
00494 const LTIPixelLookupTable *getPixelLookupTable() const
00495 {
00496 return m_pixelLookupTable;
00497 }
00498
00499 LT_STATUS overridePixelLookupTable(const LTIPixelLookupTable* pixelLookupTable)
00500 {
00501 return setPixelLookupTable(pixelLookupTable);
00502 }
00503 };
00504
00505
00508
00511
00514
00515 LT_END_NAMESPACE(LizardTech)
00516
00517
00518 #endif // LTI_IMAGE_STAGE_OVERRIDES_H