[]
        
(Showing Draft Content)

CSJ2K.j2k.codestream.reader.TagTreeDecoder

TagTreeDecoder Class

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>
Inheritance
TagTreeDecoder
Namespace: CSJ2K.j2k.codestream.reader
Assembly: C1.WPF.PdfViewer.4.6.2.dll
Syntax
public class TagTreeDecoder

Constructors

Name Description
TagTreeDecoder(int, int)

Creates a tag tree decoder with 'w' elements along the horizontal dimension and 'h' elements along the vertical direction. The total number of elements is thus 'vdim' x 'hdim'.

       <p>The values of all elements are initialized to Integer.MAX_VALUE
       (i.e. no information decoded so far). The states are initialized all to
       0.</p>

Fields

Name Description
h

The vertical dimensions of the base level

lvls

The number of levels in the tag tree

treeS

The tag tree state. The first index is the level, starting at level 0 (leafs). The second index is the element within the level, in lexicographical order.

treeV

The tag tree values. The first index is the level, starting at level 0 (leafs). The second index is the element within the level, in lexicographical order.

w

The horizontal dimension of the base level

Properties

Name Description
Height

Returns the number of leafs along the vertical direction.

Width

Returns the number of leafs along the horizontal direction.

Methods

Name Description
getValue(int, int)

Returns the current value of the specified element in the tag tree. This is the value as last updated by the update() method.

update(int, int, int, PktHeaderBitReader)

Decodes information for the specified element of the tree, given the threshold, and updates its value. The information that can be decoded is whether or not the value of the element is greater than, or equal to, the value of the threshold.