# CSJ2K.j2k.entropy.encoder.EntropyCoder

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="CSJ2K_j2k_entropy_encoder_EntropyCoder" data-uid="CSJ2K.j2k.entropy.encoder.EntropyCoder" class="text-break">EntropyCoder Class
</h1>
  <div class="markdown level0 summary"><p>This abstract class provides the general interface for block-based entropy
encoders. The input to the entropy coder is the quantized wavelet
coefficients, or codewords, represented in sign magnitude. The output is a
compressed code-block with rate-distortion information.</p>
<pre><code>       &lt;p&gt;The source of data for objects of this class are 'CBlkQuantDataSrcEnc'
       objects.&lt;/p&gt;&lt;p&gt;For more details on the sign magnitude representation used see the
       Quantizer class.&lt;/p&gt;&lt;p&gt;This class provides default implemenations for most of the methods
       (wherever it makes sense), under the assumption that the image and
       component dimensions, and the tiles, are not modifed by the entropy
       coder. If that is not the case for a particular implementation then the
       methods should be overriden.&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"><a class="xref" href="CSJ2K.j2k.image.ImgDataAdapter.html">ImgDataAdapter</a></div>
    <div class="level2"><span class="xref">EntropyCoder</span></div>
      <div class="level3"><a class="xref" href="CSJ2K.j2k.entropy.encoder.StdEntropyCoder.html">StdEntropyCoder</a></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="CSJ2K.j2k.entropy.encoder.CodedCBlkDataSrcEnc.html">CodedCBlkDataSrcEnc</a></div>
    <div><a class="xref" href="CSJ2K.j2k.wavelet.analysis.ForwWTDataProps.html">ForwWTDataProps</a></div>
    <div><a class="xref" href="CSJ2K.j2k.image.ImgData.html">ImgData</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="CSJ2K.j2k.entropy.encoder.html">CSJ2K.j2k.entropy.encoder</a></h6>
  <h6><strong>Assembly</strong>: C1.WPF.ReportViewer.4.6.2.dll</h6>
  <h5 id="CSJ2K_j2k_entropy_encoder_EntropyCoder_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public abstract class EntropyCoder : ImgDataAdapter, CodedCBlkDataSrcEnc, ForwWTDataProps, ImgData</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public MustInherit Class EntropyCoder
    Inherits ImgDataAdapter
    Implements CodedCBlkDataSrcEnc, ForwWTDataProps, ImgData</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_entropy_encoder_EntropyCoder__ctor_CSJ2K_j2k_quantization_quantizer_CBlkQuantDataSrcEnc_" data-uid="CSJ2K.j2k.entropy.encoder.EntropyCoder.#ctor(CSJ2K.j2k.quantization.quantizer.CBlkQuantDataSrcEnc)">
          <a class="xref" href="CSJ2K.j2k.entropy.encoder.EntropyCoder.-ctor.html#CSJ2K_j2k_entropy_encoder_EntropyCoder__ctor_CSJ2K_j2k_quantization_quantizer_CBlkQuantDataSrcEnc_">EntropyCoder(CBlkQuantDataSrcEnc)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes the source of quantized wavelet coefficients.</p>
</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_entropy_encoder_EntropyCoder_OPT_PREFIX" data-uid="CSJ2K.j2k.entropy.encoder.EntropyCoder.OPT_PREFIX">
          <a class="xref" href="CSJ2K.j2k.entropy.encoder.EntropyCoder.OPT_PREFIX.html">OPT_PREFIX</a>
        </td>
        <td class="markdown level1 summary"><p>The prefix for entropy coder options: 'C'</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_entropy_encoder_EntropyCoder_src" data-uid="CSJ2K.j2k.entropy.encoder.EntropyCoder.src">
          <a class="xref" href="CSJ2K.j2k.entropy.encoder.EntropyCoder.src.html">src</a>
        </td>
        <td class="markdown level1 summary"><p>The source of quantized wavelet coefficients</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_entropy_encoder_EntropyCoder_CbULX" data-uid="CSJ2K.j2k.entropy.encoder.EntropyCoder.CbULX">
          <a class="xref" href="CSJ2K.j2k.entropy.encoder.EntropyCoder.CbULX.html#CSJ2K_j2k_entropy_encoder_EntropyCoder_CbULX">CbULX</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the horizontal offset of the code-block partition. Allowable
