00001
00002
00003
00004
00005
00006
00007
00008
00009
00011
00012
00013 #ifndef LTI_EMBEDDED_IMAGE_H
00014 #define LTI_EMBEDDED_IMAGE_H
00015
00016
00017 #include "lti_imageFilter.h"
00018 #include "lti_imageStageOverrides.h"
00019 #include "lti_scene.h"
00020 #include "lti_sceneBuffer.h"
00021
00022 LT_BEGIN_NAMESPACE(LizardTech)
00023
00024
00039 #ifdef SWIG
00040 class LTIEmbeddedImage : public LTIImageFilter
00041 #else
00042 class LTIEmbeddedImage : public LTIOverrideDimensions
00043 <LTIOverrideBackgroundPixel
00044 <LTIOverrideGeoCoord
00045 <LTIImageFilter> > >
00046 #endif
00047 {
00048 LTI_REFERENCE_COUNTED_BOILERPLATE(LTIEmbeddedImage);
00049 public:
00068 LT_STATUS initialize(LTIImageStage* srcImage,
00069 lt_uint32 newWidth,
00070 lt_uint32 newHeight,
00071 double newXPos,
00072 double newYPos,
00073 const LTIPixel* backgroundPixel,
00074 const LTIPixel* nodataPixel);
00075
00076
00077
00078 LT_STATUS getDimsAtMag(double mag,
00079 lt_uint32 &width,
00080 lt_uint32 &height) const;
00081
00082
00083 lt_int64 getEncodingCost(const LTIScene& scene) const;
00084 bool getReaderScene(const LTIScene &decodeScene,
00085 LTIScene &readerScene) const;
00086
00087
00094 LT_STATUS setFillingBackground(bool fill);
00095
00101 bool getFillingBackground(void) const;
00102
00108 LT_STATUS setFillMethod(LTIPixelFillMethod method,
00109 double fuzzyThreshold );
00110
00114 LTIPixelFillMethod getFillMethod(void) const;
00115 double getFuzzyThreshold(void) const;
00116
00117
00118 virtual lt_uint32 getModifications(const LTIScene &scene) const;
00119
00120
00121 lt_int32 getChildXPosAtMag(double mag) const;
00122
00123 lt_int32 getChildYPosAtMag(double mag) const;
00124
00125 bool getChildScene(const LTIScene &parentScene, LTIScene &childScene) const;
00126
00127 protected:
00128 LT_STATUS decodeBegin(const LTIPixel &pixelProps,
00129 const LTIScene &fullScene);
00130 LT_STATUS decodeStrip(LTISceneBuffer &stripBuffer,
00131 const LTIScene &stripScene);
00132 LT_STATUS decodeEnd(void);
00133
00134 private:
00135 double m_childXPos_P;
00136 double m_childYPos_P;
00137
00138 LTIScene m_parentScene;
00139 LTIScene m_childScene;
00140 bool m_haveAnything;
00141 lt_int32 m_firstStrip;
00142 lt_int32 m_lastStrip;
00143
00144 bool m_fillingBackground;
00145 LTIPixelFillMethod m_fillMethod;
00146 double m_fuzzyThreshold;
00147
00148 LTIPixel *m_decodePixelProps;
00149 };
00150
00151
00152 LT_END_NAMESPACE(LizardTech)
00153
00154 #endif // LTI_EMBEDDED_IMAGE_H