[]
        
(Showing Draft Content)

CSJ2K.j2k.codestream.reader.FileBitstreamReaderAgent

FileBitstreamReaderAgent Class

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.

       <p>Note: All tile-parts headers are read by the constructor whereas packets
       are processed when decoding related tile (when setTile method is
       called).</p><p>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).</p>
Inheritance
FileBitstreamReaderAgent
Namespace: CSJ2K.j2k.codestream.reader
Assembly: C1.WPF.PdfViewer.4.6.2.dll
Syntax
public class FileBitstreamReaderAgent : BitstreamReaderAgent, CodedCBlkDataSrcDec, InvWTData, MultiResImgData

Constructors

Name Description
FileBitstreamReaderAgent(HeaderDecoder, RandomAccessIO, DecoderSpecs, ParameterList, bool, HeaderInfo)

Reads all tiles headers and keep offset of their first packet. Finally it calls the rate allocation method.

Fields

Name Description
pktDec

Reference to the PktDecoder instance

Properties

Name Description
CBlkInfo

Gets the reference to the CBlkInfo array

Methods

Name Description
getCodeBlock(int, int, int, SubbandSyn, int, int, DecLyrdCBlk)

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.

       <p>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.</p><p>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.</p><p>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'.</p><p>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.</p>
getNumTileParts(int)

Returns the number of tile-part found for a given tile

nextTile()

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

setTile(int, int)

Changes the current tile, given the new indexes. An IllegalArgumentException is thrown if the indexes do not correspond to a valid tile.

See Also