values are 0 and 1, nothing else.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_entropy_encoder_EntropyCoder_CbULY" data-uid="CSJ2K.j2k.entropy.encoder.EntropyCoder.CbULY">
          <a class="xref" href="CSJ2K.j2k.entropy.encoder.EntropyCoder.CbULY.html#CSJ2K_j2k_entropy_encoder_EntropyCoder_CbULY">CbULY</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the vertical offset of the code-block partition. Allowable
values are 0 and 1, nothing else.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_entropy_encoder_EntropyCoder_ParameterInfo" data-uid="CSJ2K.j2k.entropy.encoder.EntropyCoder.ParameterInfo">
          <a class="xref" href="CSJ2K.j2k.entropy.encoder.EntropyCoder.ParameterInfo.html#CSJ2K_j2k_entropy_encoder_EntropyCoder_ParameterInfo">ParameterInfo</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the parameters that are used in this class and implementing
classes. It returns a 2D String array. Each of the 1D arrays is for a
different option, and they have 3 elements. The first element is the
option name, the second one is the synopsis, the third one is a long
description of what the parameter is and the fourth is its default
value. The synopsis or description may be 'null', in which case it is
assumed that there is no synopsis or description of the option,
respectively. Null may be returned if no options are supported.</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_entropy_encoder_EntropyCoder_createInstance_CSJ2K_j2k_quantization_quantizer_CBlkQuantDataSrcEnc_CSJ2K_j2k_util_ParameterList_CSJ2K_j2k_entropy_CBlkSizeSpec_CSJ2K_j2k_entropy_PrecinctSizeSpec_CSJ2K_j2k_StringSpec_CSJ2K_j2k_StringSpec_CSJ2K_j2k_StringSpec_CSJ2K_j2k_StringSpec_CSJ2K_j2k_StringSpec_CSJ2K_j2k_StringSpec_CSJ2K_j2k_StringSpec_" data-uid="CSJ2K.j2k.entropy.encoder.EntropyCoder.createInstance(CSJ2K.j2k.quantization.quantizer.CBlkQuantDataSrcEnc,CSJ2K.j2k.util.ParameterList,CSJ2K.j2k.entropy.CBlkSizeSpec,CSJ2K.j2k.entropy.PrecinctSizeSpec,CSJ2K.j2k.StringSpec,CSJ2K.j2k.StringSpec,CSJ2K.j2k.StringSpec,CSJ2K.j2k.StringSpec,CSJ2K.j2k.StringSpec,CSJ2K.j2k.StringSpec,CSJ2K.j2k.StringSpec)">
          <a class="xref" href="CSJ2K.j2k.entropy.encoder.EntropyCoder.createInstance.html#CSJ2K_j2k_entropy_encoder_EntropyCoder_createInstance_CSJ2K_j2k_quantization_quantizer_CBlkQuantDataSrcEnc_CSJ2K_j2k_util_ParameterList_CSJ2K_j2k_entropy_CBlkSizeSpec_CSJ2K_j2k_entropy_PrecinctSizeSpec_CSJ2K_j2k_StringSpec_CSJ2K_j2k_StringSpec_CSJ2K_j2k_StringSpec_CSJ2K_j2k_StringSpec_CSJ2K_j2k_StringSpec_CSJ2K_j2k_StringSpec_CSJ2K_j2k_StringSpec_">createInstance(CBlkQuantDataSrcEnc, ParameterList, CBlkSizeSpec, PrecinctSizeSpec, StringSpec, StringSpec, StringSpec, StringSpec, StringSpec, StringSpec, StringSpec)</a>
        </td>
        <td class="markdown level1 summary"><p>Creates a EntropyCoder object for the appropriate entropy coding
parameters in the parameter list 'pl', and having 'src' as the source
of quantized data.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_entropy_encoder_EntropyCoder_getAnSubbandTree_System_Int32_System_Int32_" data-uid="CSJ2K.j2k.entropy.encoder.EntropyCoder.getAnSubbandTree(System.Int32,System.Int32)">
          <a class="xref" href="CSJ2K.j2k.entropy.encoder.EntropyCoder.getAnSubbandTree.html#CSJ2K_j2k_entropy_encoder_EntropyCoder_getAnSubbandTree_System_Int32_System_Int32_">getAnSubbandTree(int, int)</a>
        </td>
        <td class="markdown level1 summary"><p>Returns a reference to the root of subband tree structure representing
