# CSJ2K.j2k.quantization.quantizer.CBlkQuantDataSrcEnc.getNextCodeBlock

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="CSJ2K_j2k_quantization_quantizer_CBlkQuantDataSrcEnc_getNextCodeBlock_" data-uid="CSJ2K.j2k.quantization.quantizer.CBlkQuantDataSrcEnc.getNextCodeBlock*">getNextCodeBlock Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="CSJ2K_j2k_quantization_quantizer_CBlkQuantDataSrcEnc_getNextCodeBlock_" data-uid="CSJ2K.j2k.quantization.quantizer.CBlkQuantDataSrcEnc.getNextCodeBlock*"></a>
<h4 id="CSJ2K_j2k_quantization_quantizer_CBlkQuantDataSrcEnc_getNextCodeBlock_System_Int32_CSJ2K_j2k_wavelet_analysis_CBlkWTData_" data-uid="CSJ2K.j2k.quantization.quantizer.CBlkQuantDataSrcEnc.getNextCodeBlock(System.Int32,CSJ2K.j2k.wavelet.analysis.CBlkWTData)">getNextCodeBlock(int, CBlkWTData)</h4>
<div class="markdown level1 summary"><p>Returns the next code-block in the current tile for the specified
component, as a copy (see below). The order in which code-blocks are
returned is not specified. However each code-block is returned only
once and all code-blocks will be returned if the method is called 'N'
times, where 'N' is the number of code-blocks in the tile. After all
the code-blocks have been returned for the current tile calls to this
method will return 'null'.</p>
<pre><code>       &lt;p&gt;When changing the current tile (through 'setTile()' or 'nextTile()')
       this method will always return the first code-block, as if this method
       was never called before for the new current tile.&lt;/p&gt;&lt;p&gt;The data returned by this method is always a copy of the internal
       data of this object, if any, and it can be modified &quot;in place&quot; without
       any problems after being returned. The 'offset' of the returned data is
       0, and the 'scanw' is the same as the code-block width. See the
       'CBlkWTData' class.&lt;/p&gt;&lt;p&gt;The 'ulx' and 'uly' members of the returned 'CBlkWTData' 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">CBlkWTData getNextCodeBlock(int c, CBlkWTData cblk)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Function getNextCodeBlock(c As Integer, cblk As CBlkWTData) As CBlkWTData</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 component for which to return the next code-block.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="CSJ2K.j2k.wavelet.analysis.CBlkWTData.html">CBlkWTData</a></td>
      <td><span class="parametername">cblk</span></td>
      <td><p>If non-null this object will be used to return the new
code-block. If null a new one will be allocated and returned. If the
&quot;data&quot; array of the object is non-null it will be reused, if possible,
to return the 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.wavelet.analysis.CBlkWTData.html">CBlkWTData</a></td>
      <td><p>The next code-block in the current tile for component 'c', or
null if all code-blocks for the current tile have been returned.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="CSJ2K_j2k_quantization_quantizer_CBlkQuantDataSrcEnc_getNextCodeBlock_System_Int32_CSJ2K_j2k_wavelet_analysis_CBlkWTData__seealso">See Also</h5>
<div class="seealso">
    <div><a class="xref" href="CSJ2K.j2k.wavelet.analysis.CBlkWTData.html">CBlkWTData</a></div>
</div>
</div>
