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


java.lang.Object
   jj2000.j2k.codestream.reader.PktDecoder

PktDecoder
public class PktDecoder implements StdEntropyCoderOptions(Code)
This class is used to read packet's head and body. All the members must be re-initialized at the beginning of each tile thanks to the restart() method.



Constructor Summary
public  PktDecoder(DecoderSpecs decSpec, HeaderDecoder hd, RandomAccessIO ehs, BitstreamReaderAgent src, boolean isTruncMode, int maxCB)
     Creates an empty PktDecoder object associated with given decoder specifications and HeaderDecoder.

Method Summary
public  intgetNumPrecinct(int c, int r)
     Gets the number of precincts in a given component and resolution level.
final public  intgetPPX(int t, int c, int r)
     Returns the precinct partition width for the specified component, resolution level and tile.
Parameters:
  t - the tile index
Parameters:
  c - The index of the component (between 0 and C-1)
Parameters:
  r - The resolution level, from 0 to L.
final public  intgetPPY(int t, int c, int rl)
     Returns the precinct partition height for the specified component, resolution level and tile.
Parameters:
  t - the tile index
Parameters:
  c - The index of the component (between 0 and C-1)
Parameters:
  rl - The resolution level, from 0 to L.
public  PrecInfogetPrecInfo(int c, int r, int p)
     Get PrecInfo instance of the specified resolution level, component and precinct.
public  voidreadEPHMarker(PktHeaderBitReader bin)
     Try to read an EPH marker.
public  booleanreadPktBody(int l, int r, int c, int p, CBlkInfo[][][] cbI, int[] nb)
     Reads specificied packet body in order to find offset of each code-block's piece of codeword.
public  booleanreadPktHead(int l, int r, int c, int p, CBlkInfo[][][] cbI, int[] nb)
     Read specified packet head and found length of each code-block's piece of codewords as well as number of skipped most significant bit-planes.
public  booleanreadSOPMarker(int[] nBytes, int p, int c, int r)
     Try to read a SOP marker and check that its sequence number if not out of sequence.
public  CBlkInfo[][][][][]restart(int nc, int[] mdl, int nl, CBlkInfo[][][][][] cbI, boolean pph, ByteArrayInputStream pphbais)
     Re-initialize the PktDecoder instance at the beginning of a new tile.


Constructor Detail
PktDecoder
public PktDecoder(DecoderSpecs decSpec, HeaderDecoder hd, RandomAccessIO ehs, BitstreamReaderAgent src, boolean isTruncMode, int maxCB)(Code)
Creates an empty PktDecoder object associated with given decoder specifications and HeaderDecoder. This object must be initialized thanks to the restart method before being used.
Parameters:
  decSpec - The decoder specifications.
Parameters:
  hd - The HeaderDecoder instance.
Parameters:
  ehs - The stream where to read data from.
Parameters:
  src - The bit stream reader agent.
Parameters:
  isTruncMode - Whether or not truncation mode is required.
Parameters:
  maxCB - The maximum number of code-blocks to read before ncbquit




Method Detail
getNumPrecinct
public int getNumPrecinct(int c, int r)(Code)
Gets the number of precincts in a given component and resolution level.
Parameters:
  c - Component index
Parameters:
  r - Resolution index



getPPX
final public int getPPX(int t, int c, int r)(Code)
Returns the precinct partition width for the specified component, resolution level and tile.
Parameters:
  t - the tile index
Parameters:
  c - The index of the component (between 0 and C-1)
Parameters:
  r - The resolution level, from 0 to L. the precinct partition width for the specified component,resolution level and tile.



getPPY
final public int getPPY(int t, int c, int rl)(Code)
Returns the precinct partition height for the specified component, resolution level and tile.
Parameters:
  t - the tile index
Parameters:
  c - The index of the component (between 0 and C-1)
Parameters:
  rl - The resolution level, from 0 to L. the precinct partition height in the specified component, forthe specified resolution level, for the current tile.



getPrecInfo
public PrecInfo getPrecInfo(int c, int r, int p)(Code)
Get PrecInfo instance of the specified resolution level, component and precinct.
Parameters:
  c - Component index.
Parameters:
  r - Resolution level index.
Parameters:
  p - Precinct index.



readEPHMarker
public void readEPHMarker(PktHeaderBitReader bin) throws IOException(Code)
Try to read an EPH marker. If it is not possible then an Error is thrown.
Parameters:
  bin - The packet header reader to read the EPH marker from



readPktBody
public boolean readPktBody(int l, int r, int c, int p, CBlkInfo[][][] cbI, int[] nb) throws IOException(Code)
Reads specificied packet body in order to find offset of each code-block's piece of codeword. This use the list of found code-blocks in previous red packet head.
Parameters:
  l - layer index
Parameters:
  r - Resolution level index
Parameters:
  c - Component index
Parameters:
  p - Precinct index
Parameters:
  cbI - CBlkInfo array of relevant component and resolutionlevel.
Parameters:
  nb - The remainding number of bytes to read from the bit stream ineach tile before reaching the decoding rate (in truncation mode) True if decoding rate is reached



readPktHead
public boolean readPktHead(int l, int r, int c, int p, CBlkInfo[][][] cbI, int[] nb) throws IOException(Code)
Read specified packet head and found length of each code-block's piece of codewords as well as number of skipped most significant bit-planes.
Parameters:
  l - layer index
Parameters:
  r - Resolution level index
Parameters:
  c - Component index
Parameters:
  p - Precinct index
Parameters:
  cbI - CBlkInfo array of relevant component and resolutionlevel.
Parameters:
  nb - The number of bytes to read in each tile before reachingoutput rate (used by truncation mode) True if specified output rate or EOF is reached.



readSOPMarker
public boolean readSOPMarker(int[] nBytes, int p, int c, int r) throws IOException(Code)
Try to read a SOP marker and check that its sequence number if not out of sequence. If so, an error is thrown.
Parameters:
  nBytes - The number of bytes left to read from each tile
Parameters:
  p - Precinct index
Parameters:
  r - Resolution level index
Parameters:
  c - Component index



restart
public CBlkInfo[][][][][] restart(int nc, int[] mdl, int nl, CBlkInfo[][][][][] cbI, boolean pph, ByteArrayInputStream pphbais)(Code)
Re-initialize the PktDecoder instance at the beginning of a new tile.
Parameters:
  nc - The number of components in this tile
Parameters:
  mdl - The maximum number of decomposition level in each componentof this tile
Parameters:
  nl - The number of layers in this tile
Parameters:
  cbI - The code-blocks array
Parameters:
  pph - Flag indicating whether packed packet headers was used
Parameters:
  pphbais - Stream containing the packed packet headers



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.