MrSID Decode SDK for Raster Reference Manual
9.0.0.3864
|
00001 /* ////////////////////////////////////////////////////////////////////////// 00002 // // 00003 // This code is Copyright (c) 2010 LizardTech, Inc, 1008 Western Avenue, // 00004 // Suite 200, Seattle, WA 98104. Unauthorized use or distribution // 00005 // prohibited. Access to and use of this code is permitted only under // 00006 // license from LizardTech, Inc. Portions of the code are protected by // 00007 // US and foreign patents and other filings. All Rights Reserved. // 00008 // // 00010 /* PUBLIC */ 00011 00012 #ifndef ImageReader_H 00013 #define ImageReader_H 00014 00015 // lt_lib_base 00016 #include "lt_base.h" 00017 00018 // lt_lib_mrsid_core 00019 #include "lti_geoImageReader.h" 00020 00021 // local 00022 #include "nitf_types.h" 00023 00024 LT_BEGIN_LIZARDTECH_NAMESPACE 00025 class LTFileSpec; 00026 class LTIOStreamInf; 00027 class LTReusableBuffer; 00028 class NITFReaderManager; 00029 00030 namespace Nitf { 00031 class FileHeader; 00032 class ImageSegment; 00033 class ImageSegmentMetadata; 00034 class SecurityMetadata; 00035 00036 00046 class ImageReader : public LTIGeoImageReader 00047 { 00048 LT_DISALLOW_COPY_CONSTRUCTOR(ImageReader); 00049 public: 00053 const char* getIID1() const; 00054 00055 lt_int64 getPhysicalFileSize() const; 00056 00057 // not for public use 00058 NITFReaderManager& getManager() const; 00059 00063 Format getFormat() const; 00064 00068 Layout getLayout() const; 00069 00073 bool isBlocked() const; 00074 00078 bool isMasked() const; 00079 00083 int getSegmentNumber() const; 00084 00088 const ImageSegmentMetadata* getImageMetadata() const; 00089 00093 const SecurityMetadata* getSecurityMetadata() const; 00094 00095 // inherited 00096 LT_STATUS getDimsAtMag(double mag, 00097 lt_uint32& width, 00098 lt_uint32& height) const = 0; 00099 00100 // not for public use 00101 // does NOT take ownership of the tileList array 00102 // this version returns failure, only override is for JP2 image segments 00103 virtual LT_STATUS setTileMaskList(const lt_uint32* tileMaskList, lt_uint32 tileMaskListLen); 00104 00105 protected: 00106 ~ImageReader(void); 00107 ImageReader(bool supportBandSelection); 00108 00109 const char *getSourceName(void) const; 00110 00111 LT_STATUS init(LTIOStreamInf *stream, 00112 NITFReaderManager *manager, 00113 const ImageSegment *imageSegment, 00114 bool useWorldFile); 00115 00116 LT_STATUS addUnderlyingMetadata(const LTIImageStage &image); 00117 00118 // blocked image support 00119 LTIScene computeBlockedScene(const LTIScene& scene) const; 00120 LT_STATUS copyIntoUserBuffer(const LTIScene& dstScene, 00121 LTISceneBuffer& dstBuffer) const; 00122 bool activeSceneContains(const LTIScene& scene) const; 00123 void putBlockIntoBuffer_SEQ(LTISceneBuffer& cBuffer, 00124 lt_uint8* buf, 00125 lt_uint32 blockRow, 00126 lt_uint32 blockCol, 00127 lt_uint32 blockBand) const; 00128 void putBlockIntoBuffer_BLOCK(LTISceneBuffer& cBuffer, 00129 lt_uint8* buf, 00130 lt_uint32 blockRow, 00131 lt_uint32 blockCol) const; 00132 void putBlockIntoBuffer_PIXEL(LTISceneBuffer& cBuffer, 00133 lt_uint8* buf, 00134 lt_uint32 blockRow, 00135 lt_uint32 blockCol) const; 00136 void putBlockIntoBuffer_ROW(LTISceneBuffer& cBuffer, 00137 lt_uint8* buf, 00138 lt_uint32 blockRow, 00139 lt_uint32 blockCol) const; 00140 00141 00142 00143 LTIOStreamInf *m_stream; 00144 NITFReaderManager *m_manager; 00145 00146 const ImageSegment *m_imageSegment; 00147 const FileHeader *m_fileHeader; 00148 00149 LTReusableBuffer *m_reusableBuffer; 00150 LTIScene *m_activeScene; 00151 LTISceneBuffer *m_activeSceneBuffer; 00152 }; 00153 00154 00155 } 00156 LT_END_LIZARDTECH_NAMESPACE 00157 00158 #endif // ImageReader_H