MrSID Decode SDK for Raster Reference Manual  9.5.4.4709
lti_imageReader.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_IMAGE_READER_H
00014 #define LTI_IMAGE_READER_H
00015 
00016 // lt_lib_mrsid_core
00017 #include "lti_imageStage.h"
00018 #include "lti_imageStageOverrides.h"
00019 
00020 
00021 LT_BEGIN_NAMESPACE(LizardTech)
00022 
00023 
00030 #ifdef SWIG
00031 class LTIImageReader : public LTIImageStage
00032 #else
00033 class LTIImageReader : public LTIOverrideDimensions
00034                               <LTIOverridePixelProps
00035                               <LTIOverrideBackgroundPixel
00036                               <LTIOverrideGeoCoord
00037                               <LTIOverrideMagnification
00038                               <LTIOverrideIsSelective
00039                               <LTIOverrideStripHeight
00040                               <LTIOverrideDelegates
00041                               <LTIOverridePixelLookupTables
00042                               <LTIOverrideMetadata
00043                               <LTIImageStage> > > > > > > > > >
00044 #endif
00045 {
00046    LT_DISALLOW_COPY_CONSTRUCTOR(LTIImageReader);
00047 public:
00048    // LTIImage
00049    LT_STATUS getDimsAtMag(double mag,
00050                           lt_uint32& width,
00051                           lt_uint32& height) const;
00052 
00053    lt_uint32 getModifications(const LTIScene &scene) const;
00054    LT_STATUS getMetadataBlob(const char *type, LTIOStreamInf *&stream) const;
00055 
00056 
00057    // LTIImageStage
00058    LTIMaskSource *getMask() const;
00059    bool getPipelineInfo(LTIPipelineInfo info) const;
00060 
00061    lt_int64 getEncodingCost(const LTIScene& scene) const;
00062    bool getReaderScene(const LTIScene &decodeScene,
00063                        LTIScene &readerScene) const;
00064 
00065    // override too support ImageReaders that don't support band selection
00066    LT_STATUS readBegin(const LTIPixel &pixelProps, const LTIScene &fullScene);
00067    LT_STATUS readStrip(LTISceneBuffer &buffer, const LTIScene &stripScene);
00068    LT_STATUS readEnd(void);
00069 
00070 protected:
00071    LTIImageReader(bool supportBandSelection);
00072 
00073    LT_STATUS init(const LTIImage *image = NULL);
00074 
00075    
00076    LT_STATUS loadMetadataIntoObjects(const LTIMetadataDatabase &fileMetadata,
00077                                      LTIPixel &pixelProps,
00078                                      bool updatePixelProps,
00079                                      bool updateGeoCoord);
00080    virtual const char *getSourceName(void) const = 0;
00081 
00082 protected:
00083    const bool m_supportBandSelection;
00084 };
00085 
00086 
00087 LT_END_NAMESPACE(LizardTech)
00088 
00089 
00090 #endif // LTI_IMAGE_READER_H