MrSID Decode SDK for Raster Reference Manual  9.5.4.4709
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    lt_uint32 getModifications(const LTIScene &scene) const;
00052    LT_STATUS getMetadataBlob(const char *type, LTIOStreamInf *&stream) const;
00053 
00054 
00055 
00056    // LTIImageStage
00057    void setProgressDelegate(LTIProgressDelegate* delegate);
00058    LTIProgressDelegate* getProgressDelegate() const;
00059    void setInterruptDelegate(LTIInterruptDelegate* delegate);
00060    LTIInterruptDelegate* getInterruptDelegate() const;
00061    lt_uint32 getStripHeight() const;
00062    LT_STATUS setStripHeight(lt_uint32 stripHeight);
00063    lt_int64 getEncodingCost(const LTIScene& scene) const;
00064    bool getReaderScene(const LTIScene &decodeScene,
00065                        LTIScene &readerScene) const;
00066 
00067    LT_STATUS overrideBackgroundPixel(const LTIPixel *backgroundPixel);
00068    LT_STATUS overrideNoDataPixel(const LTIPixel *nodataPixel);
00069    LT_STATUS overrideGeoCoord(const LTIGeoCoord &geoCoord);
00070    LT_STATUS overrideDynamicRange(const LTIPixel& drmin,
00071                                   const LTIPixel& drmax);
00072    LT_STATUS overridePixelBPS(lt_uint8);
00073    LT_STATUS overridePixelLookupTable(const LTIPixelLookupTable* pixelLookupTable);
00074    LT_STATUS overrideMetadata(const LTIMetadataDatabase &metadata);
00075    LTIMaskSource *getMask() const;
00076    bool getPipelineInfo(LTIPipelineInfo info) const;
00077 
00078    LTIImageStage *getPreviousStage(void) const;
00079 protected:
00080    LT_STATUS decodeBegin(const LTIPixel &pixelProps,
00081                          const LTIScene &fullScene);
00082    LT_STATUS decodeStrip(LTISceneBuffer &stripBuffer,
00083                          const LTIScene &stripScene);
00084    LT_STATUS decodeEnd(void);
00085 
00086 protected:
00087    LT_STATUS init(LTIImageStage *previousStage);
00088 
00089    // HACK: use when the filter owns resources needed by the previousStage
00090    void releasePreviousStageNow(void);
00091 
00092    // Changes the prev pointer of this filter.  Probably not a good idea.
00093    void changePreviousStage(LTIImageStage* newPref);
00094 
00095 private:
00096    LTIImageStage* m_previousStage;
00097 };
00098 
00099 
00100 LT_END_NAMESPACE(LizardTech)
00101 
00102 #endif // LTI_IMAGEFILTER_H