MrSID Decode SDK for Raster Reference Manual 9.5.5.5244
ImageSegment.h
Go to the documentation of this file.
1//
2// This code is property of Celartem, Inc dba Extensis.
3// Copyright (c) 1995-2023. All rights reserved.
4// Use permitted only under license from Extensis.
5//
6/* PUBLIC */
7
8#ifndef ImageSegment_H
9#define ImageSegment_H
10
11// lt_lib_base
12#include "lt_base.h"
13
14// lt_lib_mrsid_nitf
15#include "nitf_types.h"
16#include "Segment.h"
17
18LT_BEGIN_LIZARDTECH_NAMESPACE
19class LTIPixel;
20class LTIOSubStream;
21class LTIGeoCoord;
22
23namespace Nitf {
24class ImageSegmentMetadata;
25
26
40class ImageSegment : public Segment
41{
42public:
43 // not for public use -- to get a DataSegment, use NITFReaderManager::getImageSegment
45 int segmentNumber,
46 lt_int64 headerOffset, lt_int64 headerLength,
47 lt_int64 dataOffset, lt_int64 dataLength);
50
54 const char* getIID1() const;
55
60
65
69 bool isBlocked() const;
70
74 bool isMasked() const;
75
79 const LTIPixel& getPixelProps() const;
80
85
90
94 int getBlockWidth() const;
95
99 int getBlockHeight() const;
100
104 int getBlocksPerRow() const;
105
109 int getBlocksPerCol() const;
110
114 int getNBPP() const;
115
119 int getNBANDS() const;
120
121 // not for public use
122 int getILOCr() const;
123
124 // not for public use
125 int getILOCc() const;
126
127 // not for public use
128 int getIALVL() const;
129
130 // not for public use
131 int getIDLVL() const;
132
133 // not for public use
134 const lt_uint8* getPadValue() const;
135
136 // not for public use
138
139 // not for public use
141
142 // not for public use
143 bool isMaskedBlock(lt_uint32 index) const;
144
145 // not for public use
147
148 // not for public use
150
151 // not for public use
153
154 // not for public use
155 bool hasGeoInfo(void) const;
156
157 // not for public use
159
164
165private:
166 LT_STATUS readHeader();
167 LT_STATUS readData();
168
169 LT_STATUS readMaskTable();
170 LT_STATUS constructOffsetTable_RAW(lt_int64, bool BUGGY);
171 LT_STATUS constructOffsetTable_JPG(lt_int64, bool BUGGY);
172 LT_STATUS determinePixelFormat();
173 LT_STATUS determineImageFormat();
174
175 LTIPixel* m_pixel;
176 bool m_hasLUT;
177 Format m_format; // IC
178 bool m_isMasked;
179 Layout m_layout; // IMODE
180
181 LT_STATUS m_isSupported;
182
183 ImageSegmentMetadata* m_imageMetadata;
184
185 int m_NROWS;
186 int m_NCOLS;
187 char* m_PVTYPE; // 3
188 char* m_IREP; // 8
189 char* m_ICAT; // 8
190 int m_ABPP; // just precision
191 char* m_PJUST; // 1
192 char* m_ICORDS; // 1
193 char* m_IGEOLO; // 60
194 char* m_IC; // 2
195 char* m_COMRAT; // 4
196 int m_NBANDS;
197 char** m_IREPBAND;
198 char** m_ISUBCAT;
199 lt_uint8*** m_LUTD;
200 int* m_NLUTS;
201 int* m_NELUT;
202 char* m_IMODE; // 1
203 int m_NBPR;
204 int m_NBPC;
205 int m_NPPBH;
206 int m_NPPBV;
207 int m_NBPP; // actual bytes used
208 int m_IDLVL;
209 int m_IALVL;
210 int m_ILOCr;
211 int m_ILOCc;
212 char* m_IMAG; // 4
213
214 // mask stuff
215 lt_uint32 m_IMDATOFF;
216 lt_uint16 m_BMRLNTH;
217 lt_uint16 m_TMRLNTH;
218 lt_uint16 m_TPXCDLNTH;
219 lt_uint8* m_TPXCD;
220 int m_TPXCDlen;
221 lt_uint64* m_BMRBND;
222 lt_uint32* m_TMRBND;
223
224 // geo stuff
225 double *m_geoPoints; // ul(lat,lon), ur(lat,lon), lr(lat,lon), ll(lat,lon)
226 int m_zone;
227 bool m_igeoloValid;
228
229 // nope
231 ImageSegment& operator=(const ImageSegment&);
232};
233
234
235}
236LT_END_LIZARDTECH_NAMESPACE
237
238#endif // ImageSegment_H
Include file for all LizardTech sources.
lt_uint32 LT_STATUS
An integral status code.
Definition: lt_status.h:30
unsigned short lt_uint16
unsigned 16-bit integer
Definition: lt_types.h:40
unsigned long long int lt_uint64
unsigned 64-bit integer
Definition: lt_types.h:59
unsigned char lt_uint8
unsigned 8-bit integer
Definition: lt_types.h:36
unsigned int lt_uint32
unsigned 32-bit integer
Definition: lt_types.h:44
long long int lt_int64
signed 64-bit integer
Definition: lt_types.h:57
This file contains a number of enums, typedefs, etc, that are used within the NITF support classes.
Layout
layout
Definition: nitf_types.h:64
Format
image/compression format
Definition: nitf_types.h:46
Abstract definition of a stream.
LTIOSubStream.
represents a geographic coordinate
Definition: lti_geoCoord.h:28
class for storing metadata associated with an image
basic properties of a pixel
Definition: lti_pixel.h:32
class for reading an NITF file
represents a image segment in an existing NITF file
Definition: ImageSegment.h:41
const lt_uint8 * getPadValue() const
lt_uint32 getHeight() const
returns the height of the image, in pixels
const ImageSegmentMetadata * getImageMetadata() const
returns the metadata object associated with the image
int getNBANDS() const
returns the number of bands in the image (corresponds to the NBANDS field)
ImageSegment(NITFReaderManager &, LTIOStreamInf &, int segmentNumber, lt_int64 headerOffset, lt_int64 headerLength, lt_int64 dataOffset, lt_int64 dataLength)
bool isBlocked() const
returns true iff the image is blocked
const char * getIID1() const
returns the IID1 field of the image
bool hasGeoInfo(void) const
int getIALVL() const
int getBlocksPerRow() const
returns the number of blocks per row in the image (corresponds to the NBPR field)
lt_uint64 getBlockOffset(lt_uint32 index) const
const LTIPixel & getPixelProps() const
returns the pixel type of the image
int getIDLVL() const
Layout getLayout() const
returns the layout (interleaved, blocked, etc) of the image
LT_STATUS createDataStream(LTIOSubStream *&) const
int getBlockWidth() const
returns the width of a block, in pixels (corresponds to the NPPBH field)
LT_STATUS setGeoCoord(LTIGeoCoord &) const
LT_STATUS initialize()
initializer
bool isMaskedBlock(lt_uint32 index) const
lt_uint32 getWidth() const
returns the width of the image, in pixels
LT_STATUS isSupported() const
int getNBPP() const
returns the number of bits per pixel used in the image (corresponds to the NBPP field)
Format getFormat() const
returns the format (JPEG, RAW, JP2, etc) of the image
int getILOCc() const
LT_STATUS addMetadataLocal(LTIMetadataDatabase &db) const
int getBlockHeight() const
returns the height of a block, in pixels (corresponds to the NPPBV field)
bool isMasked() const
returns true iff the image is masked
lt_uint64 getNextBlockOffset(lt_uint32 index) const
int getILOCr() const
int getBlocksPerCol() const
returns the number of blocks per row in the image (corresponds to the NBPC field)
container for Image Segment metadata
base class for segment data in an NITF file
Definition: Segment.h:39

Extensis