MrSID Decode SDK for Raster Reference Manual  9.0.0.3864
lti_colorTransformer.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_COLORTRANSFORMER_H
00014 #define LTI_COLORTRANSFORMER_H
00015 
00016 // lt_lib_mrsid_core
00017 #include "lti_imageFilter.h"
00018 #include "lti_imageStageOverrides.h"
00019 
00020 
00021 LT_BEGIN_NAMESPACE(LizardTech)
00022 
00023 
00035 #ifdef SWIG
00036 class LTIColorTransformer : public LTIImageFilter
00037 #else
00038 class LTIColorTransformer : public LTIOverridePixelProps
00039                                    <LTIOverrideBackgroundPixel
00040                                    <LTIImageFilter> >
00041 #endif
00042 {
00043    LTI_REFERENCE_COUNTED_BOILERPLATE(LTIColorTransformer);
00044 public:
00055    LT_STATUS initialize(LTIImageStage* srcImage,
00056                         const LTIPixel &dstPixel);
00057 
00058    static bool isSupportedTransform(const LTIPixel &srcPixel,
00059                                     const LTIPixel &dstPixel);
00060 
00061    // LTIImageStage
00062    virtual lt_uint32 getModifications(const LTIScene &scene) const;
00063 
00064 
00065    static LT_STATUS push(LTIImageStage *&pipeline, const LTIPixel &pixelProps);
00066    
00067    static LT_STATUS transformPixel(LTIPixel &newPixel, const LTIPixel &oldPixel);
00068 
00069    static LT_STATUS transformBuffer(LTISceneBuffer &dstData, LTISceneBuffer &srcData);
00070 
00071 protected:
00072    LT_STATUS decodeBegin(const LTIPixel &pixelProps,
00073                          const LTIScene &fullScene);
00074    LT_STATUS decodeStrip(LTISceneBuffer &stripBuffer,
00075                          const LTIScene &stripScene);
00076    LT_STATUS decodeEnd(void);
00077 
00078 private:
00079    LTIPixel *m_tmpDstPixel;
00080    LTIPixel *m_tmpSrcPixel;
00081    bool m_isIdentity;
00082 };
00083 
00084 
00085 LT_END_NAMESPACE(LizardTech)
00086 
00087 
00088 #endif // LTI_COLORTRANSFORMER_H