MrSID Decode SDK for Raster Reference Manual
9.5.4.4709
|
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 FileHeader_H 00013 #define FileHeader_H 00014 00015 // local 00016 #include "Segment.h" 00017 00018 00019 LT_BEGIN_LIZARDTECH_NAMESPACE 00020 class LTIOStreamInf; 00021 00022 namespace Nitf { 00023 class ImageSegment; 00024 class GraphicSegment; 00025 class LabelSegment; 00026 class TextSegment; 00027 class DataSegment; 00028 class ReservedSegment; 00029 class FieldReader; 00030 class FileMetadata; 00031 00032 00041 class FileHeader : public Segment 00042 { 00043 public: 00044 // not for public use 00045 FileHeader(NITFReaderManager&, LTIOStreamInf&, lt_int64 fileSize); 00046 ~FileHeader(); 00047 00048 // not for public use 00049 LT_STATUS initialize(); 00050 00058 Version getVersion() const; 00059 00060 // not for public use 00061 LT_STATUS createSegments(ImageSegment**& imageSegments, lt_uint32& numImageSegments, 00062 GraphicSegment**& graphicSegments, lt_uint32& numGraphicSegments, 00063 LabelSegment**& labelSegments, lt_uint32& numLabelSegments, 00064 TextSegment**& textSegments, lt_uint32& numTextSegments, 00065 DataSegment**& dataSegments, lt_uint32& numDataSegments, 00066 ReservedSegment**& resSegments, lt_uint32& numResSegments); 00067 00068 // not for public use 00069 LT_STATUS addMetadataLocal(LTIMetadataDatabase& db) const; 00070 00079 const lt_uint8* getFBKGC() const; 00080 00088 const FileMetadata* getFileMetadata() const; 00089 00090 private: 00091 LT_STATUS readHeader(); 00092 LT_STATUS readData(); 00093 LT_STATUS readHeader_v2x(); 00094 LT_STATUS parseVersion(); 00095 00096 const lt_int64 m_fileSize; 00097 00098 Version m_ver; 00099 char* m_FHDR; // 4 00100 char* m_FVER; // 5 00101 int m_CLEVEL; 00102 char* m_STYPE; // 4 00103 int m_FSCOP; 00104 int m_FSCPYS; 00105 lt_uint8 m_FBKGC[3]; 00106 lt_int64 m_FL; 00107 lt_int64 m_HL; 00108 lt_int32 m_NUMI; 00109 lt_int64* m_LISH; 00110 lt_int64* m_LI; 00111 lt_int32 m_NUMS; 00112 lt_int64* m_LSSH; 00113 lt_int64* m_LS; 00114 lt_int32 m_NUML; 00115 lt_int64* m_LLSH; 00116 lt_int64* m_LL; 00117 lt_int32 m_NUMT; 00118 lt_int64* m_LTSH; 00119 lt_int64* m_LT; 00120 lt_int32 m_NUMDES; 00121 lt_int64* m_LDSH; 00122 lt_int64* m_LD; 00123 lt_int32 m_NUMRES; 00124 lt_int64* m_LRESH; 00125 lt_int64* m_LRE; 00126 00127 char* m_FTITLE; 00128 00129 FileMetadata* m_fileMetadata; 00130 00131 // nope 00132 FileHeader(FileHeader&); 00133 FileHeader& operator=(const FileHeader&); 00134 }; 00135 00136 00137 } 00138 LT_END_LIZARDTECH_NAMESPACE 00139 00140 #endif // FileHeader_H