MrSID Decode SDK for Raster Reference Manual  9.5.1.4427
lti_imageFilter.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_IMAGEFILTER_H
00014 #define LTI_IMAGEFILTER_H
00015 
00016 // lt_lib_mrsid_core
00017 #include "lti_imageStage.h"
00018 #include "lti_imageStageOverrides.h"
00019 
00020 LT_BEGIN_NAMESPACE(LizardTech)
00021 
00022 
00029 class LTIImageFilter : public LTIImageStage
00030 {
00031    LTI_REFERENCE_COUNTED_BOILERPLATE_BASE(LTIImageFilter);
00032 public:
00033    // LTIImage
00034    lt_uint32 getWidth() const;
00035    lt_uint32 getHeight() const;
00036    LT_STATUS getDimsAtMag(double mag,
00037                           lt_uint32 &width,
00038                           lt_uint32 &height) const;
00039    const LTIPixel &getPixelProps() const;
00040    const LTIPixel *getBackgroundPixel() const;
00041    const LTIPixel *getNoDataPixel() const;
00042    const LTIPixelLookupTable *getPixelLookupTable() const;
00043    const LTIPixel &getMinDynamicRange() const;
00044    const LTIPixel &getMaxDynamicRange() const;
00045    const LTIGeoCoord &getGeoCoord() const;
00046    bool isGeoCoordImplicit() const;
00047    const LTIMetadataDatabase &getMetadata() const;
00048    double getMinMagnification() const;
00049    double getMaxMagnification() const;
00050    bool isSelective() const;
00051 
00052 
00053    // LTIImageStage
00054    void setProgressDelegate(LTIProgressDelegate* delegate);
00055    LTIProgressDelegate* getProgressDelegate() const;
00056    void setInterruptDelegate(LTIInterruptDelegate* delegate);
00057    LTIInterruptDelegate* getInterruptDelegate() const;
00058    lt_uint32 getStripHeight() const;
00059    LT_STATUS setStripHeight(lt_uint32 stripHeight);
00060    lt_int64 getEncodingCost(const LTIScene& scene) const;
00061    bool getReaderScene(const LTIScene &decodeScene,
00062                        LTIScene &readerScene) const;
00063    virtual lt_uint32 getModifications(const LTIScene &scene) const;
00064 
00065    LT_STATUS overrideBackgroundPixel(const LTIPixel *backgroundPixel);
00066    LT_STATUS overrideNoDataPixel(const LTIPixel *nodataPixel);
00067    LT_STATUS overrideGeoCoord(const LTIGeoCoord &geoCoord);
00068    LT_STATUS overrideDynamicRange(const LTIPixel& drmin,
00069                                   const LTIPixel& drmax);
00070    LT_STATUS overridePixelBPS(lt_uint8);
00071    LT_STATUS overridePixelLookupTable(const LTIPixelLookupTable* pixelLookupTable);
00072    LT_STATUS overrideMetadata(const LTIMetadataDatabase &metadata);
00073    LTIMaskSource *getMask() const;
00074    bool getPipelineInfo(LTIPipelineInfo info) const;
00075 
00076    LTIImageStage *getPreviousStage(void) const;
00077 protected:
00078    LT_STATUS decodeBegin(const LTIPixel &pixelProps,
00079                          const LTIScene &fullScene);
00080    LT_STATUS decodeStrip(LTISceneBuffer &stripBuffer,
00081                          const LTIScene &stripScene);
00082    LT_STATUS decodeEnd(void);
00083 
00084 protected:
00085    LT_STATUS init(LTIImageStage *previousStage);
00086 
00087    // HACK: use when the filter owns resources needed by the previousStage
00088    void releasePreviousStageNow(void);
00089 
00090    // Changes the prev pointer of this filter.  Probably not a good idea.
00091    void changePreviousStage(LTIImageStage* newPref);
00092 
00093 private:
00094    LTIImageStage* m_previousStage;
00095 };
00096 
00097 
00098 LT_END_NAMESPACE(LizardTech)
00099 
00100 #endif // LTI_IMAGEFILTER_H