MrSID Decode SDK for Raster Reference Manual
9.0.0.3864
|
00001 /* $Id$ */ 00002 /* ////////////////////////////////////////////////////////////////////////// 00003 // // 00004 // This code is Copyright (c) 2004 LizardTech, Inc, 1008 Western Avenue, // 00005 // Suite 200, Seattle, WA 98104. Unauthorized use or distribution // 00006 // prohibited. Access to and use of this code is permitted only under // 00007 // license from LizardTech, Inc. Portions of the code are protected by // 00008 // US and foreign patents and other filings. All Rights Reserved. // 00009 // // 00011 /* PUBLIC */ 00012 00013 #ifndef J2KIMAGEREADER_H 00014 #define J2KIMAGEREADER_H 00015 00016 // lt_lib_mrsid_core 00017 #include "lti_imageFilter.h" 00018 00019 // lt_lib_mrsid_j2k 00020 #include "j2k_types.h" 00021 00022 #if defined(LT_COMPILER_MS) 00023 #pragma warning(push,4) 00024 #endif 00025 00026 00027 LT_BEGIN_NAMESPACE(LizardTech) 00028 00029 class LTFileSpec; 00030 class LTIOStreamInf; 00031 class Jpeg2000ReaderManager; 00032 class Jpeg2000ReaderSource; 00033 class Jpeg2000ReaderStreamSource; 00034 class JPCReader; 00035 00036 /***!!! ONLY FOR BACKWARDS COMPAT !!!***/ 00037 00038 00047 class J2KImageReader : public LTIImageFilter 00048 { 00049 LTI_REFERENCE_COUNTED_BOILERPLATE(J2KImageReader); 00050 public: 00082 LT_STATUS initialize(const LTFileSpec& fileSpec, 00083 bool isPersistent = true, 00084 float maxBpp = -1.0f, 00085 bool useWorldFile = true); 00086 00101 LT_STATUS initialize(LTIOStreamInf &stream, 00102 bool isPersistent = true, 00103 float maxBpp = -1.0f, 00104 bool useWorldFile = true); 00109 00122 LT_STATUS setParameter_Precision(lt_uint32 precision); 00123 lt_uint32 getParameter_Precision() const; 00124 lt_uint32 getParameter_MinPrecision() const; 00125 lt_uint32 getParameter_MaxPrecision() const; 00126 lt_uint32 getParameter_DefaultPrecision() const; 00133 00144 LT_STATUS setParameter_Layers(lt_uint32 numLayers); 00145 lt_uint32 getParameter_Layers() const; 00146 lt_uint32 getParameter_MinLayers() const; 00147 lt_uint32 getParameter_MaxLayers() const; 00148 lt_uint32 getParameter_DefaultLayers() const; 00161 void getParameter_TileSize(int& width, int& height) const; 00162 00174 void getParameter_Precincts(const int*& widths, 00175 const int*& heights, 00176 int& numPrecincts) const; 00177 00185 J2KProgressionOrder getParameter_ProgressionOrder() const; 00186 00195 void getParameter_CodeblockSize(int& width, int& height) const; 00196 00207 bool getParameter_Wavelet97() const; 00208 00217 bool getParameter_UsingYCbCr() const; 00218 00228 lt_uint8 getNumLevels() const; 00229 00241 LT_STATUS readMetadataBox(const lt_uint8* uuid, LTIOStreamInf& stream); 00242 00243 // for LizardTech internal use only 00244 LT_STATUS writeProfile(const LTFileSpec& file) const; 00245 00246 // for LizardTech internal use only 00247 Jpeg2000ReaderSource& getReaderSouce() const; 00248 00249 // for LizardTech internal use only 00250 // does NOT take ownership of the tileList array 00251 // BUG: applies to all images/codestreams in the file 00252 LT_STATUS setTileMaskList(const lt_uint32* tileMaskList, lt_uint32 tileMaskListLen); 00253 00254 // LTIImageStage 00255 virtual lt_int64 getEncodingCost(const LTIScene& scene) const; 00256 virtual lt_uint32 getModifications(const LTIScene &scene) const; 00257 00258 protected: 00259 00260 private: 00261 LT_STATUS privateInit(bool isPersistent, 00262 float maxBpp, 00263 bool useWorldFile); 00264 00265 Jpeg2000ReaderManager* m_manager; 00266 Jpeg2000ReaderStreamSource* m_source; 00267 JPCReader* m_reader; 00268 00269 const lt_uint32* m_tileMaskList; 00270 lt_uint32 m_tileMaskListLen; 00271 }; 00272 00273 00274 LT_END_NAMESPACE(LizardTech) 00275 00276 #if defined(LT_COMPILER_MS) 00277 #pragma warning(pop) 00278 #endif 00279 00280 #endif // J2KIMAGEREADER_H