MrSID Decode SDK for Raster Reference Manual  9.1.0.4045
DataSegment.h
Go to the documentation of this file.
1 /* //////////////////////////////////////////////////////////////////////////
2 // //
3 // This code is Copyright (c) 2010 LizardTech, Inc, 1008 Western Avenue, //
4 // Suite 200, Seattle, WA 98104. Unauthorized use or distribution //
5 // prohibited. Access to and use of this code is permitted only under //
6 // license from LizardTech, Inc. Portions of the code are protected by //
7 // US and foreign patents and other filings. All Rights Reserved. //
8 // //
10 /* PUBLIC */
11 
12 #ifndef DataSegment_H
13 #define DataSegment_H
14 
15 // lt_lib_base
16 #include "lt_base.h"
17 
18 // local
19 #include "Segment.h"
20 
22 class LTIOStreamInf;
23 
24 namespace Nitf {
25 
26 
34 class DataSegment : public Segment
35 {
36 public:
37  // not for public use -- to get a DataSegment, use NITFReaderManager::getDataSegment
38  DataSegment(NITFReaderManager&, LTIOStreamInf&,
39  int segmentNumber,
40  lt_int64 headerOffset, lt_int64 headerLength,
41  lt_int64 dataOffset, lt_int64 dataLength);
42  ~DataSegment();
43 
44  // not for public use
46 
47  // not for public use
49 
50  // not for public use
52  const char* prefixOverride) const;
53 
54  // not for public use
55  bool verifyIsOverflow(const char* code, bool isU, int segmentNum) const;
56 
64  const char* getDESID() const;
65 
73  const char* getDESVER() const;
74 
82  lt_uint32 getDataLen() const;
83 
92  const lt_uint8* getData() const;
93 
94 private:
95  LT_STATUS readHeader();
96  LT_STATUS readData();
97 
98  char* m_DESID; // 25
99  char* m_DESVER; // 2
100  char* m_DESOFLW; // 6
101  int m_DESITEM;
102  int m_DESSHL;
103  lt_uint8* m_DESSHF;
104 
105  lt_uint32 m_bytesLen;
106  lt_uint8* m_bytes;
107 
108  // nope
110  DataSegment& operator=(const DataSegment&);
111 };
112 
113 
114 }
116 
117 #endif // DataSegment_H
const char * getDESVER() const
returns the version
unsigned int lt_uint32
unsigned 32-bit integer
Definition: lt_types.h:54
unsigned char lt_uint8
unsigned 8-bit integer
Definition: lt_types.h:46
base class for segment data in an NITF file
Definition: Segment.h:42
const char * getDESID() const
returns the ID
#define LT_BEGIN_LIZARDTECH_NAMESPACE
compiler does not support namespaces
Definition: lt_define.h:96
lt_uint32 LT_STATUS
An integral status code.
Definition: lt_status.h:39
const lt_uint8 * getData() const
returns the data from the segment
#define LT_END_LIZARDTECH_NAMESPACE
compiler does not support namespaces
Definition: lt_define.h:97
Include file for all LizardTech sources.
represents a data segment in an existing NITF file
Definition: DataSegment.h:34
LT_STATUS addMetadataLocal(LTIMetadataDatabase &db) const
DataSegment(NITFReaderManager &, LTIOStreamInf &, int segmentNumber, lt_int64 headerOffset, lt_int64 headerLength, lt_int64 dataOffset, lt_int64 dataLength)
Abstract definition of a stream.
class for storing metadata associated with an image
lt_uint32 getDataLen() const
returns the length of the data from the segment
LT_STATUS initialize()
initializer
bool verifyIsOverflow(const char *code, bool isU, int segmentNum) const

LizardTech