Source Code Cross Referenced for J2KImageReadParam.java in  » 6.0-JDK-Modules » Java-Advanced-Imaging » com » sun » media » imageio » 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.imageio.plugins.jpeg2000 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * $RCSfile: J2KImageReadParam.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.3 $
042:         * $Date: 2006/09/29 19:25:32 $
043:         * $State: Exp $
044:         */
045:        package com.sun.media.imageio.plugins.jpeg2000;
046:
047:        import javax.imageio.ImageReadParam;
048:
049:        /**
050:         * A subclass of <code>ImageReadParam</code> for reading images in
051:         * the JPEG 2000 format.
052:         *
053:         * <p>The decoding parameters for JPEG 2000 are listed below:
054:         *
055:         * <p><table border=1>
056:         * <caption><b>JPEG 2000 Plugin Decoding Parameters</b></caption>
057:         * <tr><th>Parameter Name</th> <th>Description</th></tr>
058:         * <tr>
059:         *    <td>decodingRate</td>
060:         *    <td>Specifies the decoding rate in bits per pixel (bpp) where the
061:         *    number of pixels is related to the image's original size (Note:
062:         *    this parameter is not affected by <code>resolution</code>).
063:         *    The default is <code>Double.MAX_VALUE</code>.
064:         *    It means decoding with the encoding rate.
065:         *    </td>
066:         * </tr>
067:         * <tr>
068:         *    <td>resolution</td>
069:         *    <td>Specifies the resolution level wanted for the decoded image
070:         *    (0 means the lowest available resolution, the resolution
071:         *    level gives an image with the original dimension).  If the given index
072:         *    is greater than the number of available resolution levels of the
073:         *    compressed image, the decoded image has the lowest available
074:         *    resolution (among all tile-components).  This parameter affects only
075:         *    the inverse wavelet transform and not the number of bytes read by the
076:         *    codestream parser, which depends only on <code>decodingRate</code>.
077:         *    The default value, -1, means to use the resolution level at encoding.
078:         *    </td>
079:         * </tr>
080:         * </table>
081:         */
082:        public class J2KImageReadParam extends ImageReadParam {
083:            /** Specifies the decoding rate in bits per pixel (bpp) where the
084:             *  number of  pixels is related to the image's original size
085:             *  (Note: this number is not affected by <code>resolution</code>).
086:             */
087:            private double decodingRate = Double.MAX_VALUE;
088:
089:            /** Specifies the resolution level wanted for the decoded image
090:             *  (0 means the lowest available resolution, the resolution
091:             *  level gives an image with the original dimension).  If the given index
092:             *  is greater than the number of available resolution levels of the
093:             *  compressed image, the decoded image has the lowest available
094:             *  resolution (among all tile-components).  This parameter
095:             *  affects only the inverse wavelet transform but not the number
096:             *  of bytes read by the codestream parser, which
097:             *  depends only on <code>decodingRate</code>.
098:             */
099:            private int resolution = -1;
100:
101:            /** Constructs a default instance of <code>J2KImageReadParam</code>. */
102:            public J2KImageReadParam() {
103:                super ();
104:            }
105:
106:            /**
107:             * Sets <code>decodingRate</code>.
108:             *
109:             * @param rate the decoding rate in bits per pixel.
110:             * @see #getDecodingRate()
111:             */
112:            public void setDecodingRate(double rate) {
113:                this .decodingRate = rate;
114:            }
115:
116:            /**
117:             * Gets <code>decodingRate</code>.
118:             *
119:             * @return the decoding rate in bits per pixel.
120:             * @see #setDecodingRate(double)
121:             */
122:            public double getDecodingRate() {
123:                return decodingRate;
124:            }
125:
126:            /**
127:             * Sets <code>resolution</code>.
128:             *
129:             * @param resolution the resolution level with 0 being
130:             * the lowest available.
131:             * @see #getResolution()
132:             */
133:            public void setResolution(int resolution) {
134:                this .resolution = Math.max(resolution, -1);
135:            }
136:
137:            /**
138:             * Gets <code>resolution</code>.
139:             *
140:             * @return the resolution level with 0 being
141:             * the lowest available.
142:             * @see #setResolution(int)
143:             */
144:            public int getResolution() {
145:                return resolution;
146:            }
147:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.