[]
This is the generic interface for bit stream reader agents. A bit stream reader agent is an entity that allows reading from a bit stream and requesting compressed code-blocks. It can be a simple file reader, or a network connection, or anything else.
<p>The bit stream reader agent allows to make request for compressed block
data in any order. The amount of data returned would normally depend on the
data available at the time of the request, be it from a file or from a
network connection.</p><p>The bit stream reader agent has the notion of a current tile, and
coordinates are relative to the current tile, where applicable.</p><p>Resolution level 0 is the lowest resolution level, i.e. the LL subband
alone.</p>
This class contains location of code-blocks' piece of codewords (there is one piece per layer) and some other information.
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>
This class reads main and tile-part headers from the codestream given a RandomAccessIO instance located at the beginning of the codestream (i.e just before the SOC marker) or at the beginning of a tile-part (i.e. just before a SOT marker segment) respectively.
<p>A marker segment includes a marker and eventually marker segment
parameters. It is designed by the three letters code of the marker
associated with the marker segment. JPEG 2000 part 1 defines 6 types of
markers segments:
<ul><li> Delimiting : SOC, SOT, SOD, EOC</li><li> Fixed information: SIZ.</li><li> Functional: COD, COC, RGN, QCD, QCC,POC.</li><li> In bit-stream: SOP, EPH.</li><li> Pointer: TLM, PLM, PLT, PPM, PPT.</li><li> Informational: CRG, COM.</li></ul></p><p>The main header is read when the constructor is called whereas tile-part
headers are read when the FileBitstreamReaderAgent instance is created. The
reading is done in 2 passes:
<ol><li>All marker segments are buffered and their corresponding flag is
activated (extractMainMarkSeg and extractTilePartMarkSeg methods).</li><li>Buffered marker segment are analyzed in a logical way and
specifications are stored in appropriate member of DecoderSpecs instance
(readFoundMainMarkSeg and readFoundTilePartMarkSeg methods).</li></ol></p><p>Whenever a marker segment is not recognized a warning message is
displayed and its length parameter is used to skip it.</p><p>The information found in this header is stored in HeaderInfo and
DecoderSpecs instances.</p>
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.
This class provides a bit based reading facility from a byte based one, applying the bit unstuffing procedure as required by the packet headers.
This class defines an object used to countain informations about a packet to which the current code-block belongs.
This class implements the tag tree decoder. A tag tree codes a 2D matrix of integer elements in an efficient way. The decoding procedure 'update()' updates a value of the matrix from a stream of coded data, given a threshold. This procedure decodes enough information to identify whether or not the value is greater than or equal to the threshold, and updates the value accordingly.
<p>In general the decoding procedure must follow the same sequence of
elements and thresholds as the encoding one. The encoder is implemented by
the TagTreeEncoder class.</p><p>Tag trees that have one dimension, or both, as 0 are allowed for
convenience. Of course no values can be set or coded in such cases.</p>