# CSJ2K.j2k.quantization.quantizer.CBlkQuantDataSrcEnc

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="CSJ2K_j2k_quantization_quantizer_CBlkQuantDataSrcEnc" data-uid="CSJ2K.j2k.quantization.quantizer.CBlkQuantDataSrcEnc" class="text-break">CBlkQuantDataSrcEnc Interface
</h1>
  <div class="markdown level0 summary"><p>This interface defines a source of quantized wavelet coefficients and
methods to transfer them in a code-block by code-block basis. In each call
to 'getNextCodeBlock()' or 'getNextInternCodeBlock()' a new code-block is
returned. The code-blocks are returned in no specific order.</p>
<pre><code>       &lt;p&gt;This class is the source of data for the entropy coder. See the
       'EntropyCoder' class.&lt;/p&gt;&lt;p&gt;Code-block data is returned in sign-magnitude representation, instead of
       the normal two's complement one. Only integral types are used. The sign
       magnitude representation is more adequate for entropy coding. In sign
       magnitude representation, the most significant bit is used for the sign (0
       if positive, 1 if negative) and the magnitude of the coefficient is stored
       in the next M most significant bits. The rest of the bits (least
       significant bits) can contain a fractional value of the quantized
       coefficient. The number 'M' of magnitude bits is communicated in the
       'magbits' member variable of the 'CBlkWTData'.&lt;/p&gt;&lt;p&gt;Note that no more of one object may request data, otherwise one object
       would get some of the data and another one another part, in no defined
       manner.&lt;/p&gt;
</code></pre>
</div>
  <div class="markdown level0 conceptual"></div>
  <h6><strong>Namespace</strong>: <a class="xref" href="CSJ2K.j2k.quantization.quantizer.html">CSJ2K.j2k.quantization.quantizer</a></h6>
  <h6><strong>Assembly</strong>: C1.WPF.ReportViewer.4.6.2.dll</h6>
  <h5 id="CSJ2K_j2k_quantization_quantizer_CBlkQuantDataSrcEnc_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public interface CBlkQuantDataSrcEnc : ForwWTDataProps, ImgData</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Interface CBlkQuantDataSrcEnc
    Inherits ForwWTDataProps, ImgData</code></pre>
  </div>
  <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_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)">
          <a class="xref" href="CSJ2K.j2k.quantization.quantizer.CBlkQuantDataSrcEnc.getNextCodeBlock.html#CSJ2K_j2k_quantization_quantizer_CBlkQuantDataSrcEnc_getNextCodeBlock_System_Int32_CSJ2K_j2k_wavelet_analysis_CBlkWTData_">getNextCodeBlock(int, CBlkWTData)</a>
        </td>
        <td 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>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_quantization_quantizer_CBlkQuantDataSrcEnc_getNextInternCodeBlock_System_Int32_CSJ2K_j2k_wavelet_analysis_CBlkWTData_" data-uid="CSJ2K.j2k.quantization.quantizer.CBlkQuantDataSrcEnc.getNextInternCodeBlock(System.Int32,CSJ2K.j2k.wavelet.analysis.CBlkWTData)">
          <a class="xref" href="CSJ2K.j2k.quantization.quantizer.CBlkQuantDataSrcEnc.getNextInternCodeBlock.html#CSJ2K_j2k_quantization_quantizer_CBlkQuantDataSrcEnc_getNextInternCodeBlock_System_Int32_CSJ2K_j2k_wavelet_analysis_CBlkWTData_">getNextInternCodeBlock(int, CBlkWTData)</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the next code-block in the current tile for the specified
component. 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 can be the data in the internal
       buffer of this object, if any, and thus can not be modified by the
       caller. The 'offset' and 'scanw' of the returned data can be
       arbitrary. 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>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="seealso">See Also</h3>
  <div class="seealso">
      <div><a class="xref" href="CSJ2K.j2k.wavelet.analysis.ForwWTDataProps.html">ForwWTDataProps</a></div>
      <div><a class="xref" href="CSJ2K.j2k.wavelet.analysis.CBlkWTDataSrc.html">CBlkWTDataSrc</a></div>
      <div><a class="xref" href="CSJ2K.j2k.quantization.quantizer.Quantizer.html">Quantizer</a></div>
      <div><a class="xref" href="CSJ2K.j2k.entropy.encoder.EntropyCoder.html">EntropyCoder</a></div>
  </div>

</div>
