# CSJ2K.j2k.image.DataBlk

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="CSJ2K_j2k_image_DataBlk" data-uid="CSJ2K.j2k.image.DataBlk" class="text-break">DataBlk Class
</h1>
  <div class="markdown level0 summary"><p>This is a generic abstract class to store data from a block of an
image. This class does not have the notion of components. Therefore, it
should be used for data from a single component. Subclasses should
implement the different types of storage (<tt>int</tt>, <tt>float</tt>,
etc.).</p>
<pre><code>       &lt;p&gt;The data is always stored in one array, of the type matching the data
       type (i.e. for 'int' it's an 'int[]'). The data should be stored in the
       array in standard scan-line order. That is the samples go from the top-left
       corner of the code-block to the lower-right corner by line and then
       column.&lt;/p&gt;&lt;p&gt;The member variable 'offset' gives the index in the array of the first
       data element (i.e. the top-left coefficient (ulx,uly)). The member variable
       'scanw' gives the width of the scan that is used to store the data, that
       can be different from the width of the block. Element '(x,y)' of the
       code-block (i.e. '(ulx,uly)' is the top-left coefficient), will appear at
       position 'offset+(y-uly)*scanw+(x-ulx)' in the array of data.&lt;/p&gt;&lt;p&gt;A block of data can have the &lt;i&gt;progressive&lt;/i&gt; attribute set. Data is
       progressive when it is obtained by successive refinement and the values in
       this block are approximations of the &quot;final&quot; values. When the final values
       are returned the progressive attribute must be turned off.&lt;/p&gt;&lt;p&gt;The classes &lt;tt&gt;DataBlkInt&lt;/tt&gt; and &lt;tt&gt;DataBlkFloat&lt;/tt&gt; provide
       implementations for &lt;tt&gt;int&lt;/tt&gt; and &lt;tt&gt;float&lt;/tt&gt; types respectively.&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"><span class="xref">DataBlk</span></div>
      <div class="level2"><a class="xref" href="CSJ2K.j2k.image.DataBlkFloat.html">DataBlkFloat</a></div>
      <div class="level2"><a class="xref" href="CSJ2K.j2k.image.DataBlkInt.html">DataBlkInt</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="CSJ2K.j2k.image.html">CSJ2K.j2k.image</a></h6>
  <h6><strong>Assembly</strong>: C1.WPF.ReportViewer.4.6.2.dll</h6>
  <h5 id="CSJ2K_j2k_image_DataBlk_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public abstract class DataBlk</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public MustInherit Class DataBlk</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_image_DataBlk__ctor" data-uid="CSJ2K.j2k.image.DataBlk.#ctor">
          <a class="xref" href="CSJ2K.j2k.image.DataBlk.-ctor.html#CSJ2K_j2k_image_DataBlk__ctor">DataBlk()</a>
        </td>
        <td class="markdown level1 summary"></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_image_DataBlk_TYPE_BYTE" data-uid="CSJ2K.j2k.image.DataBlk.TYPE_BYTE">
          <a class="xref" href="CSJ2K.j2k.image.DataBlk.TYPE_BYTE.html">TYPE_BYTE</a>
        </td>
        <td class="markdown level1 summary"><p>The identifier for the <tt>byte</tt> data type, as signed 8 bits.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_image_DataBlk_TYPE_FLOAT" data-uid="CSJ2K.j2k.image.DataBlk.TYPE_FLOAT">
          <a class="xref" href="CSJ2K.j2k.image.DataBlk.TYPE_FLOAT.html">TYPE_FLOAT</a>
        </td>
        <td class="markdown level1 summary"><p>The identifier for the <tt>float</tt> data type</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_image_DataBlk_TYPE_INT" data-uid="CSJ2K.j2k.image.DataBlk.TYPE_INT">
          <a class="xref" href="CSJ2K.j2k.image.DataBlk.TYPE_INT.html">TYPE_INT</a>
        </td>
        <td class="markdown level1 summary"><p>The identifier for the <tt>int</tt> data type, as signed 32 bits.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_image_DataBlk_TYPE_SHORT" data-uid="CSJ2K.j2k.image.DataBlk.TYPE_SHORT">
          <a class="xref" href="CSJ2K.j2k.image.DataBlk.TYPE_SHORT.html">TYPE_SHORT</a>
        </td>
        <td class="markdown level1 summary"><p>The identifier for the <tt>short</tt> data type, as signed 16 bits.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_image_DataBlk_h" data-uid="CSJ2K.j2k.image.DataBlk.h">
          <a class="xref" href="CSJ2K.j2k.image.DataBlk.h.html">h</a>
        </td>
        <td class="markdown level1 summary"><p>The height of the block, in pixels.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_image_DataBlk_offset" data-uid="CSJ2K.j2k.image.DataBlk.offset">
          <a class="xref" href="CSJ2K.j2k.image.DataBlk.offset.html">offset</a>
        </td>
        <td class="markdown level1 summary"><p>The offset in the array of the top-left coefficient</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_image_DataBlk_progressive" data-uid="CSJ2K.j2k.image.DataBlk.progressive">
          <a class="xref" href="CSJ2K.j2k.image.DataBlk.progressive.html">progressive</a>
        </td>
        <td class="markdown level1 summary"><p>The progressive attribute (<tt>false</tt> by default)</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_image_DataBlk_scanw" data-uid="CSJ2K.j2k.image.DataBlk.scanw">
          <a class="xref" href="CSJ2K.j2k.image.DataBlk.scanw.html">scanw</a>
        </td>
        <td class="markdown level1 summary"><p>The width of the scanlines used to store the data in the array</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_image_DataBlk_ulx" data-uid="CSJ2K.j2k.image.DataBlk.ulx">
          <a class="xref" href="CSJ2K.j2k.image.DataBlk.ulx.html">ulx</a>
        </td>
        <td class="markdown level1 summary"><p>The horizontal coordinate (in pixels) of the upper-left corner of the
block of data. This is relative to the component of the image from
where this block was filled or is to be filled.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_image_DataBlk_uly" data-uid="CSJ2K.j2k.image.DataBlk.uly">
          <a class="xref" href="CSJ2K.j2k.image.DataBlk.uly.html">uly</a>
        </td>
        <td class="markdown level1 summary"><p>The vertical coordinate of the upper-left corner of the block of
data. This is relative to the component of the image from where this
block was filled or is to be filled.</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_image_DataBlk_w" data-uid="CSJ2K.j2k.image.DataBlk.w">
          <a class="xref" href="CSJ2K.j2k.image.DataBlk.w.html">w</a>
        </td>
        <td class="markdown level1 summary"><p>The width of the block, in pixels.</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_image_DataBlk_Data" data-uid="CSJ2K.j2k.image.DataBlk.Data">
          <a class="xref" href="CSJ2K.j2k.image.DataBlk.Data.html#CSJ2K_j2k_image_DataBlk_Data">Data</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the array containing the data, or null if there is no data. The
returned array is of the type returned by <tt>getDataType()</tt> (e.g.,
for <tt>TYPE_INT</tt>, it is a <tt>int[]</tt>).</p>
<pre><code>       &lt;p&gt;Each implementing class should provide a type specific equivalent
       method (e.g., &lt;tt&gt;getDataInt()&lt;/tt&gt; in &lt;tt&gt;DataBlkInt&lt;/tt&gt;) which
       returns an array of the correct type explicetely and not through an
       &lt;tt&gt;Object&lt;/tt&gt;.&lt;/p&gt;
</code></pre>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_image_DataBlk_DataType" data-uid="CSJ2K.j2k.image.DataBlk.DataType">
          <a class="xref" href="CSJ2K.j2k.image.DataBlk.DataType.html#CSJ2K_j2k_image_DataBlk_DataType">DataType</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the data type of the <tt>DataBlk</tt> object, as defined in
this class.</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_image_DataBlk_ToString" data-uid="CSJ2K.j2k.image.DataBlk.ToString">
          <a class="xref" href="CSJ2K.j2k.image.DataBlk.ToString.html#CSJ2K_j2k_image_DataBlk_ToString">ToString()</a>
        </td>
        <td class="markdown level1 summary"><p>Returns a string of informations about the DataBlk</p>
</td>
      </tr>
      <tr>
        <td id="CSJ2K_j2k_image_DataBlk_getSize_System_Int32_" data-uid="CSJ2K.j2k.image.DataBlk.getSize(System.Int32)">
          <a class="xref" href="CSJ2K.j2k.image.DataBlk.getSize.html#CSJ2K_j2k_image_DataBlk_getSize_System_Int32_">getSize(int)</a>
        </td>
        <td class="markdown level1 summary"><p>Returns the size in bits, given the data type. The data type must be
one defined in this class. An <tt>IllegalArgumentException</tt> is
thrown if <tt>type</tt> is not defined in this class.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="seealso">See Also</h3>
  <div class="seealso">
      <div><a class="xref" href="CSJ2K.j2k.image.DataBlkInt.html">DataBlkInt</a></div>
      <div><a class="xref" href="CSJ2K.j2k.image.DataBlkFloat.html">DataBlkFloat</a></div>
  </div>

</div>
