MrSID Decode SDK for Raster Reference Manual 9.5.4.4709

- Main Page
- Namespaces
- Classes
- Files
- Examples

- File List
- File Members

ImageReader.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 ImageReader_H
13 #define ImageReader_H
14
15 // lt_lib_base
16 #include "lt_base.h"
17
18 // lt_lib_mrsid_core
19 #include "lti_geoImageReader.h"
20
21 // local
22 #include "nitf_types.h"
23
24 LT_BEGIN_LIZARDTECH_NAMESPACE
25 class LTFileSpec;
26 class LTIOStreamInf;
27 class LTReusableBuffer;
28 class NITFReaderManager;
29
30 namespace Nitf {
31 class FileHeader;
32 class ImageSegment;
33 class ImageSegmentMetadata;
34 class SecurityMetadata;
35
36
46 class ImageReader : public LTIGeoImageReader
47 {
48 LT_DISALLOW_COPY_CONSTRUCTOR(ImageReader);
49 public:
53 const char* getIID1() const;
54
55 lt_int64 getPhysicalFileSize() const;
56
57 // not for public use
58 NITFReaderManager& getManager() const;
59
63 Format getFormat() const;
64
68 Layout getLayout() const;
69
73 bool isBlocked() const;
74
78 bool isMasked() const;
79
83 int getSegmentNumber() const;
84
88 const ImageSegmentMetadata* getImageMetadata() const;
89
93 const SecurityMetadata* getSecurityMetadata() const;
94
95 // inherited
96 LT_STATUS getDimsAtMag(double mag,
97 lt_uint32& width,
98 lt_uint32& height) const = 0;
99
100 protected:
101 ~ImageReader(void);
102 ImageReader(bool supportBandSelection);
103
104 const char *getSourceName(void) const;
105
106 LT_STATUS init(LTIOStreamInf *stream,
107 NITFReaderManager *manager,
108 const ImageSegment *imageSegment,
109 bool useWorldFile);
110
111 LT_STATUS addUnderlyingMetadata(const LTIImageStage &image);
112
113 // blocked image support
114 LTIScene computeBlockedScene(const LTIScene& scene) const;
115 LT_STATUS copyIntoUserBuffer(const LTIScene& dstScene,
116 LTISceneBuffer& dstBuffer) const;
117 bool activeSceneContains(const LTIScene& scene) const;
118 void putBlockIntoBuffer_SEQ(LTISceneBuffer& cBuffer,
119 lt_uint8* buf,
120 lt_uint32 blockRow,
121 lt_uint32 blockCol,
122 lt_uint32 blockBand) const;
123 void putBlockIntoBuffer_BLOCK(LTISceneBuffer& cBuffer,
124 lt_uint8* buf,
125 lt_uint32 blockRow,
126 lt_uint32 blockCol) const;
127 void putBlockIntoBuffer_PIXEL(LTISceneBuffer& cBuffer,
128 lt_uint8* buf,
129 lt_uint32 blockRow,
130 lt_uint32 blockCol) const;
131 void putBlockIntoBuffer_ROW(LTISceneBuffer& cBuffer,
132 lt_uint8* buf,
133 lt_uint32 blockRow,
134 lt_uint32 blockCol) const;
135
136
137
138 LTIOStreamInf *m_stream;
139 NITFReaderManager *m_manager;
140
141 const ImageSegment *m_imageSegment;
142 const FileHeader *m_fileHeader;
143
144 LTReusableBuffer *m_reusableBuffer;
145 LTIScene *m_activeScene;
146 LTISceneBuffer *m_activeSceneBuffer;
147 };
148
149
150 }
151 LT_END_LIZARDTECH_NAMESPACE
152
153 #endif // ImageReader_H

LizardTech