MrSID Decode SDK for Raster Reference Manual  9.1.0.4045
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 
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 
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 
89 
94 
95  // inherited
96  LT_STATUS getDimsAtMag(double mag,
97  lt_uint32& width,
98  lt_uint32& height) const = 0;
99 
100  // not for public use
101  // does NOT take ownership of the tileList array
102  // this version returns failure, only override is for JP2 image segments
103  virtual LT_STATUS setTileMaskList(const lt_uint32* tileMaskList, lt_uint32 tileMaskListLen);
104 
105 protected:
106  ~ImageReader(void);
107  ImageReader(bool supportBandSelection);
108 
109  const char *getSourceName(void) const;
110 
111  LT_STATUS init(LTIOStreamInf *stream,
112  NITFReaderManager *manager,
113  const ImageSegment *imageSegment,
114  bool useWorldFile);
115 
117 
118  // blocked image support
119  LTIScene computeBlockedScene(const LTIScene& scene) const;
120  LT_STATUS copyIntoUserBuffer(const LTIScene& dstScene,
121  LTISceneBuffer& dstBuffer) const;
122  bool activeSceneContains(const LTIScene& scene) const;
124  lt_uint8* buf,
125  lt_uint32 blockRow,
126  lt_uint32 blockCol,
127  lt_uint32 blockBand) const;
129  lt_uint8* buf,
130  lt_uint32 blockRow,
131  lt_uint32 blockCol) const;
133  lt_uint8* buf,
134  lt_uint32 blockRow,
135  lt_uint32 blockCol) const;
137  lt_uint8* buf,
138  lt_uint32 blockRow,
139  lt_uint32 blockCol) const;
140 
141 
142 
144  NITFReaderManager *m_manager;
145 
148 
149  LTReusableBuffer *m_reusableBuffer;
152 };
153 
154 
155 }
157 
158 #endif // ImageReader_H
LTIOStreamInf * m_stream
Definition: ImageReader.h:143
class to hold data passed between image stages
LTIScene * m_activeScene
Definition: ImageReader.h:150
LTIScene computeBlockedScene(const LTIScene &scene) const
abstract class for implementing a geo image reader
void putBlockIntoBuffer_ROW(LTISceneBuffer &cBuffer, lt_uint8 *buf, lt_uint32 blockRow, lt_uint32 blockCol) const
bool activeSceneContains(const LTIScene &scene) const
unsigned int lt_uint32
unsigned 32-bit integer
Definition: lt_types.h:54
This file contains a number of enums, typedefs, etc, that are used within the NITF support classes...
unsigned char lt_uint8
unsigned 8-bit integer
Definition: lt_types.h:46
void putBlockIntoBuffer_BLOCK(LTISceneBuffer &cBuffer, lt_uint8 *buf, lt_uint32 blockRow, lt_uint32 blockCol) const
abstract class for decoding from an image
represents the file header properties of a NITF file
Definition: FileHeader.h:41
LTReusableBuffer * m_reusableBuffer
Definition: ImageReader.h:149
const SecurityMetadata * getSecurityMetadata() const
returns the security metadata object for this segment
LT_STATUS addUnderlyingMetadata(const LTIImageStage &image)
representation of a scene
Definition: lti_scene.h:64
#define LT_BEGIN_LIZARDTECH_NAMESPACE
compiler does not support namespaces
Definition: lt_define.h:96
const FileHeader * m_fileHeader
Definition: ImageReader.h:147
lt_int64 getPhysicalFileSize() const
lt_uint32 LT_STATUS
An integral status code.
Definition: lt_status.h:39
const ImageSegment * m_imageSegment
Definition: ImageReader.h:146
const char * getSourceName(void) const
container for Security metadata
LT_STATUS init(LTIOStreamInf *stream, NITFReaderManager *manager, const ImageSegment *imageSegment, bool useWorldFile)
bool isMasked() const
returns true iff block masking is used in the image segment
#define LT_END_LIZARDTECH_NAMESPACE
compiler does not support namespaces
Definition: lt_define.h:97
Include file for all LizardTech sources.
Layout
layout
Definition: nitf_types.h:67
LTISceneBuffer * m_activeSceneBuffer
Definition: ImageReader.h:151
Format getFormat() const
returns the compression format of the segment
int getSegmentNumber() const
returns the index of this image segment
Represents a file or directory path.
Definition: lt_fileSpec.h:33
LT_STATUS copyIntoUserBuffer(const LTIScene &dstScene, LTISceneBuffer &dstBuffer) const
virtual LT_STATUS setTileMaskList(const lt_uint32 *tileMaskList, lt_uint32 tileMaskListLen)
bool isBlocked() const
returns true iff the image segment is in blocked form
ImageReader(bool supportBandSelection)
Format
image/compression format
Definition: nitf_types.h:49
void putBlockIntoBuffer_SEQ(LTISceneBuffer &cBuffer, lt_uint8 *buf, lt_uint32 blockRow, lt_uint32 blockCol, lt_uint32 blockBand) const
represents a image segment in an existing NITF file
Definition: ImageSegment.h:44
NITFReaderManager * m_manager
Definition: ImageReader.h:144
const char * getIID1() const
returns the IID1 field for the segment
LT_STATUS getDimsAtMag(double mag, lt_uint32 &width, lt_uint32 &height) const =0
get image width and height at given magnification
Abstract definition of a stream.
container for Image Segment metadata
class for representing an NITF image segment as an LTIImageReader
Definition: ImageReader.h:46
const ImageSegmentMetadata * getImageMetadata() const
returns the image segment metadata object for this segment
void putBlockIntoBuffer_PIXEL(LTISceneBuffer &cBuffer, lt_uint8 *buf, lt_uint32 blockRow, lt_uint32 blockCol) const
Layout getLayout() const
returns the pixel layout of the segment
NITFReaderManager & getManager() const

LizardTech