# CSJ2K.j2k.image

## Content

<div class="doc-site-dotnet-api-container">

  <h1 id="CSJ2K_j2k_image" data-uid="CSJ2K.j2k.image" class="text-break">CSJ2K.j2k.image Namespace
</h1>
  <div class="markdown level0 summary"></div>
  <div class="markdown level0 conceptual"></div>
  <div class="markdown level0 remarks"></div>
    <h3 id="classes">
Classes
</h3>
      <h4><a class="xref" href="CSJ2K.j2k.image.CompTransfSpec.html">CompTransfSpec</a></h4>
      <section><p>This class extends the ModuleSpec class in order to hold tile
specifications for multiple component transformation</p>
</section>
      <h4><a class="xref" href="CSJ2K.j2k.image.Coord.html">Coord</a></h4>
      <section><p>This class represents 2-D coordinates.</p>
</section>
      <h4><a class="xref" href="CSJ2K.j2k.image.DataBlk.html">DataBlk</a></h4>
      <section><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>
</section>
      <h4><a class="xref" href="CSJ2K.j2k.image.DataBlkFloat.html">DataBlkFloat</a></h4>
      <section><p>This is an implementation of the <tt>DataBlk</tt> interface for 32 bit
floating point data (float).</p>
<pre><code>       &lt;p&gt;The methods in this class are declared final, so that they can be
       inlined by inlining compilers.&lt;/p&gt;
</code></pre>
</section>
      <h4><a class="xref" href="CSJ2K.j2k.image.DataBlkInt.html">DataBlkInt</a></h4>
      <section><p>This is an implementation of the <tt>DataBlk</tt> interface for signed 32
bit integral data.</p>
<pre><code>       &lt;p&gt;The methods in this class are declared final, so that they can be
       inlined by inlining compilers.&lt;/p&gt;
</code></pre>
</section>
      <h4><a class="xref" href="CSJ2K.j2k.image.ImgDataAdapter.html">ImgDataAdapter</a></h4>
      <section><p>This class provides a default implementation of the methods in the
'ImgData' interface. The default implementation is just to return the value
of the source, where the source is another 'ImgData' object.</p>
<pre><code>       &lt;p&gt;This abstract class can be used to facilitate the development of other
       classes that implement 'ImgData'. For example a YCbCr color transform can
       inherit from this class and all the trivial methods do not have to be
       re-implemented.&lt;/p&gt;

       &lt;p&gt;If the default implementation of a method provided in this class does
       not suit a particular implementation of the 'ImgData' interface, the method
       can be overridden to implement the proper behavior.&lt;/p&gt;
</code></pre>
</section>
      <h4><a class="xref" href="CSJ2K.j2k.image.ImgDataConverter.html">ImgDataConverter</a></h4>
      <section><p>This class is responsible of all data type conversions. It should be used,
at encoder side, between Tiler and ForwardWT modules and, at decoder side,
between InverseWT/CompDemixer and ImgWriter modules. The conversion is
realized when a block of data is requested: if source and destination data
type are the same one, it does nothing, else appropriate cast is done. All
the methods of the 'ImgData' interface are implemented by the
'ImgDataAdapter' class that is the superclass of this one, so they don't
need to be reimplemented by subclasses.</p>
</section>
      <h4><a class="xref" href="CSJ2K.j2k.image.ImgDataJoiner.html">ImgDataJoiner</a></h4>
      <section><p>This class implements the ImgData interface and allows to obtain data from
different sources. Here, one source is represented by an ImgData and a
component index. The typical use of this class is when the encoder needs
different components (Red, Green, Blue, alpha, ...) from different input
files (i.e. from different ImgReader objects).</p>
<pre><code>       &lt;p&gt;All input ImgData must not be tiled (i.e. must have only 1 tile) and the
       image origin must be the canvas origin. The different inputs can have
       different dimensions though (this will lead to different subsampling
       factors for each component).&lt;/p&gt;

       &lt;p&gt;The input ImgData and component index list must be defined when
       constructing this class and can not be modified later.&lt;/p&gt;
</code></pre>
</section>
      <h4><a class="xref" href="CSJ2K.j2k.image.Tiler.html">Tiler</a></h4>
      <section><p>This class places an image in the canvas coordinate system, tiles it, if so
specified, and performs the coordinate conversions transparently. The
source must be a 'BlkImgDataSrc' which is not tiled and has a the image
origin at the canvas origin (i.e. it is not &quot;canvased&quot;), or an exception is
thrown by the constructor. A tiled and &quot;canvased&quot; output is given through
the 'BlkImgDataSrc' interface. See the 'ImgData' interface for a
description of the canvas and tiling.</p>
<pre><code>       &lt;p&gt;All tiles produced are rectangular, non-overlapping and their union
       covers all the image. However, the tiling may not be uniform, depending on
       the nominal tile size, tiling origin, component subsampling and other
       factors. Therefore it might not be assumed that all tiles are of the same
       width and height.&lt;/p&gt;

       &lt;p&gt;The nominal dimension of the tiles is the maximal one, in the reference
       grid. All the components of the image have the same number of tiles.&lt;/p&gt;
</code></pre>
</section>
    <h3 id="interfaces">
Interfaces
</h3>
      <h4><a class="xref" href="CSJ2K.j2k.image.BlkImgDataSrc.html">BlkImgDataSrc</a></h4>
      <section></section>
      <h4><a class="xref" href="CSJ2K.j2k.image.ImgData.html">ImgData</a></h4>
      <section><p>This interface defines methods to access image attributes (width, height,
number of components, etc.). The image can be tiled or not (i.e. if the
image is not tiled then there is only 1 tile). It should be implemented by
all classes that provide image data, such as image file readers, color
transforms, wavelet transforms, etc. This interface, however, does not
define methods to transfer image data (i.e. pixel data), that is defined by
other interfaces, such as 'BlkImgDataSrc'.</p>
</section>


</div>