the subband decomposition for the specified tile-component.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_entropy_encoder_EntropyCoder_getCBlkHeight_System_Int32_System_Int32_" data-uid="CSJ2K.j2k.entropy.encoder.EntropyCoder.getCBlkHeight(System.Int32,System.Int32)">
          <a class="xref" href="CSJ2K.j2k.entropy.encoder.EntropyCoder.getCBlkHeight.html#CSJ2K_j2k_entropy_encoder_EntropyCoder_getCBlkHeight_System_Int32_System_Int32_">getCBlkHeight(int, int)</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the code-block height for the specified tile and component.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_entropy_encoder_EntropyCoder_getCBlkWidth_System_Int32_System_Int32_" data-uid="CSJ2K.j2k.entropy.encoder.EntropyCoder.getCBlkWidth(System.Int32,System.Int32)">
          <a class="xref" href="CSJ2K.j2k.entropy.encoder.EntropyCoder.getCBlkWidth.html#CSJ2K_j2k_entropy_encoder_EntropyCoder_getCBlkWidth_System_Int32_System_Int32_">getCBlkWidth(int, int)</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the code-block width for the specified tile and component.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_entropy_encoder_EntropyCoder_getNextCodeBlock_System_Int32_CSJ2K_j2k_entropy_encoder_CBlkRateDistStats_" data-uid="CSJ2K.j2k.entropy.encoder.EntropyCoder.getNextCodeBlock(System.Int32,CSJ2K.j2k.entropy.encoder.CBlkRateDistStats)">
          <a class="xref" href="CSJ2K.j2k.entropy.encoder.EntropyCoder.getNextCodeBlock.html#CSJ2K_j2k_entropy_encoder_EntropyCoder_getNextCodeBlock_System_Int32_CSJ2K_j2k_entropy_encoder_CBlkRateDistStats_">getNextCodeBlock(int, CBlkRateDistStats)</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the next coded 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.&lt;/p&gt;
</code></pre>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_entropy_encoder_EntropyCoder_getPPX_System_Int32_System_Int32_System_Int32_" data-uid="CSJ2K.j2k.entropy.encoder.EntropyCoder.getPPX(System.Int32,System.Int32,System.Int32)">
          <a class="xref" href="CSJ2K.j2k.entropy.encoder.EntropyCoder.getPPX.html#CSJ2K_j2k_entropy_encoder_EntropyCoder_getPPX_System_Int32_System_Int32_System_Int32_">getPPX(int, int, int)</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the width of a packet for the specified tile-component and
resolution level.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_entropy_encoder_EntropyCoder_getPPY_System_Int32_System_Int32_System_Int32_" data-uid="CSJ2K.j2k.entropy.encoder.EntropyCoder.getPPY(System.Int32,System.Int32,System.Int32)">
          <a class="xref" href="CSJ2K.j2k.entropy.encoder.EntropyCoder.getPPY.html#CSJ2K_j2k_entropy_encoder_EntropyCoder_getPPY_System_Int32_System_Int32_System_Int32_">getPPY(int, int, int)</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the height of a packet for the specified tile-component and
resolution level.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_entropy_encoder_EntropyCoder_isReversible_System_Int32_System_Int32_" data-uid="CSJ2K.j2k.entropy.encoder.EntropyCoder.isReversible(System.Int32,System.Int32)">
          <a class="xref" href="CSJ2K.j2k.entropy.encoder.EntropyCoder.isReversible.html#CSJ2K_j2k_entropy_encoder_EntropyCoder_isReversible_System_Int32_System_Int32_">isReversible(int, int)</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the reversibility of the given tile-component. Data is
reversible when it is suitable for lossless and lossy-to-lossless
compression.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_entropy_encoder_EntropyCoder_precinctPartitionUsed_System_Int32_System_Int32_" data-uid="CSJ2K.j2k.entropy.encoder.EntropyCoder.precinctPartitionUsed(System.Int32,System.Int32)">
          <a class="xref" href="CSJ2K.j2k.entropy.encoder.EntropyCoder.precinctPartitionUsed.html#CSJ2K_j2k_entropy_encoder_EntropyCoder_precinctPartitionUsed_System_Int32_System_Int32_">precinctPartitionUsed(int, int)</a>
        </td>
        <td class="markdown level1 summary"><p>Returns true if the precinct partition is used for the specified
component and tile, returns false otherwise</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="seealso">See Also</h3>
  <div class="seealso">
      <div><a class="xref" href="CSJ2K.j2k.quantization.quantizer.Quantizer.html">Quantizer</a></div>
      <div><a class="xref" href="CSJ2K.j2k.quantization.quantizer.CBlkQuantDataSrcEnc.html">CBlkQuantDataSrcEnc</a></div>
  </div>

</div>
