Source Code Cross Referenced for J2KImageReadParamJava.java in  » 6.0-JDK-Modules » Java-Advanced-Imaging » com » sun » media » imageioimpl » plugins » jpeg2000 » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » Java Advanced Imaging » com.sun.media.imageioimpl.plugins.jpeg2000 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * $RCSfile: J2KImageReadParamJava.java,v $
003:         *
004:         * 
005:         * Copyright (c) 2005 Sun Microsystems, Inc. All  Rights Reserved.
006:         * 
007:         * Redistribution and use in source and binary forms, with or without
008:         * modification, are permitted provided that the following conditions
009:         * are met: 
010:         * 
011:         * - Redistribution of source code must retain the above copyright 
012:         *   notice, this  list of conditions and the following disclaimer.
013:         * 
014:         * - Redistribution in binary form must reproduce the above copyright
015:         *   notice, this list of conditions and the following disclaimer in 
016:         *   the documentation and/or other materials provided with the
017:         *   distribution.
018:         * 
019:         * Neither the name of Sun Microsystems, Inc. or the names of 
020:         * contributors may be used to endorse or promote products derived 
021:         * from this software without specific prior written permission.
022:         * 
023:         * This software is provided "AS IS," without a warranty of any 
024:         * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND 
025:         * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, 
026:         * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
027:         * EXCLUDED. SUN MIDROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL 
028:         * NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF 
029:         * USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS
030:         * DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR 
031:         * ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL,
032:         * CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND
033:         * REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR
034:         * INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE
035:         * POSSIBILITY OF SUCH DAMAGES. 
036:         * 
037:         * You acknowledge that this software is not designed or intended for 
038:         * use in the design, construction, operation or maintenance of any 
039:         * nuclear facility. 
040:         *
041:         * $Revision: 1.1 $
042:         * $Date: 2005/02/11 05:01:33 $
043:         * $State: Exp $
044:         */
045:        package com.sun.media.imageioimpl.plugins.jpeg2000;
046:
047:        import javax.imageio.ImageReadParam;
048:        import com.sun.media.imageio.plugins.jpeg2000.J2KImageReadParam;
049:
050:        /**
051:         * A subclass of <code>ImageReadParam</code> for reading images in
052:         * the JPEG 2000 format.
053:         *
054:         * <p>The decoding parameters for JPEG 2000 are listed below:
055:         *
056:         * <p><table border=1>
057:         * <caption><b>JPEG 2000 Plugin Decoding Parameters</b></caption>
058:         * <tr><th>Parameter Name</th> <th>Description</th></tr>
059:         * <tr>
060:         *    <td>decodingRate</td>
061:         *    <td>Specifies the decoding rate in bits per pixel (bpp) where the
062:         *    number of pixels is related to the image's original size (Note:
063:         *    this parameter is not affected by <code>resolution</code>).  The
064:         *    codestream is either parsed (default) or truncated depending
065:         *    <code>parsingEnabled</code>.  The default is <code>Double.MAX_VALUE</code>.
066:         *    It means decoding with the encoding rate.
067:         *    </td>
068:         * </tr>
069:         * <tr>
070:         *    <td>resolution</td>
071:         *    <td>Specifies the resolution level wanted for the decoded image
072:         *    (0 means the lowest available resolution, the resolution
073:         *    level gives an image with the original dimension).  If the given index
074:         *    is greater than the number of available resolution levels of the
075:         *    compressed image, the decoded image has the lowest available
076:         *    resolution (among all tile-components).  This parameter affects only
077:         *    the inverse wavelet transform and not the number of bytes read by the
078:         *    codestream parser, which depends only on <code>decodingRate</code>.
079:         *    </td>
080:         * </tr>
081:         * <tr>
082:         *    <td>noROIDescaling</td>
083:         *    <td>Ensures that no ROI de-scaling is performed.  Decompression is done
084:         *    like there is no ROI in the image.
085:         *    </td>
086:         * </tr>
087:         * <tr>
088:         *    <td>parsingEnabled</td>
089:         *    <td>Enable the parsing mode or not when the decoding rate is specified.
090:         *    If it is false, the codestream is decoded as if it were truncated to
091:         *    the given rate.  If it is true, the decoder creates, truncates and
092:         *    decodes a virtual layer progressive codestream with the same
093:         *    truncation points in each code-block.
094:         *    </td>
095:         * </tr>
096:         * </table>
097:         */
098:        public class J2KImageReadParamJava extends J2KImageReadParam {
099:
100:            /** Ensures that no ROI de-scaling is performed.  Decompression
101:             *  is done like there is no ROI in the image.
102:             */
103:            private boolean noROIDescaling = true;
104:
105:            /** Enable the parsing mode or not when the decoding rate is specified .
106:             *  If it is false, the codestream is decoded as if it were truncated to
107:             *  the given rate.  If it is true, the decoder creates, truncates and
108:             *  decodes a virtual layer progressive codestream with the same
109:             *  truncation points in each code-block.
110:             */
111:            private boolean parsingEnabled = true;
112:
113:            /** Constructs a default instance of <code>J2KImageReadParamJava</code>. */
114:            public J2KImageReadParamJava() {
115:                super ();
116:            }
117:
118:            public J2KImageReadParamJava(ImageReadParam param) {
119:                super ();
120:
121:                // Generic settings.
122:                if (param.hasController()) {
123:                    setController(param.getController());
124:                }
125:                setSourceRegion(param.getSourceRegion());
126:                setSourceBands(param.getSourceBands());
127:                setDestinationBands(param.getDestinationBands());
128:                setDestination(param.getDestination());
129:
130:                setDestinationOffset(param.getDestinationOffset());
131:                setSourceSubsampling(param.getSourceXSubsampling(), param
132:                        .getSourceYSubsampling(),
133:                        param.getSubsamplingXOffset(), param
134:                                .getSubsamplingYOffset());
135:                setDestinationType(param.getDestinationType());
136:
137:                // J2K settings.
138:                J2KImageReadParam j2kParam;
139:                if (param instanceof  J2KImageReadParam) {
140:                    j2kParam = (J2KImageReadParam) param;
141:                } else {
142:                    j2kParam = new J2KImageReadParam();
143:                }
144:                setDecodingRate(j2kParam.getDecodingRate());
145:                setResolution(j2kParam.getResolution());
146:            }
147:
148:            /** Sets <code>noROIDescaling</code> */
149:            public void setNoROIDescaling(boolean value) {
150:                this .noROIDescaling = value;
151:            }
152:
153:            /** Gets <code>noROIDescaling</code> */
154:            public boolean getNoROIDescaling() {
155:                return noROIDescaling;
156:            }
157:
158:            /** Sets <code>parsingEnabled</code> */
159:            public void setParsingEnabled(boolean value) {
160:                this .parsingEnabled = value;
161:            }
162:
163:            /** Gets <code>parsingEnabled</code> */
164:            public boolean getParsingEnabled() {
165:                return parsingEnabled;
166:            }
167:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.