ERDAS ECW JPEG2000 Software Development Kit (SDK) Version 4.1 August 2010 Copyright © 2010 ERDAS, Inc
Total Page:16
File Type:pdf, Size:1020Kb
ERDAS ECW JPEG2000 Software Development Kit (SDK) Version 4.1 August 2010 Copyright © 2010 ERDAS, Inc. All rights reserved. Printed in the United States of America. The information contained in this document is the exclusive property of ERDAS, Inc. This work is protected under United States copyright law and other international copyright treaties and conventions. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying and recording, or by any information storage or retrieval system, except as expressly permitted in writing by ERDAS, Inc. All requests should be sent to the attention of: Manager, Technical Documentation ERDAS, Inc. 5051 Peachtree Corners Circle Suite 100 Norcross, GA 30092-2500 USA. The information contained in this document is subject to change without notice. Government Reserved Rights. MrSID technology incorporated in the Software was developed in part through a project at the Los Alamos National Laboratory, funded by the U.S. Government, managed under contract by the University of California (University), and is under exclusive commercial license to LizardTech, Inc. It is used under license from LizardTech. MrSID is protected by U.S. Patent No. 5,710,835. Foreign patents pending. The U.S. Government and the University have reserved rights in MrSID technology, including without limitation: (a) The U.S. Government has a non-exclusive, nontransferable, irrevocable, paid-up license to practice or have practiced throughout the world, for or on behalf of the United States, inventions covered by U.S. Patent No. 5,710,835 and has other rights under 35 U.S.C. § 200-212 and applicable implementing regulations; (b) If LizardTech's rights in the MrSID Technology terminate during the term of this Agreement, you may continue to use the Software. Any provisions of this license which could reasonably be deemed to do so would then protect the University and/or the U.S. Government; and (c) The University has no obligation to furnish any know-how, technical assistance, or technical data to users of MrSID software and makes no warranty or representation as to the validity of U.S. Patent 5,710,835 nor that the MrSID Software will not infringe any patent or other proprietary right. For further information about these provisions, contact LizardTech, 1008 Western Ave., Suite 200, Seattle, WA 98104. ERDAS, ERDAS IMAGINE, IMAGINE OrthoBASE, Stereo Analyst and IMAGINE VirtualGIS are registered trademarks; IMAGINE OrthoBASE Pro is a trademark of ERDAS, Inc. SOCET SET is a registered trademark of BAE Systems Mission Solutions. Other companies and products mentioned herein are trademarks or registered trademarks of their respective owners. ii iii Version History Version Date Comments Release 4.1 30 July 2010 Added opacity channel to ECW & JPEG 2000, GML georeference support for JPEG 2000 and quicker decoding for ECW and JPEG 2000. Release 3.3 19 June 2006 Enhancements, threading fixes, various bug-fixes, autoconf build support and licensing changes. Release 3.2 n/a Release 3.1 22 April 2005 Enhancements and maintenance Release 3.0 September 2004 JPEG 2000 Added Release 2.47 15 September 2003 Windows CE support Release 2.46 25 March 2002 Maintenance release Release 2.45 16 November 2001 GDT database support Release 2.4 9 July 2001 Map server integration Release 2.31 18 May 2001 Maintenance release Release 2.3 10 May 2001 Maintenance release Release 2.2 22 September 2000 NCSRenderer added Release 2.1 22 May 2000 Second release iv Version History Table of Contents Version History . iv Table of Contents . v Introduction . 1 Viewing and Printing this Document . .1 On-line Viewing . 1 Looking Up Topics . 2 Code listings . 3 Intended Audience . .3 What’s New in Version 4.1 . .3 What’s New in Version 3.3 . .4 What’s New in Version 3.0 . .4 What’s New in Version 2.0 . .4 Contacting Us . .4 Acknowledgements . .5 About Image Compression . 7 Introduction . .7 Lossless or Lossy Compression . .7 Wavelet Based Encoding . .8 ECW Compression . .9 Using Opacity Channels . 10 JPEG 2000 Compression . .10 Support for the NITF Standard . 12 Licensing and Installation . 13 System Requirements . .13 Operating system . 13 Platforms . 13 Third Party Packages . 13 Applications . 13 Licensing . .13 ECW JPEG2000 SDK Free Version . 13 ECW JPEG2000 SDK Licensed Editions . 14 Licensing the ECW JPEG2000 SDK . 14 Installation . .14 Directory Structure and Files. .17 Subdirectories and Files . 18 Development . 21 Introduction . .21 PC Library and Include Files . .21 Table of Contents v Project Settings - Visual C++ . .21 How Imagery is Accessed . .22 How to Read a View . 22 The SetFileView Concept . 22 Viewing Areas Smaller than your Application Window Area . 24 Requesting Odd-Aspect Views . 24 Selecting Bands from an Image File to View . 24 Blocking Reads Versus The Refresh Callback Interface . 25 Canceling Reads . .28 Multiple Image Views and Unlimited Image Size . .28 Error Handling . .28 Memory Management . .29 Memory Usage . 29 Caching . 29 ECWP Persistent Local Cache . 30 J2I Index Files . .30 Coordinate Information . .30 Transparent Proxying . .31 Delivering Your Application . .32 Creating Compressed Images . .32 Preserving Image Quality . 32 Optimizing the Compression Ratio . 33 Compressing Previously Compressed Images . 34 Compressing Hyperspectral Imagery . 34 Image Size Limitations . 34 Compression Directory Limitations . 35 Examples . 37 Compression Examples . .37 Compression Example 1 . 37 Compression Example 2 . 40 Compression Example 3 . 43 Decompression Examples . .45 Decompression Example 1 . 45 Decompression Example 2 . 46 Decompression Example 4 . 49 Decompression Example 5 . 51 Decompression Example 6 . 53 API Reference . 55 Introduction . .55 C API: Decompression Functions . .55 NCScbmCloseFileView . 55 NCScbmCloseFileViewEx . 56 NCScbmGetViewFileInfo . 56 NCScbmGetViewFileInfoEx . 57 NCScbmGetViewInfo . 57 NCScbmOpenFileView . 58 vi Table of Contents NCScbmReadViewLineBGR . 59 NCScbmReadViewLineBGRA . 59 NCScbmReadViewLineBIL . 60 NCScbmReadViewLineBILEx . 61 NCScbmReadViewLineRGB . 62 NCScbmReadViewLineRGBA . 62 NCScbmSetFileView . 63 NCScbmSetFileViewEx . 64 NCSecwSetConfig . 66 NCSecwSetIOCallbacks . 67 Decompression: Related Data Structures . .68 NCSFileViewFileInfo . 68 NCSFileViewFileInfoEx . 70 NCSFileBandInfo . 71 NCSFileViewSetInfo . 71 C API: Compression Functions . .73 NCSEcwCompressAllocClient . 73 NCSEcwCompressOpen . 74 NCSEcwCompress . 74 NCSEcwCompressClose . 75 NCSEcwCompressFreeClient . 75 NCSEcwCompressSetOEMKey . 76 Compression: Developer Defined Functions . .76 pReadCallback . 77 pStatusCallback . 77 pCancelCallback . 78 Compression: Related Data Structures. ..