MrSID Decode SDK for Raster Reference Manual  9.0.0.3864
J2KImageReader.h
Go to the documentation of this file.
1 /* $Id$ */
2 /* //////////////////////////////////////////////////////////////////////////
3 // //
4 // This code is Copyright (c) 2004 LizardTech, Inc, 1008 Western Avenue, //
5 // Suite 200, Seattle, WA 98104. Unauthorized use or distribution //
6 // prohibited. Access to and use of this code is permitted only under //
7 // license from LizardTech, Inc. Portions of the code are protected by //
8 // US and foreign patents and other filings. All Rights Reserved. //
9 // //
11 /* PUBLIC */
12 
13 #ifndef J2KIMAGEREADER_H
14 #define J2KIMAGEREADER_H
15 
16 // lt_lib_mrsid_core
17 #include "lti_imageFilter.h"
18 
19 // lt_lib_mrsid_j2k
20 #include "j2k_types.h"
21 
22 #if defined(LT_COMPILER_MS)
23  #pragma warning(push,4)
24 #endif
25 
26 
27 LT_BEGIN_NAMESPACE(LizardTech)
28 
29 class LTFileSpec;
30 class LTIOStreamInf;
31 class Jpeg2000ReaderManager;
32 class Jpeg2000ReaderSource;
33 class Jpeg2000ReaderStreamSource;
34 class JPCReader;
35 
36 /***!!! ONLY FOR BACKWARDS COMPAT !!!***/
37 
38 
48 {
50 public:
82  LT_STATUS initialize(const LTFileSpec& fileSpec,
83  bool isPersistent = true,
84  float maxBpp = -1.0f,
85  bool useWorldFile = true);
86 
101  LT_STATUS initialize(LTIOStreamInf &stream,
102  bool isPersistent = true,
103  float maxBpp = -1.0f,
104  bool useWorldFile = true);
109 
122  LT_STATUS setParameter_Precision(lt_uint32 precision);
123  lt_uint32 getParameter_Precision() const;
124  lt_uint32 getParameter_MinPrecision() const;
125  lt_uint32 getParameter_MaxPrecision() const;
126  lt_uint32 getParameter_DefaultPrecision() const;
133 
144  LT_STATUS setParameter_Layers(lt_uint32 numLayers);
145  lt_uint32 getParameter_Layers() const;
146  lt_uint32 getParameter_MinLayers() const;
147  lt_uint32 getParameter_MaxLayers() const;
148  lt_uint32 getParameter_DefaultLayers() const;
161  void getParameter_TileSize(int& width, int& height) const;
162 
174  void getParameter_Precincts(const int*& widths,
175  const int*& heights,
176  int& numPrecincts) const;
177 
185  J2KProgressionOrder getParameter_ProgressionOrder() const;
186 
195  void getParameter_CodeblockSize(int& width, int& height) const;
196 
207  bool getParameter_Wavelet97() const;
208 
217  bool getParameter_UsingYCbCr() const;
218 
228  lt_uint8 getNumLevels() const;
229 
241  LT_STATUS readMetadataBox(const lt_uint8* uuid, LTIOStreamInf& stream);
242 
243  // for LizardTech internal use only
244  LT_STATUS writeProfile(const LTFileSpec& file) const;
245 
246  // for LizardTech internal use only
247  Jpeg2000ReaderSource& getReaderSouce() const;
248 
249  // for LizardTech internal use only
250  // does NOT take ownership of the tileList array
251  // BUG: applies to all images/codestreams in the file
252  LT_STATUS setTileMaskList(const lt_uint32* tileMaskList, lt_uint32 tileMaskListLen);
253 
254  // LTIImageStage
255  virtual lt_int64 getEncodingCost(const LTIScene& scene) const;
256  virtual lt_uint32 getModifications(const LTIScene &scene) const;
257 
258 protected:
259 
260 private:
261  LT_STATUS privateInit(bool isPersistent,
262  float maxBpp,
263  bool useWorldFile);
264 
265  Jpeg2000ReaderManager* m_manager;
266  Jpeg2000ReaderStreamSource* m_source;
267  JPCReader* m_reader;
268 
269  const lt_uint32* m_tileMaskList;
270  lt_uint32 m_tileMaskListLen;
271 };
272 
273 
274 LT_END_NAMESPACE(LizardTech)
275 
276 #if defined(LT_COMPILER_MS)
277  #pragma warning(pop)
278 #endif
279 
280 #endif // J2KIMAGEREADER_H

LizardTech