Java Doc for FileBitstreamReaderAgent.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.BitstreamReaderAgent
      jj2000.j2k.codestream.reader.FileBitstreamReaderAgent

FileBitstreamReaderAgent
public class FileBitstreamReaderAgent extends BitstreamReaderAgent implements Markers,ProgressionType,StdEntropyCoderOptions(Code)
This class reads the bit stream (with the help of HeaderDecoder for tile headers and PktDecoder for packets header and body) and retrives location of all code-block's codewords.

Note: All tile-parts headers are read by the constructor whereas packets are processed when decoding related tile (when setTile method is called).

In parsing mode, the reader simulates a virtual layer-resolution progressive bit stream with the same truncation points in each code-block, whereas in truncation mode, only the first bytes are taken into account (it behaves like if it is a real truncated codestream).
See Also:   HeaderDecoder
See Also:   PktDecoder



Field Summary
 intcdstreamStart
    
 intlastPosmaxPos
    
 intmaxTP
    
 intnumtp
    
public  PktDecoderpktDec
    
 booleanrateReached
    
 long[][]tilePartPositions
    
 inttilePartStart
    
 inttpostptptot
    

Constructor Summary
public  FileBitstreamReaderAgent(HeaderDecoder hd, RandomAccessIO ehs, DecoderSpecs decSpec, J2KImageReadParamJava j2krparam, boolean cdstrInfo, HeaderInfo hi)
     Reads all tiles headers and keep offset of their first packet.

Method Summary
public  CBlkInfo[][][][][]getCBlkInfo()
    
public  DecLyrdCBlkgetCodeBlock(int c, int m, int n, SubbandSyn sb, int fl, int nl, DecLyrdCBlk ccb)
     Returns the specified coded code-block, for the specified component, in the current tile.
public  intgetNumTileParts(int t)
    
public  voidnextTile()
     Advances to the next tile, in standard scan-line order (by rows then columns).
public  voidsetTile(int x, int y)
     Changes the current tile, given the new indexes.

Field Detail
cdstreamStart
int cdstreamStart(Code)



lastPosmaxPos
int lastPosmaxPos(Code)



maxTP
int maxTP(Code)



numtp
int numtp(Code)



pktDec
public PktDecoder pktDec(Code)
Reference to the PktDecoder instance



rateReached
boolean rateReached(Code)



tilePartPositions
long[][] tilePartPositions(Code)



tilePartStart
int tilePartStart(Code)



tpostptptot
int tpostptptot(Code)




Constructor Detail
FileBitstreamReaderAgent
public FileBitstreamReaderAgent(HeaderDecoder hd, RandomAccessIO ehs, DecoderSpecs decSpec, J2KImageReadParamJava j2krparam, boolean cdstrInfo, HeaderInfo hi) throws IOException(Code)
Reads all tiles headers and keep offset of their first packet. Finally it calls the rate allocation method.
Parameters:
  hd - HeaderDecoder of the codestream.
Parameters:
  ehs - The input stream where to read bit-stream.
Parameters:
  decSpec - The decoder specifications
Parameters:
  j2krparam - The J2KImageReadParam instance created from thecommand-line arguments.
Parameters:
  cdstrInfo - Whether or not to print information found incodestream.
See Also:   FileBitstreamReaderAgent.allocateRate




Method Detail
getCBlkInfo
public CBlkInfo[][][][][] getCBlkInfo()(Code)
Gets the reference to the CBlkInfo array



getCodeBlock
public DecLyrdCBlk getCodeBlock(int c, int m, int n, SubbandSyn sb, int fl, int nl, DecLyrdCBlk ccb)(Code)
Returns the specified coded code-block, for the specified component, in the current tile. The first layer to return is indicated by 'fl'. The number of layers that is returned depends on 'nl' and the amount of available data.

The argument 'fl' is to be used by subsequent calls to this method for the same code-block. In this way supplemental data can be retrieved at a later time. The fact that data from more than one layer can be returned means that several packets from the same code-block, of the same component, and the same tile, have been concatenated.

The returned compressed code-block can have its progressive attribute set. If this attribute is set it means that more data can be obtained by subsequent calls to this method (subject to transmission delays, etc). If the progressive attribute is not set it means that the returned data is all the data that can be obtained for the specified code-block.

The compressed code-block is uniquely specified by the current tile, the component (identified by 'c'), the subband (indentified by 'sb') and the code-block vertical and horizontal indexes 'n' and 'm'.

The 'ulx' and 'uly' members of the returned 'DecLyrdCBlk' object contain the coordinates of the top-left corner of the block, with respect to the tile, not the subband.


Parameters:
  c - The index of the component, from 0 to N-1.
Parameters:
  m - The vertical index of the code-block to return, in thespecified subband.
Parameters:
  n - The horizontal index of the code-block to return, in thespecified subband.
Parameters:
  sb - The subband in whic the requested code-block is.
Parameters:
  fl - The first layer to return.
Parameters:
  nl - The number of layers to return, if negative all availablelayers are returned, starting at 'fl'.
