MrSID Decode SDK for Raster Reference Manual  9.0.0.3864
lti_imageStage.h
Go to the documentation of this file.
00001 /* $Id$ */
00002 /* //////////////////////////////////////////////////////////////////////////
00003 //                                                                         //
00004 // This code is Copyright (c) 2004 LizardTech, Inc, 1008 Western Avenue,   //
00005 // Suite 200, Seattle, WA 98104.  Unauthorized use or distribution         //
00006 // prohibited.  Access to and use of this code is permitted only under     //
00007 // license from LizardTech, Inc.  Portions of the code are protected by    //
00008 // US and foreign patents and other filings. All Rights Reserved.          //
00009 //                                                                         //
00011 /* PUBLIC */
00012 
00013 #ifndef LTI_IMAGESTAGE_H
00014 #define LTI_IMAGESTAGE_H
00015 
00016 // lt_lib_mrsid_core
00017 #include "lti_image.h"
00018 
00019 LT_BEGIN_NAMESPACE(LizardTech)
00020 
00021 
00028 class LTIImageStage : public LTIImage
00029 {
00030    LTI_REFERENCE_COUNTED_BOILERPLATE_BASE(LTIImageStage);
00031 public:
00046    virtual void setProgressDelegate(LTIProgressDelegate* delegate) = 0;
00047 
00061    virtual LTIProgressDelegate* getProgressDelegate() const = 0;
00062 
00077    virtual void setInterruptDelegate(LTIInterruptDelegate* delegate) = 0;
00078 
00092    virtual LTIInterruptDelegate* getInterruptDelegate() const = 0;
00093 
00111    LT_STATUS read(const LTIScene& scene,
00112                   LTISceneBuffer& buffer);
00113 
00126    virtual LT_STATUS readBegin(const LTIPixel &pixelProps,
00127                                const LTIScene &fullScene);
00128 
00148    virtual LT_STATUS readStrip(LTISceneBuffer &buffer,
00149                                const LTIScene &stripScene);
00150 
00161    virtual LT_STATUS readEnd();
00162 
00174    virtual lt_uint32 getStripHeight() const = 0;
00175 
00188    virtual LT_STATUS setStripHeight(lt_uint32 stripHeight) = 0;
00189 
00201    virtual lt_int64 getEncodingCost(const LTIScene& scene) const = 0;
00202 
00214    virtual bool getReaderScene(const LTIScene &decodeScene,
00215                                LTIScene &readerScene) const = 0;
00216 
00225    lt_uint32 getNumStrips() const;
00226 
00237    LTIScene getStripScene(lt_uint32 stripNumber) const;
00238 
00247    virtual LT_STATUS overrideBackgroundPixel(const LTIPixel *backgroundPixel) = 0;
00248 
00258    virtual LT_STATUS overrideNoDataPixel(const LTIPixel *nodataPixel) = 0;
00259 
00268    virtual LT_STATUS overrideGeoCoord(const LTIGeoCoord &geoCoord) = 0;
00269 
00273    virtual LT_STATUS overrideDynamicRange(const LTIPixel& drmin,
00274                                           const LTIPixel& drmax) = 0;
00275 
00279    virtual LT_STATUS overridePixelBPS(lt_uint8) = 0;
00280 
00284    virtual LT_STATUS overridePixelLookupTable(const LTIPixelLookupTable* pixelLookupTable) = 0;
00285 
00289    virtual LT_STATUS overrideMetadata(const LTIMetadataDatabase &metadata) = 0;
00290 
00291    // for LizardTech internal use only
00292    virtual LTIMaskSource *getMask() const = 0;
00293    virtual bool getPipelineInfo(LTIPipelineInfo info) const = 0;
00294 protected:
00306    LT_STATUS fillBackground(const LTIScene& scene,
00307                             LTISceneBuffer& buffer);
00308 
00319    LT_STATUS fillBackground(const LTIScene &scene,
00320                             LTISceneBuffer &buffer,
00321                             const LTIPixel &color);
00322 
00323    bool isBandSelected(const LTIPixel &pixelProps) const;
00338    virtual LT_STATUS decodeBegin(const LTIPixel &pixelProps,
00339                                  const LTIScene &fullScene) = 0;
00340 
00355    virtual LT_STATUS decodeStrip(LTISceneBuffer &stripBuffer,
00356                                  const LTIScene &stripScene) = 0;
00357 
00370    virtual LT_STATUS decodeEnd(void) = 0;
00371 
00380    const LTIScene &getFullScene() const;
00381 
00382 private:
00386    LT_STATUS validateReadRequest(const LTIPixel &pixelProps,
00387                                  const LTIScene &scene) const;
00388    LT_STATUS validateReadRequest(const LTISceneBuffer &buffer,
00389                                  const LTIScene &scene) const;
00390 
00391    LT_STATUS checkDelegates(const LTIScene*, bool);
00392 
00393    struct StripMarcher;
00394    StripMarcher* m_stripMarcher;
00395 };
00396 
00397 LT_END_NAMESPACE(LizardTech)
00398 
00399 #endif // LTI_IMAGESTAGE_H