MrSID Decode SDK for Raster Reference Manual  9.0.0.3864
MrSIDImageReader.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 MRSIDIMAGEREADER_H
00014 #define MRSIDIMAGEREADER_H
00015 
00016 // lt_lib_mrsid_mrsidReader
00017 #include "MrSIDImageReaderBase.h"
00018 #include "lti_imageFilter.h"
00019 
00020 
00021 LT_BEGIN_NAMESPACE(LizardTech)
00022 
00023 class MrSIDImageStageManager;
00024 class LTIMosaicFilter;
00025 class MG2ImageReader;
00026 class MG3SingleImageReader;
00027 class MG4SingleImageReader;
00028 
00035 class MrSIDImageReader : public LTIImageFilter,
00036                          public MrSIDImageReaderInterface
00037 {
00038    LTI_REFERENCE_COUNTED_BOILERPLATE(MrSIDImageReader);
00039 public:
00050    LT_STATUS initialize(const LTFileSpec& fileSpec,
00051                         bool useWorldFile = false,
00052                         MrSIDMemoryUsage memoryUsage = MRSID_MEMORY_USAGE_DEFAULT,
00053                         MrSIDStreamUsage streamUsage = MRSID_STREAM_USAGE_DEFAULT);
00054 
00065    LT_STATUS initialize(LTIOStreamInf* stream,
00066                         LTIOStreamInf* worldFileStream = NULL,
00067                         MrSIDMemoryUsage memoryUsage = MRSID_MEMORY_USAGE_DEFAULT,
00068                         MrSIDStreamUsage streamUsage = MRSID_STREAM_USAGE_DEFAULT);
00069 
00070    // LTIImageStage
00071    virtual lt_int64 getEncodingCost(const LTIScene& scene) const;
00072    virtual lt_uint32 getModifications(const LTIScene &scene) const;
00073 
00074    // MrSIDImageReaderInterface overrides
00075    lt_uint8 getNumLevels(void) const;
00076    bool isLocked(void) const;
00077    void setMaxWorkerThreads(int numThreads);
00078    int getMaxWorkerThreads() const;
00079 
00080    // for LizardTech internal use only
00081    const MrSIDImageStageManager &getManager(void) const;
00082    // for LizardTech internal use only
00083    const LTIMosaicFilter *getMosaicFilter(void) const;
00084    // for LizardTech internal use only
00085    const MG2ImageReader *getMG2ImageReader(void) const;
00086    // for LizardTech internal use only
00087    const MG3SingleImageReader *getMG3ImageReader(void) const;
00088    // for LizardTech internal use only
00089    const MG4SingleImageReader *getMG4ImageReader(void) const;
00090 
00091 protected:
00092    LT_STATUS protectedInit(LTIOStreamInf *worldfile,
00093                            bool deleteImages);
00094 
00095    MrSIDImageStageManager *m_manager;
00096    LTIMosaicFilter *m_mosaicFilter;
00097    MrSIDSingleImageReaderBase *m_mrsidReader;
00098    lt_uint8 m_numLevels;
00099    bool m_isLocked;
00100 };
00101 
00102 
00103 LT_END_NAMESPACE(LizardTech)
00104 
00105 #endif // MRSIDIMAGEREADER_H