# CSJ2K.j2k.codestream.reader.FileBitstreamReaderAgent.getCodeBlock

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="CSJ2K_j2k_codestream_reader_FileBitstreamReaderAgent_getCodeBlock_" data-uid="CSJ2K.j2k.codestream.reader.FileBitstreamReaderAgent.getCodeBlock*">getCodeBlock Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="CSJ2K_j2k_codestream_reader_FileBitstreamReaderAgent_getCodeBlock_" data-uid="CSJ2K.j2k.codestream.reader.FileBitstreamReaderAgent.getCodeBlock*"></a>
<h4 id="CSJ2K_j2k_codestream_reader_FileBitstreamReaderAgent_getCodeBlock_System_Int32_System_Int32_System_Int32_CSJ2K_j2k_wavelet_synthesis_SubbandSyn_System_Int32_System_Int32_CSJ2K_j2k_entropy_decoder_DecLyrdCBlk_" data-uid="CSJ2K.j2k.codestream.reader.FileBitstreamReaderAgent.getCodeBlock(System.Int32,System.Int32,System.Int32,CSJ2K.j2k.wavelet.synthesis.SubbandSyn,System.Int32,System.Int32,CSJ2K.j2k.entropy.decoder.DecLyrdCBlk)">getCodeBlock(int, int, int, SubbandSyn, int, int, DecLyrdCBlk)</h4>
<div class="markdown level1 summary"><p>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>
<pre><code>       &lt;p&gt;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.&lt;/p&gt;&lt;p&gt;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.&lt;/p&gt;&lt;p&gt;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'.&lt;/p&gt;&lt;p&gt;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.&lt;/p&gt;
</code></pre>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public override DecLyrdCBlk getCodeBlock(int c, int m, int n, SubbandSyn sb, int fl, int nl, DecLyrdCBlk ccb)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Overrides Function getCodeBlock(c As Integer, m As Integer, n As Integer, sb As SubbandSyn, fl As Integer, nl As Integer, ccb As DecLyrdCBlk) As DecLyrdCBlk</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">c</span></td>
      <td><p>The index of the component, from 0 to N-1.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">m</span></td>
      <td><p>The vertical index of the code-block to return, in the
specified subband.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">n</span></td>
      <td><p>The horizontal index of the code-block to return, in the
specified subband.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="CSJ2K.j2k.wavelet.synthesis.SubbandSyn.html">SubbandSyn</a></td>
      <td><span class="parametername">sb</span></td>
      <td><p>The subband in whic the requested code-block is.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">fl</span></td>
      <td><p>The first layer to return.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">nl</span></td>
      <td><p>The number of layers to return, if negative all available
layers are returned, starting at 'fl'.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="CSJ2K.j2k.entropy.decoder.DecLyrdCBlk.html">DecLyrdCBlk</a></td>
      <td><span class="parametername">ccb</span></td>
      <td><p>If not null this object is used to return the compressed
code-block. If null a new object is created and returned. If the data
array in ccb is not null then it can be reused to return the compressed
data.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="CSJ2K.j2k.entropy.decoder.DecLyrdCBlk.html">DecLyrdCBlk</a></td>
      <td><p>The compressed code-block, with a certain number of layers
determined by the available data and 'nl'.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="overrides">Overrides</h5>
<div><a class="xref" href="CSJ2K.j2k.codestream.reader.BitstreamReaderAgent.getCodeBlock.html#CSJ2K_j2k_codestream_reader_BitstreamReaderAgent_getCodeBlock_System_Int32_System_Int32_System_Int32_CSJ2K_j2k_wavelet_synthesis_SubbandSyn_System_Int32_System_Int32_CSJ2K_j2k_entropy_decoder_DecLyrdCBlk_">BitstreamReaderAgent.getCodeBlock(int, int, int, SubbandSyn, int, int, DecLyrdCBlk)</a></div>
</div>
