# CSJ2K.j2k.codestream.reader.TagTreeDecoder

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="CSJ2K_j2k_codestream_reader_TagTreeDecoder" data-uid="CSJ2K.j2k.codestream.reader.TagTreeDecoder" class="text-break">TagTreeDecoder Class
</h1>
  <div class="markdown level0 summary"><p>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>
<pre><code>       &lt;p&gt;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.&lt;/p&gt;

       &lt;p&gt;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.&lt;/p&gt;
</code></pre>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><span class="xref">TagTreeDecoder</span></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="CSJ2K.j2k.codestream.reader.html">CSJ2K.j2k.codestream.reader</a></h6>
  <h6><strong>Assembly</strong>: C1.C1Pdf.4.8.dll</h6>
  <h5 id="CSJ2K_j2k_codestream_reader_TagTreeDecoder_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class TagTreeDecoder</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class TagTreeDecoder</code></pre>
  </div>
  <h3 id="constructors">Constructors
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="CSJ2K_j2k_codestream_reader_TagTreeDecoder__ctor_System_Int32_System_Int32_" data-uid="CSJ2K.j2k.codestream.reader.TagTreeDecoder.#ctor(System.Int32,System.Int32)">
          <a class="xref" href="CSJ2K.j2k.codestream.reader.TagTreeDecoder.-ctor.html#CSJ2K_j2k_codestream_reader_TagTreeDecoder__ctor_System_Int32_System_Int32_">TagTreeDecoder(int, int)</a>
        </td>
        <td class="markdown level1 summary"><p>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>
<pre><code>       &lt;p&gt;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.&lt;/p&gt;
</code></pre>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="fields">Fields
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="CSJ2K_j2k_codestream_reader_TagTreeDecoder_h" data-uid="CSJ2K.j2k.codestream.reader.TagTreeDecoder.h">
          <a class="xref" href="CSJ2K.j2k.codestream.reader.TagTreeDecoder.h.html">h</a>
        </td>
        <td class="markdown level1 summary"><p>The vertical dimensions of the base level</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_codestream_reader_TagTreeDecoder_lvls" data-uid="CSJ2K.j2k.codestream.reader.TagTreeDecoder.lvls">
          <a class="xref" href="CSJ2K.j2k.codestream.reader.TagTreeDecoder.lvls.html">lvls</a>
        </td>
        <td class="markdown level1 summary"><p>The number of levels in the tag tree</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_codestream_reader_TagTreeDecoder_treeS" data-uid="CSJ2K.j2k.codestream.reader.TagTreeDecoder.treeS">
          <a class="xref" href="CSJ2K.j2k.codestream.reader.TagTreeDecoder.treeS.html">treeS</a>
        </td>
        <td class="markdown level1 summary"><p>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.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_codestream_reader_TagTreeDecoder_treeV" data-uid="CSJ2K.j2k.codestream.reader.TagTreeDecoder.treeV">
          <a class="xref" href="CSJ2K.j2k.codestream.reader.TagTreeDecoder.treeV.html">treeV</a>
        </td>
        <td class="markdown level1 summary"><p>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.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_codestream_reader_TagTreeDecoder_w" data-uid="CSJ2K.j2k.codestream.reader.TagTreeDecoder.w">
          <a class="xref" href="CSJ2K.j2k.codestream.reader.TagTreeDecoder.w.html">w</a>
        </td>
        <td class="markdown level1 summary"><p>The horizontal dimension of the base level</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="properties">Properties
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="CSJ2K_j2k_codestream_reader_TagTreeDecoder_Height" data-uid="CSJ2K.j2k.codestream.reader.TagTreeDecoder.Height">
          <a class="xref" href="CSJ2K.j2k.codestream.reader.TagTreeDecoder.Height.html#CSJ2K_j2k_codestream_reader_TagTreeDecoder_Height">Height</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the number of leafs along the vertical direction.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_codestream_reader_TagTreeDecoder_Width" data-uid="CSJ2K.j2k.codestream.reader.TagTreeDecoder.Width">
          <a class="xref" href="CSJ2K.j2k.codestream.reader.TagTreeDecoder.Width.html#CSJ2K_j2k_codestream_reader_TagTreeDecoder_Width">Width</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the number of leafs along the horizontal direction.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="CSJ2K_j2k_codestream_reader_TagTreeDecoder_getValue_System_Int32_System_Int32_" data-uid="CSJ2K.j2k.codestream.reader.TagTreeDecoder.getValue(System.Int32,System.Int32)">
          <a class="xref" href="CSJ2K.j2k.codestream.reader.TagTreeDecoder.getValue.html#CSJ2K_j2k_codestream_reader_TagTreeDecoder_getValue_System_Int32_System_Int32_">getValue(int, int)</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the current value of the specified element in the tag
tree. This is the value as last updated by the update() method.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_codestream_reader_TagTreeDecoder_update_System_Int32_System_Int32_System_Int32_CSJ2K_j2k_codestream_reader_PktHeaderBitReader_" data-uid="CSJ2K.j2k.codestream.reader.TagTreeDecoder.update(System.Int32,System.Int32,System.Int32,CSJ2K.j2k.codestream.reader.PktHeaderBitReader)">
          <a class="xref" href="CSJ2K.j2k.codestream.reader.TagTreeDecoder.update.html#CSJ2K_j2k_codestream_reader_TagTreeDecoder_update_System_Int32_System_Int32_System_Int32_CSJ2K_j2k_codestream_reader_PktHeaderBitReader_">update(int, int, int, PktHeaderBitReader)</a>
        </td>
        <td class="markdown level1 summary"><p>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.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