Parameters:
  ccb - If not null this object is used to return the compressedcode-block. If null a new object is created and returned. If the dataarray in ccb is not null then it can be reused to return the compresseddata. The compressed code-block, with a certain number of layersdetermined by the available data and 'nl'.



getNumTileParts
public int getNumTileParts(int t)(Code)
Returns the number of tile-part found for a given tile
Parameters:
  t - Tile index



nextTile
public void nextTile()(Code)
Advances to the next tile, in standard scan-line order (by rows then columns). An NoNextElementException is thrown if the current tile is the last one (i.e. there is no next tile).



setTile
public void setTile(int x, int y)(Code)
Changes the current tile, given the new indexes. An IllegalArgumentException is thrown if the indexes do not correspond to a valid tile.
Parameters:
  x - The horizontal indexes the tile.
Parameters:
  y - The vertical indexes of the new tile.



Fields inherited from jj2000.j2k.codestream.reader.BitstreamReaderAgent
final public static char OPT_PREFIX(Code)(Java Doc)
protected int anbytes(Code)(Java Doc)
protected float arate(Code)(Java Doc)
final protected int ax(Code)(Java Doc)
final protected int ay(Code)(Java Doc)
protected int ctX(Code)(Java Doc)
protected int ctY(Code)(Java Doc)
final protected int culx(Code)(Java Doc)
final protected int culy(Code)(Java Doc)
protected DecoderSpecs decSpec(Code)(Java Doc)
protected boolean derived(Code)(Java Doc)
protected int[] gb(Code)(Java Doc)
final protected HeaderDecoder hd(Code)(Java Doc)
final protected int imgH(Code)(Java Doc)
final protected int imgW(Code)(Java Doc)
protected int mdl(Code)(Java Doc)
final protected int nc(Code)(Java Doc)
final protected int nt(Code)(Java Doc)
final protected int ntH(Code)(Java Doc)
final protected int ntW(Code)(Java Doc)
final protected int ntX(Code)(Java Doc)
final protected int ntY(Code)(Java Doc)
final protected int offX(Code)(Java Doc)
final protected int offY(Code)(Java Doc)
protected StdDequantizerParams params(Code)(Java Doc)
final protected int px(Code)(Java Doc)
final protected int py(Code)(Java Doc)
protected SubbandSyn subbTrees(Code)(Java Doc)
protected int targetRes(Code)(Java Doc)
protected int tnbytes(Code)(Java Doc)
protected float trate(Code)(Java Doc)

Methods inherited from jj2000.j2k.codestream.reader.BitstreamReaderAgent
public static BitstreamReaderAgent createInstance(RandomAccessIO in, HeaderDecoder hd, J2KImageReadParamJava j2krparam, DecoderSpecs decSpec, boolean cdstrInfo, HeaderInfo hi) throws IOException(Code)(Java Doc)
public int getActualNbytes()(Code)(Java Doc)
public float getActualRate()(Code)(Java Doc)
final public int getCbULX()(Code)(Java Doc)
public int getCbULY()(Code)(Java Doc)
final public int getCompImgHeight(int c, int rl)(Code)(Java Doc)
final public int getCompImgWidth(int c, int rl)(Code)(Java Doc)
final public int getCompSubsX(int c)(Code)(Java Doc)
public int getCompSubsY(int c)(Code)(Java Doc)
public int getImgHeight(int rl)(Code)(Java Doc)
public int getImgRes()(Code)(Java Doc)
public int getImgULX(int rl)(Code)(Java Doc)
public int getImgULY(int rl)(Code)(Java Doc)
public int getImgWidth(int rl)(Code)(Java Doc)
public int getNomTileHeight()(Code)(Java Doc)
public int getNomTileWidth()(Code)(Java Doc)
final public int getNumComps()(Code)(Java Doc)
final public Point getNumTiles(Point co)(Code)(Java Doc)
final public int getNumTiles()(Code)(Java Doc)
final public int getPPX(int t, int c, int rl)(Code)(Java Doc)
final public int getPPY(int t, int c, int rl)(Code)(Java Doc)
public static String[][] getParameterInfo()(Code)(Java Doc)
final public int getResULX(int c, int rl)(Code)(Java Doc)
final public int getResULY(int c, int rl)(Code)(Java Doc)
final public SubbandSyn getSynSubbandTree(int t, int c)(Code)(Java Doc)
public int getTargetNbytes()(Code)(Java Doc)
public float getTargetRate()(Code)(Java Doc)
final public Point getTile(Point co)(Code)(Java Doc)
final public int getTileCompHeight(int t, int c, int rl)(Code)(Java Doc)
final public int getTileCompWidth(int t, int c, int rl)(Code)(Java Doc)
public int getTileHeight(int rl)(Code)(Java Doc)
final public int getTileIdx()(Code)(Java Doc)
public int getTilePartULX()(Code)(Java Doc)
public int getTilePartULY()(Code)(Java Doc)
public int getTileWidth(int rl)(Code)(Java Doc)
protected void initSubbandsFields(int c, SubbandSyn sb)(Code)(Java Doc)
abstract public void nextTile()(Code)(Java Doc)
abstract public void setTile(int x, int y)(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.