Java Doc for CBlkRateDistStats.java in  » 6.0-JDK-Modules » Java-Advanced-Imaging » jj2000 » j2k » entropy » encoder » 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 » jj2000.j2k.entropy.encoder 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   jj2000.j2k.entropy.CodedCBlk
      jj2000.j2k.entropy.encoder.CBlkRateDistStats

CBlkRateDistStats
public class CBlkRateDistStats extends CodedCBlk (Code)
This class stores coded (compressed) code-blocks with their associated rate-distortion statistics. This object should always contain all the compressed data of the code-block. It is applicable to the encoder engine only. Some data of the coded-block is stored in the super class, see CodedCBlk.

The rate-distortion statistics (i.e. R-D slope) is stored for valid points only. The set of valid points is determined by the entropy coder engine itself. Normally they are selected so as to lye in a convex hull, which can be achived by using the 'selectConvexHull' method of this class, but some other strategies might be employed.

The rate (in bytes) for each truncation point (valid or not) is stored in the 'truncRates' array. The rate of a truncation point is the total number of bytes in 'data' (see super class) that have to be decoded to reach the truncation point.

The slope (reduction of distortion divided by the increase in rate) at each of the valid truncation points is stored in 'truncSlopes'.

The index of each valid truncation point is stored in 'truncIdxs'. The index should be interpreted in the following way: a valid truncation point at position 'n' has the index 'truncIdxs[n]', the rate 'truncRates[truncIdxs[n]]' and the slope 'truncSlopes[n]'. The arrays 'truncIdxs' and 'truncRates' have at least 'nVldTrunc' elements. The 'truncRates' array has at least 'nTotTrunc' elements.

In addition the 'isTermPass' array contains a flag for each truncation point (valid and non-valid ones) that tells if the pass is terminated or not. If this variable is null then it means that no pass is terminated, except the last one which always is.

The compressed data is stored in the 'data' member variable of the super class.
See Also:   CodedCBlk



Field Summary
public  booleanisTermPass
     Array of flags indicating terminated passes (valid or non-valid truncation points).
public  intnROIcoeff
    
public  intnROIcp
    
public  intnTotTrunc
    
public  intnVldTrunc
    
public  SubbandAnsb
    
public  doubletruncDists
    
public  inttruncIdxs
     The indices of the valid truncation points, in increasing order.
public  inttruncRates
    
public  floattruncSlopes
    

Constructor Summary
public  CBlkRateDistStats()
     Creates a new CBlkRateDistStats object without allocating any space for 'truncRates', 'truncSlopes', 'truncDists' and 'truncIdxs' or 'data'.
public  CBlkRateDistStats(int m, int n, int skipMSBP, byte data, int rates, double dists, boolean termp, int np, boolean inclast)
     Creates a new CBlkRateDistStats object and initializes the valid truncation points, their rates and their slopes, from the 'rates' and 'dist' arrays.

Method Summary
public  voidselectConvexHull(int rates, double dists, boolean termp, int n, boolean inclast)
     Compute the rate-distorsion slopes and selects those that lie in a convex hull.
public  StringtoString()
     Returns the contents of the object in a string.

Field Detail
isTermPass
public boolean isTermPass(Code)
Array of flags indicating terminated passes (valid or non-valid truncation points).



nROIcoeff
public int nROIcoeff(Code)
The number of ROI coefficients in the code-block



nROIcp
public int nROIcp(Code)
Number of ROI coding passes



nTotTrunc
public int nTotTrunc(Code)
The total number of truncation points



nVldTrunc
public int nVldTrunc(Code)
The number of valid truncation points



sb
public SubbandAn sb(Code)
The subband to which the code-block belongs



truncDists
public double truncDists(Code)
The distortion for each truncation point (valid and non-valid ones)



truncIdxs
public int truncIdxs(Code)
The indices of the valid truncation points, in increasing order.



truncRates
public int truncRates(Code)
The rate (in bytes) for each truncation point (valid and non-valid ones)



