# CSJ2K.j2k.roi.ROIDeScaler.getCodeBlock

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="CSJ2K_j2k_roi_ROIDeScaler_getCodeBlock_" data-uid="CSJ2K.j2k.roi.ROIDeScaler.getCodeBlock*">getCodeBlock Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="CSJ2K_j2k_roi_ROIDeScaler_getCodeBlock_" data-uid="CSJ2K.j2k.roi.ROIDeScaler.getCodeBlock*"></a>
<h4 id="CSJ2K_j2k_roi_ROIDeScaler_getCodeBlock_System_Int32_System_Int32_System_Int32_CSJ2K_j2k_wavelet_synthesis_SubbandSyn_CSJ2K_j2k_image_DataBlk_" data-uid="CSJ2K.j2k.roi.ROIDeScaler.getCodeBlock(System.Int32,System.Int32,System.Int32,CSJ2K.j2k.wavelet.synthesis.SubbandSyn,CSJ2K.j2k.image.DataBlk)">getCodeBlock(int, int, int, SubbandSyn, DataBlk)</h4>
<div class="markdown level1 summary"><p>Returns the specified code-block in the current tile for the specified
component, as a copy (see below).</p>
<pre><code>       &lt;p&gt;The returned code-block may be progressive, which is indicated by
       the 'progressive' variable of the returned 'DataBlk' object. If a
       code-block is progressive it means that in a later request to this
       method for the same code-block it is possible to retrieve data which is
       a better approximation, since meanwhile more data to decode for the
       code-block could have been received. If the code-block is not
       progressive then later calls to this method for the same code-block
       will return the exact same data values.&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
       'DataBlk' class.&lt;/p&gt;&lt;p&gt;The 'ulx' and 'uly' members of the returned 'DataBlk' 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 virtual DataBlk getCodeBlock(int c, int m, int n, SubbandSyn sb, DataBlk cblk)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Overridable Function getCodeBlock(c As Integer, m As Integer, n As Integer, sb As SubbandSyn, cblk As DataBlk) As DataBlk</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="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 which the code-block to return is.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="CSJ2K.j2k.image.DataBlk.html">DataBlk</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.image.DataBlk.html">DataBlk</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 class="implements">Implements</h5>
    <div><a class="xref" href="CSJ2K.j2k.quantization.dequantizer.CBlkQuantDataSrcDec.getCodeBlock.html#CSJ2K_j2k_quantization_dequantizer_CBlkQuantDataSrcDec_getCodeBlock_System_Int32_System_Int32_System_Int32_CSJ2K_j2k_wavelet_synthesis_SubbandSyn_CSJ2K_j2k_image_DataBlk_">CBlkQuantDataSrcDec.getCodeBlock(int, int, int, SubbandSyn, DataBlk)</a></div>
<h5 id="CSJ2K_j2k_roi_ROIDeScaler_getCodeBlock_System_Int32_System_Int32_System_Int32_CSJ2K_j2k_wavelet_synthesis_SubbandSyn_CSJ2K_j2k_image_DataBlk__seealso">See Also</h5>
<div class="seealso">
    <div><a class="xref" href="CSJ2K.j2k.image.DataBlk.html">DataBlk</a></div>
</div>
</div>