truncSlopes
public float truncSlopes(Code)
The negative of the rate-distortion slope for each valid truncation point




Constructor Detail
CBlkRateDistStats
public CBlkRateDistStats()(Code)
Creates a new CBlkRateDistStats object without allocating any space for 'truncRates', 'truncSlopes', 'truncDists' and 'truncIdxs' or 'data'.



CBlkRateDistStats
public CBlkRateDistStats(int m, int n, int skipMSBP, byte data, int rates, double dists, boolean termp, int np, boolean inclast)(Code)
Creates a new CBlkRateDistStats object and initializes the valid truncation points, their rates and their slopes, from the 'rates' and 'dist' arrays. The 'rates', 'dist' and 'termp' arrays must contain the rate (in bytes), the reduction in distortion (from nothing coded) and the flag indicating if termination is used, respectively, for each truncation point.

The valid truncation points are selected by taking them as lying on a convex hull. This is done by calling the method selectConvexHull().

Note that the arrays 'rates' and 'termp' are copied, not referenced, so they can be modified after a call to this constructor.
Parameters:
  m - The horizontal index of the code-block, within the subband.
Parameters:
  n - The vertical index of the code-block, within the subband.
Parameters:
  skipMSBP - The number of skipped most significant bit-planes forthis code-block.
Parameters:
  data - The compressed data. This array is referenced by thisobject so it should not be modified after.
Parameters:
  rates - The rates (in bytes) for each truncation point in thecompressed data. This array is modified by the method but no referenceis kept to it.
Parameters:
  dists - The reduction in distortion (with respect to no informationcoded) for each truncation point. This array is modified by the methodbut no reference is kept to it.
Parameters:
  termp - An array of boolean flags indicating, for each pass, if apass is terminated or not (true if terminated). If null then it isassumed that no pass is terminated except the last one which always is.
Parameters:
  np - The number of truncation points contained in 'rates', 'dist'and 'termp'.
Parameters:
  inclast - If false the convex hull is constructed as for lossycoding. If true it is constructed as for lossless coding, in which caseit is ensured that all bit-planes are sent (i.e. the last truncationpoint is always included).





Method Detail
selectConvexHull
public void selectConvexHull(int rates, double dists, boolean termp, int n, boolean inclast)(Code)
Compute the rate-distorsion slopes and selects those that lie in a convex hull. It will compute the slopes, select the ones that form the convex hull and initialize the 'truncIdxs' and 'truncSlopes' arrays, as well as 'nVldTrunc', with the selected truncation points. It will also initialize 'truncRates' and 'isTermPass' arrays, as well as 'nTotTrunc', with all the truncation points (selected or not).

Note that the arrays 'rates' and 'termp' are copied, not referenced, so they can be modified after a call to this method.
Parameters:
  rates - The rates (in bytes) for each truncation point in thecompressed data. This array is modified by the method.
Parameters:
  dists - The reduction in distortion (with respect to noinformation coded) for each truncation point. This array is modified bythe method.
Parameters:
  termp - An array of boolean flags indicating, for each pass, if apass is terminated or not (true if terminated). If null then it isassumed that no pass is terminated except the last one which always is.
Parameters:
  n - The number of truncation points contained in 'rates', 'dist'and 'termp'.
Parameters:
  inclast - If false the convex hull is constructed as for lossycoding. If true it is constructed as for lossless coding, in which caseit is ensured that all bit-planes are sent (i.e. the last truncationpoint is always included).




toString
public String toString()(Code)
Returns the contents of the object in a string. This is used for debugging. A string with the contents of the object



Fields inherited from jj2000.j2k.entropy.CodedCBlk
public byte data(Code)(Java Doc)
public int m(Code)(Java Doc)
public int n(Code)(Java Doc)
public int skipMSBP(Code)(Java Doc)

Methods inherited from jj2000.j2k.entropy.CodedCBlk
public String toString()(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.